August 25, 2011 AT 4:52 pm

TUTORIAL: Arduino Hacks -Burning bootloader chips using an Arduino

Extras

TUTORIAL: Arduino Hacks -Burning bootloader chips using an Arduino. A lot of people start learning about microcontrollers with an Arduino but then want to build their own projects without having to sacrifice their dev board. Or maybe they want to make their own Arduino variant, that is compatible with the IDE. Either way, a common problem is how to burn the bootloader onto the fresh AVR chip. Since AVRs come blank, they need to be set up to be Arduino IDE compatible but to do that you need an AVR programmer (like the USBtinyISP).

The good news is that you can burn bootloader using your existing Arduino with only a little bit of work. There’s even a minitutorial on the arduino.cc site
This tutorial is an extention of that tutorial. First we’ll show how you can make a permanent bootloader-burner by soldering a 28-pin ZIF socket to a proto shield and use the PWM output line of the Arduino to generate a clock. This will let you ‘rescue’ many chips that have been set to the wrong type of oscillator, or change ones that are set from external oscillator (most Arduino bootloaders) to internal (such as the lilypad).

Read more!

Related

5 Comments

  1. An AVR dragon is available from Digikey and is only $49 last I checked, and there is support code – you need to add jumper wires and a ZIF socket (that is how mine is configured). This is a neat way to do things, but I use the dragon to program all my AVRs including the ATtiny series – I also have a few SMD ZIFs I can put in the DIP ZIF.

  2. $50 vs $10 (if you just buy the proto PCB and ZIF socket and have some header kicking around the house) – we like ours and many people have arduinos :)

  3. If you have a quantity of chips to add bootloaders too as implied by wanting to use a ZIF socket, you might also want to look at my “optiloader” sketch. This is a self-contained Arduino sketch that includes the hex files of the optiboot bootloader for m8, m168, AND m328p chips. Connected via the same wiring as ArduinoISP, it will autodetect the connected target CPU and burn the bootloader each time you reset your arduino or send “G” to the serial port. See the thread here for details: http://arduino.cc/forum/index.php/topic,64105.0.html

    (Note that additional effort is needed to run optiboot on m8 and m168 processors from the Arduino IDE…)

    (optiloader currently assumes a 512byte bootloader, and probably does not easily scale to bootloaders that are larger than 1K.)

  4. You guys/girls are cranking out the goodness lately! Nice Job!

  5. Looks really good. I went through quite a headache last week burning a 8MHz bootloader for a watch I’m building. I really wished that tutorial was up, a lot of stuff isn’t too clear on the arduino website.

    Nice work!

Sorry, the comment form is closed at this time.