Skip to content

Commit

Permalink
Merge pull request #257 from dbuezas/fix-isp
Browse files Browse the repository at this point in the history
Changes extended_fuses from 0x07 to 0xff as indicated by newer avrdude
  • Loading branch information
dbuezas authored Mar 28, 2023
2 parents bf4811a + ef307cc commit 07fc9f9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
10 changes: 5 additions & 5 deletions lgt8f/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ menu.upload_speed=Upload speed
328.bootloader.tool=avrdude
328.bootloader.high_fuses=0xff
328.bootloader.low_fuses=0xff
328.bootloader.extended_fuses=0x07
328.bootloader.extended_fuses=0xff
328.bootloader.unlock_bits=0x3f
328.bootloader.lock_bits=0x3f
328.build.core=lgt8f
Expand Down Expand Up @@ -109,7 +109,7 @@ menu.upload_speed=Upload speed
328_16.bootloader.tool=avrdude
328_16.bootloader.high_fuses=0xff
328_16.bootloader.low_fuses=0xff
328_16.bootloader.extended_fuses=0x07
328_16.bootloader.extended_fuses=0xff
328_16.bootloader.unlock_bits=0x3f
328_16.bootloader.lock_bits=0x3f
328_16.build.core=lgt8f
Expand Down Expand Up @@ -229,7 +229,7 @@ menu.upload_speed=Upload speed
328_12.bootloader.tool=avrdude
328_12.bootloader.high_fuses=0xff
328_12.bootloader.low_fuses=0xff
328_12.bootloader.extended_fuses=0x07
328_12.bootloader.extended_fuses=0xff
328_12.bootloader.unlock_bits=0x3f
328_12.bootloader.lock_bits=0x3f
328_12.build.core=lgt8f
Expand Down Expand Up @@ -333,7 +333,7 @@ menu.upload_speed=Upload speed
#88.bootloader.tool=avrdude
#88.bootloader.high_fuses=0xff
#88.bootloader.low_fuses=0xff
#88.bootloader.extended_fuses=0x07
#88.bootloader.extended_fuses=0xff
#88.bootloader.unlock_bits=0x3f
#88.bootloader.lock_bits=0x3f
#88.build.mcu=atmega88
Expand Down Expand Up @@ -378,7 +378,7 @@ lardu_328e.upload.speed=57600
lardu_328e.bootloader.tool=avrdude
lardu_328e.bootloader.high_fuses=0xff
lardu_328e.bootloader.low_fuses=0xff
lardu_328e.bootloader.extended_fuses=0x07
lardu_328e.bootloader.extended_fuses=0xff
lardu_328e.bootloader.path=lgt8fx8e
lardu_328e.bootloader.file=lgt8fx8e\optiboot_lgt8f328d.hex
lardu_328e.bootloader.unlock_bits=0x3f
Expand Down
27 changes: 19 additions & 8 deletions lgt8f/libraries/LarduinoISP/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,39 @@ This is an implementation of LGT8Fx8P ISP download protocol. You can make arduin

## usage

1. Make a LGTISP:
1. Select SERIAL_RX_BUFFER_SIZE to 250 in Menu: Tools/Arduino as ISP/SERIAL_RX_BUFFER_SIZE to 250
2. Burn LGTISP into another LGT328p board.
3. Select Default in Menu: Tools/Arduino as ISP/Default
4. Short `RESET` pin and `VCC` pin of ISP board to avoid bootloader executing.
5. The board becomes a LGTISP now! Connect `SWD` and `SWC`. `RST` can be either connect or not.
1. Prepare a board to use as Programmer:
1. In the menu select: `Tools`/`Arduino as ISP`/`SERIAL_RX_BUFFER_SIZE to 250`
2. Open `File`/`Examples`/`LarduinoISP`/`LarduinoISP`
3. Upload the sketch.
4. Go back to normal serial buffer size: `Tools`/`Arduino as ISP`/`Default`
5. Put a capacitor (e.g 10uF) between the `RESET` pin and `VCC` pin of ISP board to resets while uploading. Alternatively, short `RESET` and `VCC`, but make sure to NOT press the reset button in the board.
6. Congratulations, you have a LGTISP Programmer now!
2. Connect the programmer to the target board
1. Connect `SWD` and `SWC`. `RST` can be either connect or not.
| Arduino Nano || LGT |
|:-:|:-:|:-:|
| D13 | -> | SWC |
| D12 | -> | SWD |
| D10 | -> | RST |
2. Burn bootloader into LGT8Fx8P:
3. Burn bootloader into LGT8Fx8P:
1. change **Programmer** to **AVR ISP**.
2. click **Burn Bootloader** or upload sketches directly through the menu: **Sketch/Upload using programmer**
3. Now the target board can receive sketches via serial
4. Burn sketches directly through the programmer:
1. Open the desired sketch
2. Configure the board from `Tools` as normal
3. Change **Programmer** to **AVR ISP**.
4. With everything wired, in the menu go to `Sketch`/`Upload using Programmer` (alternatively hold shift while clicking the upload button)
5. Congratulations! the sketch is now uploaded without a bootloader! Uploading via serial should't be possible anymore on that board (unless you Burn the bootloader again)

## Guide

[rickygai](https://github.com/rickygai) created a very detailed guide [here](https://github.com/rickygai/arduino/blob/main/LGT8F328P.pdf)

## author

brother_yan
ISP code: brother_yan
This page: dbuezas

## reference

Expand Down

0 comments on commit 07fc9f9

Please sign in to comment.