Skip to content

Burn the bootloader from another Arduino

Nico edited this page Mar 2, 2015 · 10 revisions

You can also use a 2nd Arduino to flash the bootloader. For example if you can't access the first Arduino for some reason. We are just uploading the installation sketch to another Arduino and connect the wires a bit different. You can use any kind of Arduino Leonardo/Micro/Mega/Uno/Nano etc for this operation.

You can (optionally) also use another Arduino as ISP to burn the bootloader. This is for more advanced users and for quick developing.

1. Prepare your Arduino

Unplug both Arduinos from USB. Never change wires when the devices are powered! Connect all wires from the 2nd Arduinos main MCU to the 16u2. You also need to connect 5V-5V and GND-GND to power the board. Unplug the USB cable of the Arduino you are flashing. In this case you do not need the capacitor which we use in the standalone version.

Connections

Pin connections:
328/2560 - 16u2
GND      - GND
5V       - 5V
MOSI     - MOSI
MISO     - MISO
SCK      - SCK
PIN 10   - 16u2 RESET

2. Upload the installation sketch

Connect your Arduino to your PC, select the Arduino board that acts as uploader (do not select 16u2). The installation sketch is located in sketchbook/hardware/HoodLoader2/tools/Atmega_Board_Programmer/Atmega_Board_Programmer.ino, open it with your Arduino IDE.

Upload the installation sketch to your Arduino (Ctrl + U). This may take a while.

board-programmer

3. Burn the bootloader

Once the installation sketch is uploaded to your main MCU you are able to burn the bootloader to your 16u2.

Open the Serial port monitor at baud 115200. Ignore the 100nF capacitor. Follow the instructions and wait. The Serial debug monitor will tell if the installation was successful.

installation-sketch

4. Check bootloader installation

Now your Arduino should be flashed with the new bootloader. To check your HoodLoader2 installation read on here. If its not correctly installed read the instructions carefully and try again.