To complete this tutorial you will need…

First up, place the ZIF socket on the proto shield like so:

Solder all 28 pins for a solid connection!

Solder the following wires to the ZIF socket

  • Pin 1 to digital 10 - Blue (this wire connects underneath to the ZIF socket so make sure to 'jumper it so it solders directly to the ZIF pin, see the photos below)
  • Pin 7 to 5V - Red
  • Pin 8 to Ground - Black
  • Pin 9 to digital 9 - Gray
  • Pin 17 to digital 11 - Brown
  • Pin 18 to digital 12 - Orange
  • Pin 19 to digital 13 - Yellow
  • Pin 20 to +5V - Red
  • Pin 22 to Ground - Black
Follow the protoshield tutorial to solder in the Red LED into LED1 position, Green LED into LED2 position. Also solder in the two 1.0K resistors next to the LEDs. We'll use the LEDs as indicators. Then solder a wire from the LED2 breakout (white) to analog 0 and a wire from LED1 breakout (white) to digital 8.

Next add S1switch which you will press to start the programming process. You can just solder a wire (yellow) from the breakout near S1 to Analog 1.

We also soldered in a Piezo beeper, to give us feedback. One side is soldered into Analog 3 the other side is soldered to the ground rail right next to the analog breakouts.

Finally, you'll need to solder on the header to allow the shield to be placed on, break the 0.1" male header and place it into the Arduino sockets. Then place the shield above on top to solder it in place.
If you need to see what the bottom looks like, it will be something like this. Except ours has a ton of rosin on it because we ended up moving the socket for this prototype, so that brown rosin stuff probably wont be on yours!

Thats it!

Program the Arduino

Next, install the AVRProg Library which will be used to build the programmer firmware. It can be installed via the Arduino IDE's Library Manager.

In the Arduino IDE, open the Library Manager:

Tools -> Manage Libraries...

Then search for Adafruit AVRProg. The library should be found in the listing. Then click the Install button.

Once the library is installed, open the atmega328_optiboot example in the Arduino IDE:

File -> Examples -> Adafruit AVRProg -> atmega328_optiboot

Upload this example to your Arduino board.

We have one report that the IDE v1.0.1 does not work with this sketch. Please try v23 or v1.0 if you have problems. You only need to use that version for uploading the sketch to the programmer Arduino, the chips will work with any version of the IDE
We also have a report that this procedure does not work with Arduino 1.5.2. Use the latest mainstream Arduino release instead!

Using the Programmer

Once the programmer sketch has been uploaded to the Arduino board, programming chips is easy:

  1. Insert the chip into ZIF socket.
  2. Lock it down via lever on ZIF socket.
  3. Press the button on the shield.
  4. While programming, the green LED is lit. When done, the piezo will beep once. If the red LED is lit, a problem occurred.
Once you have programmed the chip with our default code you can use it in an existing Arduino board, compatible, or breadboard style. You will need a 16 MHz crystal on the clock pins, so don't forget it!
The standalone sketch will only program ATmega328P chips and it will program them with our "adaBoot" Bootloader not Optiboot! Select Duemilanove with 328 when uploading to Arduinos that use the bootloaded chip, even if you are using it in an UNO branded Arduino!

This guide was first published on Jul 23, 2013. It was last updated on Jul 23, 2013.

This page (Assembly) was last updated on Apr 04, 2023.

Text editor powered by tinymce.