Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pro Mini Style SSOP20 modification #16

Merged
merged 11 commits into from
Jul 19, 2020
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 @@ -66,10 +66,14 @@ menu.variant=Variant
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