Trouble burning the bootloader to Atmega328-PU

I'm trying to build my first standalone arduino and am trying to burn the bootloader to an atmega328-pu. I know this is not the typically used 328p chip, I just ordered the wrong part.

I'm trying to burn the bootloader using this method: http://arduino.cc/en/Tutorial/ArduinoToBreadboard using a deumilinove clone w/an atmega168. When I attempt to burn the bootloader I get the following error message (and nothing else):

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

After quite a bit of time googling, I've found other people getting this message when trying to use a non-p 328. One person mentioned that he got it working after changing some code, but did not mention what he did, I'm guessing something in avrdude.conf or boards.txt? I honestly don't know much about avrdude and don't know how those files should be modified to bypass the board check (and I don't know how to add the -F command the error suggested).

If anyone can help I'd appreciate it.

The error means that avrdude is detecting that you have told it to program a different chip than the one that is plugged in.

This is because the atmega328-pu is not supported by default by the Arduino IDE. You can use the hardware setup as described, and then use avrdude from a command line, or try this modification: Arduino Forum (to do this, open up file avrdude.conf from the indicated folder in notepad, search for the indicated line and change the hex number).

If you'd like to try avrdude from the command line, check out AVR Tutorial - AVRDUDE for a good tutorial about avrdude. When you use avrdude it's command line, you tell it all the information with option tags, ie -p tells it which chip you're programming. You can add more options to the command, and change settings. You'll need at least these options: -c avrisp, -p <>, -b <>, -P <>, -v, and -U <>for the flash file and any lock or fuse settings. Fuse settings have the potential to brick your chip, get them from a reliable source.

-F is a force option that disables the signature check. You should not use -F unless the chip you've indicated with -p is equivalent to your chip.

Hope that helps, I'm learning too!

I tried changinge the signature in the avrdude.conf to 0x14 and got the same error just with the '14' instead of '0F'. I then tried using the avrdude command line, which lead me to discover that it expected 1E 94 06 (which seems to be the code for the atmega168).

Does the fact that I'm trying to use a deumilinove with an atmega168 prevent this from working? The tutorial I linked in the OP says this:

Note that these techniques only work with the Arduino Duemilanove w/ an ATmega328, not the Arduino Uno (or older Arduino boards w/ an ATmega168).

I guess I had glanced over that initially.

I built the parallel programmer (luckily I still have a computer with a parallel port! - a WHS I made from an old computer) and got it working after changing the avrdude.conf. I got an error initially, and found that I had to plug the power into the arduino before connecting the parallel port.

Has anyone tried to burn any bootloader other than the standard arduino bootloader (version prior to OPTIBOOT) on to this atmega328-pu chip ?

Here are my results -

  1. Standard/Old Arduino Bootloader : WORKS (with signature mismatch issue)
  2. UNO/OPTIBOOT : WORKS (with signature mismatch issue, and Flash Amnesia)
  3. Modified Optiboot : Doesnt works - Issue uploading the sketch, getting the Protocol error uploading.
  4. ADABOOT : Doesnt works - Issue uploading the sketch, getting the Protocol error uploading.

where as the old chip ATMEGA328p-PU works perfectly with all the above bootloader variants.

Wondering, how different is this crazy chip from the old pieco version. :roll_eyes:

Kudos whomever discovered how to upload the bootloader to the Atmega328-PU with Arduino-22 by modifying the avrdude.conf file . . . works great for the standard bootloader (haven't tried any others).

Has anyone discovered how to modify another settings file to allow compiling and uploading of sketches to this chip via Arduino-22???

Has anyone discovered how to modify another settings file to allow compiling and uploading of sketches to this chip via Arduino-22???

Once you get a arduino bootloader installed onto a 328 non p chip, you will be able to compile and upload from the arduino IDE just by selecting one of the exisiting 328 boards in the IDE board select menu which is running at the specified clock speed. The bootloader effectivly fakes out by lying to AVRDUDE by telling it it's a 328p chip instead of being a 328 chip, as the bootloader doesn't actually read the chips signature bytes from the chip, but rather just sends the signature bytes for a 328p chip it has stored in it's code.

Lefty

retrolefty:

Has anyone discovered how to modify another settings file to allow compiling and uploading of sketches to this chip via Arduino-22???

Once you get a arduino bootloader installed onto a 328 non p chip, you will be able to compile and upload from the arduino IDE just by selecting one of the exisiting 328 boards in the IDE board select menu which is running at the specified clock speed. The bootloader effectivly fakes out by lying to AVRDUDE by telling it it's a 328p chip instead of being a 328 chip, as the bootloader doesn't actually read the chips signature bytes from the chip, but rather just sends the signature bytes for a 328p chip it has stored in it's code.
Lefty

Thanks, I am facing the same 328 issue. cant burn bootloader. Can you please tell me how to avoid the "read signature protocol."?