Skip to content

Commit

Permalink
Pro Mini Style SSOP20 modification (#16)
Browse files Browse the repository at this point in the history
* SSOP20 - SPI_SS arduino pin is 9

* seisfeld adds support for 32MHz crystal and LaZsolt changed SSOP20 mini to 328P

* Source: http://www.lgtic.com/upload/lgt8fx8p/Porting_from_LGT8FX8D_to_LGT8FX8P_v1.0.0.pdf

* Source: https://github.com/Edragon/LGT/tree/master/1-LGT8F328/DOCS

* Better English. Source: https://www.avrfreaks.net/sites/default/files/forum_attachments/LGT8FX8P_databook_v1.0.5-English_0.pdf

* Delete LGT8Fx8P_databook_v1.0.5.ch.pdf

* Delete LGT8Fx8P_databook_v1.0.5.en.pdf

* need a pullup resistor

* Different LGT MCUs

* Different LGT MCUs in Arduino boards

* Different LGT MCUs in Arduino boards
  • Loading branch information
LaZsolt authored Jul 19, 2020
1 parent d9b7748 commit fead0eb
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
25 changes: 25 additions & 0 deletions docs/LGT_MCUs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# LGT MCUs in Arduino boards

LGT8F88A, LGT8Fx8D and LGT8Fx8P main differences

<br>

| - | - | LGT8F88A | LGT8Fx8D | LGT8Fx8P |
| :-----------: | :----: | :-------: | :---------: | :--------:|
| Progmem | KB | 8 | 4/8/16/32 | 8/16/32 |
| RAM | KB | 1 | 0.5/1/1/2 | 1/1/2 |
| Data Flash (EEPROM) | KB | 504 byte | 1/2/4/progmem shared | 2/4/progmem shared |
| DAC (8 bit) | | - | 2 | 1 |
| Internal Reference | V | 1.25/2.56 | 1.25/2.56 | 1.024/2.048/4.096 |
| Analog Comparators (AC) | | 2 | 2 | 2 |
| AC resolution | mV | 6 | 12 | 10 |
| DAP Differential Amplifier | gain | 7.5/15/22.5/30 | - | 1/8/16/32 |
| ACD | bit | 10 | 12 | 12 |
| Max sysclk | MHz | 32 | 32 | 32 |
| Extras | | Capacitive touch button controller, <br> Thermal sensor | 2x Operational Amplifier <br> fixed gain = +12 or -11 | DSC (16 bit arithmetic), <br> SPI buffer, SPI 2 wire input mode |
| Package | | QFP32, SSOP28 | QFP32, SSOP28, SSOP24, SSOP20 | QFP48, QFP32, SSOP20 |

More docs: <br>
https://github.com/Edragon/LGT/tree/master/1-LGT8F328/DOCS <br>
https://github.com/Upcycle-Electronics/LGT8Fx-Datasheet/tree/master/LGT-ArchivedStuffDredgedFromTheInternet <br>
https://github.com/watterott/LGT8F328P-Testing/ <br>
Binary file not shown.
Binary file added docs/larduino_isp-corrected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions lgt8f/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ menu.arduino_isp=Arduino as ISP
328.menu.variant.modelD.bootloader.file=lgt8fx8e/optiboot_lgt8f328d.hex
328.menu.variant.modelD.build.variant=lgt8fx8e

328.menu.variant.modelD_SSOP20=328D-SSOP20 (e.g. green pro mini alternative)
328.menu.variant.modelD_SSOP20.bootloader.path=lgt8fx8e
328.menu.variant.modelD_SSOP20.bootloader.file=lgt8fx8e/optiboot_lgt8f328d.hex
328.menu.variant.modelD_SSOP20.build.variant=lgt8fx8ds20
328.menu.variant.modelP_SSOP20=328P-SSOP20 (e.g. green pro mini alternative)
328.menu.variant.modelP_SSOP20.bootloader.path=lgt8fx8ps20
328.menu.variant.modelP_SSOP20.bootloader.file=lgt8fx8ps20/optiboot_lgt8f328ps20.hex
328.menu.variant.modelP_SSOP20.build.variant=lgt8fx8ps20
#328.menu.variant.modelD_SSOP20=328D-SSOP20 (e.g. green pro mini alternative)
#328.menu.variant.modelD_SSOP20.bootloader.path=lgt8fx8e
#328.menu.variant.modelD_SSOP20.bootloader.file=lgt8fx8e/optiboot_lgt8f328d.hex
#328.menu.variant.modelD_SSOP20.build.variant=lgt8fx8ds20 <---- In this case SPI buffer will not work.

############################
#### LGT8F88 ####
Expand Down
4 changes: 4 additions & 0 deletions lgt8f/variants/standard/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
#endif

#if defined(__LGT8F_SSOP20__)
#define PIN_SPI_SS (9) // Redirected in main.cpp at line 77
#else
#define PIN_SPI_SS (10)
#endif
#define PIN_SPI_MOSI (11)
#define PIN_SPI_MISO (12)
#define PIN_SPI_SCK (13)
Expand Down

0 comments on commit fead0eb

Please sign in to comment.