The other day, I came across some very inexpensive Atmega328 microcontrollers at Mouser. Considering I usually have 2 or 3 projects going at any one time I stocked up.
When they arrived and I tried to program for the first time, I got an error about an invalid signature.
avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATMEGA328P is 1E 95 14
Double check chip, or use -F to override this check.
Upon further research, I now realize that there are actually a couple different types of Atmega328 official site. The Atmega328P-PU and the Atmega328-PU.
I was relieved to find the fix was as simple as changing the signature in avrdude.conf.
In my case, I’m using Ubuntu so my avrdude.conf file is in the /etc directory.
sudo nano /etc/avrdude.conf
Once the file is open for editing, press the
CTRL key and
W key at the same time. This will prompt you for a search criteria. Enter
This will take you to the Atmega328P device entry. A few lines down you will see the following:
signature = 0x1e 0x95 0x14;
DO NOT delete this. Instead, put a
# symbol in front of it to comment it out.
Then add a new line with the following:
signature = 0x1e 0x95 0x0F;
X at the same time to save the file and exit.
avrdude then recognized the new part without a hitch.