Wednesday, March 9, 2016

How to burn boot-loader on arduino UNO with arduino Leonardo

Wiring

You have to connect the 5 wires of the ICSP of each arduino as shown in the picture below


I also added a 10uf capacitor to UNO Reset pin and GND not sure if it is necessary.

Program

Before you upload the sketch be sure to disconnect all the wires.
Remember to remove - "disable" the unwanted boards because the sketch is to big otherwise will give you the below error:
...
Sketch uses 30,444 bytes (106%) of program storage space. Maximum is 28,672 bytes.
...
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.


Typing // in front of each line will "disable" the boards
...
// IMPORTANT: If you get a compile or verification error, due to the sketch size,
// make some of these false to reduce compile size (the ones you don't want).
// The Atmega328 is always included (Both Uno and Lilypad versions).

// #define USE_ATMEGA8 true
#define USE_ATMEGA16U2 true    // Uno USB interface chip
#define USE_ATMEGA32U4 true    // Leonardo
// #define USE_ATMEGA168 true
// #define USE_ATMEGA1280 true
// #define USE_ATMEGA1284 true
// #define USE_ATMEGA2560 true
// #define USE_ATMEGA256RFR2 false
...

Since you upload the sketch and wire the board open the Serial port monitor at baud 11520 and follow the instructions.


You can download the sketch here:
https://github.com/nickgammon/arduino_sketches

Very useful tutorials:
http://www.gammon.com.au/bootloader
https://github.com/NicoHood/HoodLoader2/wiki/Burn-the-bootloader-from-another-Arduino

2 comments:

  1. Work it also with uno to leonardo?

    Thanks from Jens Vogel Germany

    ReplyDelete