Invalid device signature for new atmega328p-au

I recently designed a board for an RGB project im building. I am using the atmega328p-au for the microcontroller, and designed the circuit attached below. I got the board printed and assembled, and I just have to burn the bootloader and upload the code. I grabbed my nano, and connected mosi to mosi, miso to miso, sck to sck, pin10 to rst, 5v to 5v, and ground to ground. I uploaded the arduino as isp example, and chose arduino as ISP. When I clicked burn bootloader, I get the following error message:

avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

Error while burning bootloader.

I've searched around and could not find anything helpful. Is there something im not doing, or forgetting, or is my chip bad?

Update:
changed the signature for the ATMEGA328 to
signature = 0x0F 0xt0 0x14;
in avrdude.conf. Same error

aubrey_champagne99:
rst to rst

This is wrong. You need to connect pin 10 on the Nano to reset on the target ATmega328P.

To burn bootloader to a Atmega328 au with a Arduino Nano, you should follow these steps -

  1. Upload the ArduinoISP Example Stetch to your Nano first.

  2. Connect the pins in the following ways-
    Nano - Atmega328AU
    5V - 5V
    GND - GND
    D13 - D13
    D12 - D12
    D11 - D11
    D10 - RESET

  3. Connect Nano to PC. Open Arduino IDE. Select Arduino Nano as board. Double check all connections. And then, click on burn bootloader.

  4. If you receive any error, then take a photo of it and post here.

..Arnav

1 Like

ArnavPawarAA:
3. Connect Nano to PC. Open Arduino IDE. Select Arduino Nano as board. Double check all connections. And then, click on burn bootloader.

The board you have selected when you do the "Burn Bootloader" process determines how the configuration fuses will be set on the target microcontroller and which bootloader is flashed to it. The Arduino Nano board definition sets the configuration fuses for a 2 kB boot section, leaving you with 30 kB of flash memory for your program. The Arduino Uno's board definition sets the boot section to 0.5 kB, leaving you with 31.5 kB of flash for your program. There is no downside to using the Uno board definition instead of the Nano board definition, so you get 1.5 kB of free flash memory by doing this simple thing. In order to actually have access to that 1.5 kB, you should remember to always select Tools > Board > Arduino Uno when using that ATmega328P from then on.

pert:
The board you have selected when you do the "Burn Bootloader" process determines how the configuration fuses will be set on the target microcontroller and which bootloader is flashed to it. The Arduino Nano board definition sets the configuration fuses for a 2 kB boot section, leaving you with 30 kB of flash memory for your program. The Arduino Uno's board definition sets the boot section to 0.5 kB, leaving you with 31.5 kB of flash for your program. There is no downside to using the Uno board definition instead of the Nano board definition, so you get 1.5 kB of free flash memory by doing this simple thing. In order to actually have access to that 1.5 kB, you should remember to always select Tools > Board > Arduino Uno when using that ATmega328P from then on.

The Arduino Nano has Atmega328P AU chip on it, and the Uno has the PU chip. There is a difference between them that there are slightly more pins on the AU chip than the PU chip. The Nano's bootloader is the right bootloader for that AU chip the OP is using. If flashed with the wrong bootloader, then the chip might end up with a malfunction - and you know how hard it is to repair it. The Arduino Nano board should be selected while burning bootloader because it matches the right chip.

..Arnav

ArnavPawarAA:
The Arduino Nano has Atmega328P AU chip on it, and the Uno has the PU chip. There is a difference between them that there are slightly more pins on the AU chip than the PU chip. The Nano's bootloader is the right bootloader for that AU chip the OP is using. If flashed with the wrong bootloader, then the chip might end up with a malfunction - and you know how hard it is to repair it. The Arduino Nano board should be selected while burning bootloader because it matches the right chip.

This is incorrect. The only difference between the two parts is the IC package. The silicon inside the package is identical. The same bootloader and fuse settings are fine for either package.

pert:
This is incorrect. The only difference between the two parts is the IC package. The silicon inside the package is identical. The same bootloader and fuse settings are fine for either package.

Ok, but how are you going to get more flash memory than normal on the AU chip? The flash memory limit is a limit. How are you going to get more out of it? It is like a virtual memory that doesn't exist.

If you can get more flash memory with the Uno bootloader, then please tell why the original bootloader specially designed for that AU chip has less flash memory? That original bootloader should be better than any other, if you use it on the chip. Then why didn't the developers decrease the bootloader size?

..Arnav

ArnavPawarAA:
Ok, but how are you going to get more flash memory than normal on the AU chip? The flash memory limit is a limit. How are you going to get more out of it? It is like a virtual memory that doesn't exist.

The total flash memory is a limit. The ATmega328P always has 32 kB of flash memory. However, if you want to use a bootloader, then you need to reserve a special section of the flash for the bootloader. That section is subtracted from the total amount of flash memory available for your sketch program to use. There are several sizes of boot section you can select using the high fuse. The Uno's board definition sets the high fuse to 0xDE:

uno.bootloader.high_fuses=0xDE

which results in a boot section size of 0.5 kB (note that there are two bytes per word):

The Optiboot bootloader used by the Uno fits in this 0.5 kB boot section
Note that the Uno's board definition is configured to allow a maximum sketch size of 31.5 kB:

uno.upload.maximum_size=32256

The Nano's board definition sets to high fuse to 0xDA:

nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA

which results in a boot section size of 2 kB:

Note that the Nano's board definition is configured to allow a maximum sketch size of 30 kB:

nano.menu.cpu.atmega328.upload.maximum_size=30720

ArnavPawarAA:
the original bootloader specially designed for that AU chip

What makes you think it was specially designed for the "AU" chip?

ArnavPawarAA:
That original bootloader should be better than any other, if you use it on the chip.

Actually, the Nano's original bootloader was horrible compared to the Optiboot bootloader of the Uno. It required a 2 kB boot section and had a bug that caused it to go into an endless reset loop after a watchdog reset. This is why Arduino switched to using the Optiboot bootloader on the official Nano boards in 2018. You can see that the same bootloader file is used on both the Uno and the Nano:

uno.bootloader.file=optiboot/optiboot_atmega328.hex
nano.menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328.hex

ArnavPawarAA:
Then why didn't the developers decrease the bootloader size?

They forgot to do it:

ArnavPawarAA:
4. If you receive any error, then take a photo of it and post here.

NO!

How many more times do you need to be told?

Do NOT post pictures of text, just post all the text.

Per, allow moderation rules to ban a user which permanently gives wrong advice?

Juraj:
Per, allow moderation rules to ban a user which permanently gives wrong advice?

Please tell me the wrong advice I gave. As for this topic, I gave the right advice, and pert gave a "better" advice than me. But what was wrong in my advice? If you are referring to any other thread, then please tell.

..Arnav

ArnavPawarAA:
Please tell me the wrong advice I gave. As for this topic, I gave the right advice, and pert gave a "better" advice than me. But what was wrong in my advice? If you are referring to any other thread, then please tell.

..Arnav

See reply #8

Also this

ArnavPawarAA:
The Arduino Nano has Atmega328P AU chip on it, and the Uno has the PU chip

The information is correct, but the inference incorrect

@aubrey_champagne99,
Your design needs some 0.1uF, or 100nF, caps from 5V (clean_power) to Gnd on the VCC and AVCC pins.
If you are planning on doing any analog reads, than another 0.1uF cap from Aref to Gnd is also recommended.

TheMemberFormerlyKnownAsAWOL:
Also this The information is correct, but the inference incorrect

Please refer what is the inference, and how it is incorrect.

.. Arnav

The inference is that they are different devices; the truth is that they both have the same die.

You are making statements that you are not competent or qualified to make. You must recognise this. (I would also remind you of your recent matrix keypad responses)

So did I input the wrong device signature? also, I got the board already assembled, but is there any way to check if the chip is bad or not.

update:
Also I ordered more than one preassembled board. I tried flashing the boot loader to that, same error. Is my board wrong, or is it how i'm trying to flash it?

aubrey_champagne99:
update:
Also I ordered more than one preassembled board. I tried flashing the boot loader to that, same error. Is my board wrong, or is it how i'm trying to flash it?

Ok, please tell in detail how you tried to burn the bootloader, and also show the error verbose output. So we can figure it out.

.. Arnav

aubrey_champagne99:
So did I input the wrong device signature?

Yes. The original signature in avrdude.conf is correct. You should not change it.

We need the output @ArnavPawarAA requested in order to see which signature avrdude is reading.

aubrey_champagne99:
Is my board wrong, or is it how i'm trying to flash it?

Just to be sure, since we got off on a tangent after that, did you ever fix this:

pert:
This is wrong. You need to connect pin 10 on the Nano to reset on the target ATmega328P.

So I just tried burning the bootloader after enabling verbose on upload, and it worked. I have no idea why.
To answer some of your responses: yes I connected rst to 10.
I would post the verbose output, but it exceeds the character limit.

Maybe my reset was messed up, but other than that and the verbose, nothing was changed.

I'm glad to hear it's working now. Thanks for taking the time to post an update. Enjoy!