TUTORIAL: Arduino Hacks -Burning bootloader chips using an Arduino
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).
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.
Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !
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.
$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 🙂
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.)
You guys/girls are cranking out the goodness lately! Nice Job!
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.