How to burn AtMega328P arduino bootloader on Yabbas

Recently I made a Yabbas arduino system ; this is a low cost arduino (7€) you can DIY. I’ve made it with a group of people from my city (look here) and my daughter. During this session we have finished the prototype but not had the time to flash the AtMega328P.

Now this is done using my Arduino Leonardo as an ISP programmer. I’ll detail the way I’ve done it here

Ardino can be used as a AtMega programmer by using a ArduinoISP sketch. This one is provided through the Examples.

  • To start, I used the Arduino IDE version 1.5.5(beta). Then you have to load the sketch by opening menu file >> Examples >> ArduinoISP
  • This one need to be modified for Leonardo shield as the ISP pin are different than on other shield

You need to modify the code to add the following lines :

#define RESET     SS

// Addition
#define SCK  15
#define MISO 14
#define MOSI 16
#define RESET 10

#define LED_HB    9

This redefines the pinout.

  • Next you have to burn this sketch. Firstly you have to select the target (Leonardo), going Tool >> Board >> Arduino Leonardo then select the right serial port. One done you can upload the sketch to the board.
  • Now you can unplug the Leonardo and connect the Yabbas card


circuit Yabbas - Arduino Leonardo as ISP

circuit Yabbas – Arduino Leonardo as ISP


  • Now, to burn the bootloader, plug the Leonardo, go to Tool >> Board select “Arduino Pro or Pro Mini” which correspond to Yabbas and in Tool >> Proc select AtMega328 (5v). Select in Tool >> Programmer >> Arduino As ISP. To finalize, click on Tool >> Burn Bootloader
  • During burn, you should see Yabbas green led blinking fast.
  • Once burn is accomplished, the green led is blink 1Hz
  • It’s Done !

The next step was to put it on a board : it looks like this

Arduino Leonardo as isp with shield

Arduino Leonardo as isp with shield












There is also another way to burn the bootloader manually by using avrdude directly on command line.

On Mac Os X you have to open a terminal, then go to the right directory : /Applications/ and launch the right command :

./avrdude -C ../etc/avrdude.conf -c arduino -p atmega328p -P /dev/cu.usbmodemXXXX 
   -U flash:w:../../../arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.