October 23, 2010

Arduino-ISP: Burn Bootloader Tutorial

This is a simple tutorial on how to burn Arduino bootloader on an ATMEGA chip, using Arduino as an ISP (In-System Programmer) as shown here in the option named "targeting an AVR on a breadboard".

If you want a ISP more stable than a breadboard you can build something like this one.

(1) Start by plugging your Arduino board to your computer:


(2) Then load arduino SDK on your PC, and open the ArduinoISP example (File -> Examples -> ArduinoISP):


(3) The ArduinoISP sketch opens:


(4) Then upload the sketch to the board (File --> Upload to I/O Board):


(5) The SDK will be saying "uploading...":


(6) It will compile the sketch (giving sketch size):



(7) And it will end uploading (saying Done uploading) :


(8) Then unplug the Arduino Board from the PC and connect the ISP to the Arduino board:


(9) Put the ATMEGA chip in the ISP and connect again the Arduino board to the PC:


(10) Once connected, you will see the Heartbeat LED blinking:


(11) Then you have to choose the target board type (corresponding to the ATMEGA chip in the ISP). In my case it's an ATMEGA328P, thus choosing Arduino Duemilanove. Tho choose the target board go to Tools -> Board -> Arduino Duemilanove or Nano w/ ATmega328:


(12) Then ask to burn the bootloader using your Arduino Board as an ISP (Tools -> Burn Bootloader -> w/ Arduino as ISP):


(13) You'll be told that burning is in progress:


(14) You will see the Programming LED blinking:


(15) Then you'll be told that burning is completed:


(16) The Heartbeat LED will start blinking again:


(17) And that's all. You can unplug everithing and use your ATMEGA chip to build your project. Here's a bounch of ATMEGA chips with the bootloader burned and ready to host some nice sketch: