Computer pr0n

Burning Arduino bootrom on an ATmega328-PU

by on Mar.31, 2012, under Arduino, Hardware, How-to


Like many people, I purchased a handful of the ATmega328-PU microprocessor chips, not realizing there are two, the ATmega328P-PU and ATmega328-PU.  Note the additional P in the first, which stands for picopower; in other words, it has better power consumption.

Well, since most of the arudino stuff is designed around flashing the 328P-PU chip, there are some modifications to be made to a few files to allow you to do this.  However the current instructions have you CHANGE the 328P-PU, then change it back. This does not fly for me, because I may be going between various systems, or not remember to change it back, so my solution, was to add additional support for the 328-PU chip, on top of the 328P-PU chip!

Without changing anything, you will get an error similar to

Expected signature for ATMEGA328P is 1E 95 0F Double check chip, or use -F to override this

The normal solution, provided by a number of places is to edit the avrdude.conf file, then change the signature for the ATMEGA328P chip from 0x1e 0x95 0x0F to 0x1e 0x95 0x14. [Google Search].

My solution is the copy the ATMEGA328P section, and rename the copy to ATMEGA328, then change the signature on this.  the avrdude.conf file should be located in the Arduino director, under hardware/tools/avr/etc. Remember to always make a back up of any file you edit!

Next up, you will need to replicate the Board/Hardware settings, changing the value for the mcu entry.

Since we do not want to edit the hardware.txt file directly, as this does not get saved between versions, you will want to go to your sketch folder, and make a sub folder called “hardware”, within this folder, have another sub folder called “breadboard”, and within this folder, you want a file called hardware.txt, which will contain our data.

For example, if you will be using “Arduino Duemilanove w/ ATmega328”, you will want to add an entry of:

# atmega328-pu (non-picopower) Duemilanove w/ ATmega328 (non-picopower)



Notice, I added in drd to add the atmega328.* lines, the .name field has been changed, and the .mcu line has been changed to atmega328, which is the same name I used in the avrdude.conf file.

In my case, since I am using a breadboard to program, and not using an external crystal [ArduinoISP on a Breadboard], I am using an add on breadboard hardware.txt entry which was recommended from the Arduino website.

This should only be required when installing the bootrom, using the standard hardware selection, I am able to upload without any issues.

If all goes okay, you should now have a working ArduinoISP and similar that can flash the ATmega328-PU chips with no issues!

ArduinoISP on a Breadboard


Update: 2012-04-07

Here is the completed ArduinoISP on a solder board. Though the last image is missing one piece…10 points goes to who finds it..

Arduino-Like board pt 1Arduino-Like board pt 2Arduino-Like board pt 3

:, , , , , , ,

7 Comments for this entry

  • Deskwizard

    Hey loclhst, Happy Easter!

    I just got myself some of the non-picopower too, and while I managed to make something work, its far from optimal…
    There’s seem to be something I am missing in your modifications…
    Could you please post or send me the 2 modified sections (the one from avrdude.conf and from boards.txt) ?
    I tried multiple ways of getting it to work reliably but there’s something in the way…
    For the time being I resorted to commenting out one of 2 signatures I put in the original 328p section, switching the comment over when I need to program the bootloader.

    Hope you can help and thanks!

    (btw, if you want to use them with the internal OSC at 8mhz, no div clock, change lowfuse to 0xD2. Dont forget to change the bootloader to the pro also, or set upspeed to 28800 in your board def.)

  • Deskwizard

    Oh and I forgot…

    VCC at 20 & 21 ? maybe I just can’t see because of the angle… or you routed them underneat

    first guest was reset pull-up, like I always do 😉

  • Managed Network Services

    I am often to blogging and i really appreciate your content. The article has really peaks my interest. I am going to bookmark and keep checking for new information.

  • Managed Services is so cool! I dont suppose Ive read anything like this before. So nice to find somebody with some original thoughts on this subject. realy thank you for starting this up. is something that is needed on the web, someone with a little originality. useful job for bringing something new to the internet!

  • matt

    In your hardware.txt file, while did you add drd on every line except the .name, where you added npp?

  • Cefn Hoile

    Hi, there. I found this article when trawling for solutions for my ATMEGA328-PUs but finally settled on using Optiloader, ( see _which bypasses all these issues in one go. It’s been invaluable for me preparing kits for , meaning I can use the cheaper chips, so it costs just £1.40 total component cost to create an Arduino-compatible #Shrimp!

  • Joselio Carneiro

    Hi There,

    I’m trying to write an Arduino Uno bootloader in a ATMEGA328p-mu. I get the message:

    no-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Desenvolvimento\arduino-1.0.1\hardw
    are/tools/avr/etc/avrdude.conf -pm328p -cusbasp -Pusb

    avrdude: error: programm enable: target doesn’t answer. 1
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    Do you have any clue to fix it?

    I’m using the USBasp program board, but already tried the ArduinoISP sketch without success.

    Thank you very much,


Leave a Reply


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!