Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lwc:hardware:logicgreen [2023/04/05 11:11] – created John Harrison | lwc:hardware:logicgreen [2023/12/13 13:32] (current) – John Harrison | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * PD7 (pin 9): digital I/O pin | * PD7 (pin 9): digital I/O pin | ||
| //thank you, ChatGPT// | //thank you, ChatGPT// | ||
| + | |||
| + | * [[https:// | ||
| + | * for some reason the chip ran at 1/2 speed when doing this but the same chip ran at normal (32MHz) speed when using the bootloader. No fuses (that I know of) were changed. (???) | ||
| + | * [[https:// | ||
| + | |||
| + | ==== In Circuit Programming with CLion and PlatformIO ==== | ||
| + | * add this to .platformio.ini: | ||
| + | < | ||
| + | [env: | ||
| + | platform = lgt8f | ||
| + | framework = arduino | ||
| + | board = lgt8f328p-LQFP48 | ||
| + | upload_protocol = custom | ||
| + | upload_port = / | ||
| + | upload_speed = 19200 | ||
| + | upload_flags = | ||
| + | -v | ||
| + | -V | ||
| + | -C | ||
| + | $PROJECT_PACKAGES_DIR/ | ||
| + | -p | ||
| + | $BOARD_MCU | ||
| + | -P | ||
| + | $UPLOAD_PORT | ||
| + | -c | ||
| + | stk500v1 | ||
| + | upload_command = avrdude $UPLOAD_FLAGS -U flash: | ||
| + | </ | ||
| + | * then choose '' | ||
| + | |||
| + | ==== Memory ==== | ||
| + | If using ISP and you run out of memory you can overwrite the bootloader if you wish (and I wish because I did). In '' | ||
| + | |||
| + | ==== Random ==== | ||
| + | * software reset: | ||
| + | < | ||
| + | VDTCR = 0x80; // make register writeable for a short time | ||
| + | VDTCR = 0x00; // clear bit 6 | ||
| + | </ | ||