Burn Arduino Bootloader to an ATmega328 (Not ATmega328P)

Fix AVRDude error when flashing arduino bootloader to a new ATMega328

TL;DR

If you have a ATmega 328 or 328-PU and encounter an error while trying to burn the Arduino Bootloader, find avrdude.conf somewhere in the Arduino IDE install folder and replace all instances of "0x1e 0x95 0x0F" with "0x1e 0x95 0x14" Save and Burn Bootloader! This issue does not affect the ATmega 328P or 328P-PU.

Preface

If you're like me and purchased an ATmega328 instead of an ATmega328P off digikey or similar websites, you've probably come across this error while trying to flash the Arduino Bootloader to it:

avrdude: Expected signature for ATmega328p is 1E 95 0F
Double check chip, or use -F to override this check.
Error while burning bootloader.

The reason for this error is because Arduinos actually ship with a slightly different chip, the ATmega 328P. The "P" after 328 is important because chips without the "P" have a different signature.

Note that this applies to 328 and 328-PU. The dash is important. 328P and 328P-PU are not affected by this issue. If you have a 328P or 328P-PU, double check your wiring, and that you setup the boards correctly for flashing. If you are sure you have your wiring correct, either your ISP is setup incorrectly, you forgot to flash the ArduinoISP sketch to the donor board, or the ATmega is dead.

How to fix this:

In order to fix this, we need to edit the signature that avrdude checks against from the signature of the 328p to the 328.

To do this we need to edit avrdude.conf, which is located at:

C:\Program Files (x86)\Arduino\hardware\tools\avr\etc          (Windows)

Linux install location will vary based on install method and distro, google it.

I recommend you make a backup of avrdude.conf before continuing.

Next we need to find the signature. Begin by opening avrdude.conf in your favorite code editor. Now we need to control-f and search for "0x1e 0x95 0x14" (no quotes).

 Our first result will look like the following.

signature        = 0x1e 0x95 0x0F;

We need to change "0x0F" to "0x14":

signature        = 0x1e 0x95 0x14;

Perfect, now we need to search for the next instance where this signature shows up. There should be two in total. As with the first result, we edit the second result from "0x0F" to "0x14". What the two changes should look like:

Save the file. Burning the Arduino Bootloader should now work!

The Catch

Know that this edit has a catch. Any arduinos that use the original 328P/328P-PU part will stop working, because now their signature will mismatch. To use those parts, you'll need to revert the edit to the avrdude.conf

Alternatively, which is probably a better solution if possible, is to just buy the correct 328P/328P-PU part. By running the correct part you don't need to swap chips or edit config files every time you switch boards. I have not tested it yet, but this edit may affect boards like the arduino nano that use the SMT/SMD version of the 328P.

Additionally, the "P" in 328P means the ATmega is the PicoPower version. This version has lower power draw than the 328 non-P part, which makes it better for projects that will run on battery or solar panels.

Identifying The Chips:

ATMega328P/ATMega328P-PU

This is the version that comes preinstalled on Arduino Uno boards.

ATMega328/ATMega328-PU

This is the version you probably purchased off Digikey or Mouser or some other supplier website. Here it is pictured on a breadboard to be flashed:

Board Flashing Schematic:

Finally, here is a diagram of how to wire up your boards for flashing. More information can be found on the Arduino Website Here.

Back To Top