BootLoader
發表於 : 2018-12-16 18:46:19
https://www.arduino.cc/en/Tutorial/ArduinoISP
https://www.instructables.com/id/Burn-A ... uino-MEGA/
Based on the official ArduinoISP Tutorial:
http://arduino.cc/en/Tutorial/ArduinoISP
This procedure allows using a working arduino to program the bootloader of another ATMega chip using SPI as ICSP. It saves you having to purchase another peripheral (such as USBTinyISP).
Arduino as ISP relies on the SPI bus to transact the communications. On an older 168/328 the SPI bus is on pins 10 11 12 13. On a Mega(1280/2560) the SPI bus is moved over to the 50 51 52 53 pins!
I fought and fought and fought with the darn thing until I realized I had it wired incorrectly.
Thankfully, it's all translated in the ISP Sketch -
Slave reset - destination pin 'reset', connect to source 53
MOSI - destination pin 11, connect to source 51
MISO - destination pin 12, connect to source 50
SCK - destination pin 13, connect to source 52
Using Arduino 1.0 IDE write the arduino isp sketch (in examples) to the Mega, then change the board settings to the target (in my case dumilenove with 328) and com port stays the same.
burn bootloader, and tada!
https://www.instructables.com/id/Burn-A ... uino-MEGA/
Based on the official ArduinoISP Tutorial:
http://arduino.cc/en/Tutorial/ArduinoISP
This procedure allows using a working arduino to program the bootloader of another ATMega chip using SPI as ICSP. It saves you having to purchase another peripheral (such as USBTinyISP).
Arduino as ISP relies on the SPI bus to transact the communications. On an older 168/328 the SPI bus is on pins 10 11 12 13. On a Mega(1280/2560) the SPI bus is moved over to the 50 51 52 53 pins!
I fought and fought and fought with the darn thing until I realized I had it wired incorrectly.
Thankfully, it's all translated in the ISP Sketch -
Slave reset - destination pin 'reset', connect to source 53
MOSI - destination pin 11, connect to source 51
MISO - destination pin 12, connect to source 50
SCK - destination pin 13, connect to source 52
Using Arduino 1.0 IDE write the arduino isp sketch (in examples) to the Mega, then change the board settings to the target (in my case dumilenove with 328) and com port stays the same.
burn bootloader, and tada!