Arduino UNO As AtMega328P Programmer





Introduction: Arduino UNO As AtMega328P Programmer

After receiving my first Arduino UNO, I soon realised that it will be impractical to use an UNO for every project. As with the Microchip family of MCUs, I wanted an easy way to program stand-alone circuits and chips.

Searching the internet, it was clear that the Arduino IDE can cater for all my needs, and that no additional hardware will be required. The Arduino UNO can be programmed as an In Circuit Programmer with the supplied example sketch ArduinoISP and the UNO. There is thus no need for a separate programmer, or using AvrDude software for programming. A lot of examples on this was found on the internet.

After some testing, it was clear that programming the AtMega328P was not as easy as I thought. Programming all depended on the AtMega328P chip. Does it already contained the bootloader, or is the chip blank? Costs of a chip with bootloader is double that of a clean chip, so my first batch of chips was blank.

What is the difference, you may ask. Well, it is all about the AtMega328P oscillator selection.

Lets look at the differences

AtMega328P with bootloader

Cost of this chip is about double that of a blank chip
The config registers of the chip is set to use an external crystal as clock (16MHz)
Without an external oscillator, one can not program the chip using the Arduino as programmer
Once fitted with an external oscillator, the chip can be programmed using the Arduino as programmer

AtMega328P without bootloader

Cost is half of a chip with bootloader
The config register of the chip is set to use the internal 1MHz clock
Chip can be programmed using the Arduino as programmer, BUT the program will run 16 times slower than the code should, as the Arduino IDE compiles the code to run at 16MHz, and not 1MHz
Chip can be configured for 16MHz by uploading the Arduino bootloader.

Step 1: Designing a Programmer Shield

Designing the programmer shield, I looked at the requirements to program chips with and without bootloaders. First, I looked at the oscillator selection.


AtMega328P with bootloader

The chip needs an external oscillator to be programmed, so this must be present on the shield.

AtMega328P without bootloader

If the chip was configured to use the internal oscillator, no additional components are needed. However, if the chip was previously configured to use an external oscillator, an oscillator will be required. With an external oscillator, both types can be programmed.

It is clear that adding an external oscillator to the shield, will accommodate all types of chips. A 16MHz crystal and 2 x 15pf capacitors, or a 16MHz resonator can be used.

LED indications

The source code or sketch indicated 3 outputs that can be connected to LEDs. This indications should be present on the shield.

Resetting the programmer

With a shield placed on top of an Arduino UNO, the UNO reset button is normally out of reach. The shield should include a separate reset button.

Powering the chip to be programmed

The chip that needs to be programmed, must have power connected to it. For the supply, the +5V and 0V is taken from the Arduino UNO board. However, inserting and removing a chip from the programmer with supply on, might cause damage to the chip. For this reason, a switch was added to the shield.

I/O Port protection

The ArduinoISP shield sets certain pins as OUTPUT on the Arduino UNO. If one now connect a previously used AtMega328P to the programmer, there can be conflict between the two chip's I/O lines that can cause damage to the ports. For protection, I added 470R resistors between the programmer, and the chip to be programmed.

Reset line of chip to be programmed

To ensure a stable reset circuit for the chip to be programmed, I added a 10K pull-up resistor to the RESET line.

Programming Method

ZIF Socket

This will be an easy way to program stand-alone chips, or to burn the bootloader on new chips. I thus added the ZIF socket to the design.

Programming cable

As almost all my designs are stand-alone circuits, my programming and development is done on breadboard. Thereafter, program updates are done via programming headers on the final circuit board. For this reason, I added the programming cable to the design.

Step 2: Building the Shield

I designed a PC Board with the free version of Eagle, and the shield fits directly onto the Arduino UNO. After designing the layout of the board, I noticed that the space taken up by the ZIF socket as well as the standard programming cable leave me with two options:

- use normal 1/4W resistors, which will leave no space for labels, or
- use SMD resistors which is more work, but will leave space for the labels.

My final PCB design uses SMD resistors, soldered to the solder side of the board. I used a 16MHz resonator as oscillator, but this can easily be changed with a crystal and 2 capacitors.

The power switch is connected such as to switch off the +5V to the ZIF socket, as well as the programming headers. This give more options when doing development on stand-alone circuits. Due to the limited space for the shield, the power switch was placed where the A0 - A5 pins are located on the Arduino. As these pins are not used for programming, they were omitted.

Building the circuit is quick using the PC Board. The standard header pins used to connect the shield to the Arduino, was modified. Using needle nose pliers, the header pins were pressed flush with the black plastic, and inserted from the component side.

Finally, I added labels to the LEDs and programming header.

Step 3: Setting Up the Arduino IDE to Use the Programmer

After building the programming shield, connect it to an Arduino UNO, and connect the Arduino USB cable to the PC.

- Open Arduino IDE.
- Select File - Examples - ArduinoISP
- Upload the sketch to the Arduino.
- The programmer shield LEDs should flash rapidly, where after the OK LED will fade on/off.
- Select Tools - Board - Arduino UNO
- Select Tools - Programmer - Arduino as ISP

The shield is now ready to be used to program any AtMega328P.

Step 4: Using the Programmer Shield

To burn the bootloader to the chip:

- Insert the chip into the ZIF socket.
- Goto Tools - Burn Bootloader
- Programmer LEDs will indicate programming status
- On completion, the OK LED will again fade on/off

To burn a sketch to the chip

- Insert the chip into the ZIF socket.
- Goto File - Upload Using Programmer
- Programmer LEDs will indicate programming status
- On completion, the OK LED will again fade on/off

The same method can be used to program an AtMege328P in a stand-alone circuit (breadboard or PC board) using the programming cable. For stand-alone circuits, it is normally required that they are powered up via their own supply. If no supply is available, and the circuit does not require a lot of power, the circuit can be power from the programming shield by switching on the +5V

Always ensure that you switch off the power switch (+5V LED off) before inserting or removing a chip into the ZIF socket, or before connecting/disconnecting the programming cables to the stand-alone circuit.

3 People Made This Project!


  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • Science of Cooking

    Science of Cooking

We have a be nice policy.
Please be positive and constructive.



Using your board I were successful with programming boatloader on Atmega 328p, but I am not sure if is possible to program HEX file on it.



Hi Eric

Thank you very much for sharing your proyect. I found very useful the idea of the board fitting on the (omnipresent) arduino uno, so I toke your board design, I built it and it worked like a charm.

Anyway, when I was working with the printed (I migrated the files to Altium's CM) it seemed to me that the labeling for the isp header was not completely correct. I think that the order should be SCK, MISO, MOSI, RST, 5V, 0V.

Since for ISP purposes I use to connect the programming cable directly to the arduino ICSP six-pin connector, I did not check it, but it was the impression I had following the leads.


Thanks for pointing out the labeling. When I have timer, I will update this.



Thanks for sharing this interesting project. Very clear and instructive.

However I can find Arduino Mini,Micro,Nano at a lower cost than Atmega328p + resonator including shipping to Norway.

Quite strange but the lowest cost Atmega328p I have found was about £ 1.8 ?

I have built one for programming an Atmega644, working fine first time.

Thanks for your feedback.
Yes, one must look at the cheapest option available. For me, it is not really that the Atmega328 chip is the cheapest, but it is locally available. Lately, it is of no use in South Africa to order from eBay, as the shipping takes anywhere from 1 to 8 months....

Thanks for this, I was able to build the circuit on breadboard and burn the bootloader onto a blank 328P. I'd followed another tutorial and had no luck. This worked first time. Awesome!


Glad this Instructable was of help.



I just answered my own question about the communication TX and RX. I guess now it comes done to the Sofware version. 1.8 just is not working.


Hi Eric,

Thanks a lot for excellent information & replies. I have followed everything as per the instructible but I get following error-

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

Error while burning bootloader.

Please suggest the solution. Thanks.

Hi sggm

I have few questions:

- Did you select "Arduino/Genuino Uno" as your board?

- Did you select the correct "COM" port?

- Did you select "Arduino as ISP" as your programmer?

- Did you upload the "Arduino ISP" code to your Uno board?

If you were able to upload the "Arduino ISP" software to your board, the heartbeat LED will flash indicating that the programmer is ready.

- Are you trying to program an ATMega328p chip?

- Did you insert the chip correctly into the programming socket?

- Is the power switch of the programmer on?

This is indicated by the heartbeat and PWR led.

- Are you able to burn the bootloader?

If you can not get to this point, you will have to double check all your connections.