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) atmega328npp.name=Arduino Duemilanove w/ ATmega328 (non-picopower) atmega328drd.upload.protocol=arduino atmega328drd.upload.maximum_size=30720 atmega328drd.upload.speed=57600 atmega328drd.bootloader.low_fuses=0xFF atmega328drd.bootloader.high_fuses=0xDA atmega328drd.bootloader.extended_fuses=0x05 atmega328drd.bootloader.path=atmega atmega328drd.bootloader.file=ATmegaBOOT_168_atmega328.hex atmega328drd.bootloader.unlock_bits=0x3F atmega328drd.bootloader.lock_bits=0x0F atmega328drd.build.mcu=atmega328 atmega328drd.build.f_cpu=16000000L atmega328drd.build.core=arduino atmega328drd.build.variant=standard
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!
Here is the completed ArduinoISP on a solder board. Though the last image is missing one piece…10 points goes to who finds it..