Invalid Device signature = 0x000000

Hi dear forum.
I am getting this error every time I try to run a program on an atmega328p, using an Arduino Mega as the programmer with SPI connections.
I tried burning the bootloader, and also making a blink, but in both cases i get the same error.
My connections are the following:

I followed this tutorial:

I configure it so that it used the internal oscillator of 8mHz of the atmega. But I also tried it with an external crystal and two 22pF capacitors, and change the atmega in case it was that the problem. None of it worked.
If anyone had any idea on how to solve this is very welcome.

Have you attached the required capacitor with a value of 10 microfarads between the RESET pin of the MEGA2560 and GND on the Mega? Without this capacitor, the MEGA2560 does a reset if you want to flash something in the Atmega328 and interrupts the connection to the Atmega328. As a result, reading of the processor signature then fails.

You need to connect the 328p RESET pin to the "programmer" SS pin (well, it's not really SS; it's just a GPIO pin. pin 10 on an Uno; I'm not sure whether it's 53 on a Mega, or still 10.)

Thanks for the answer. I will try it. I didn't have anything connected beetween RESET of mega(pin 10) and pin 1 of atmega328.

The example I ran of ArduinoISP says that pin 10 is used as the RESET pin. So, I don't believe that is the problem.

the RESET of the device you want to burn/program (pin 1 of the 328) MUST be connected to the proper GPIO (D10) of the board you are using as a programmer (the pin configured as RESET in the ArduinoISP sketch.)
(This is how programming works - essentially, when RESET of the device is low, it becomes an SPI Slave capable of receiving ISP commands.)

1 Like

Sorry, I didn't express well. I have those two pins connected, but I don't have a capacitor inbetween them.

Can you repost the connection table from your first post, with the connections that you actually have, currently?

connections

That looks like it should be correct. You can and probably should disconnect SS, because it's not needed, but I don't think it should bother anything.

You're still getting exactly the same errors?

well, I tried putting an electrolytic capacitor and I still get the same error

I tried disconnecting it and I still get the same result.

Here the complete error message when uploading:

Arduino: 1.8.16 (Windows 10), Board: "ATmega328, ATmega328P, 8 MHz (internal), B.O.D. Enabled (4.3V)"

Sketch uses 1036 bytes (3%) of program storage space. Maximum is 32768 bytes.

Global variables use 19 bytes (0%) of dynamic memory, leaving 2029 bytes for local variables. Maximum is 2048 bytes.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM11 -b19200 -Uflash:w:C:\Users\Abril\AppData\Local\Temp\arduino_build_607288/sketch_nov06b.ino.hex:i

avrdude: Version 6.3-20190619

     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

     Copyright (c) 2007-2014 Joerg Wunsch



     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"



     Using Port                    : COM11

     Using Programmer              : stk500v1

     Overriding Baud Rate          : 19200

     AVR Part                      : ATmega328P

     Chip Erase delay              : 9000 us

     PAGEL                         : PD7

     BS2                           : PC2

     RESET disposition             : dedicated

     RETRY pulse                   : SCK

     serial program mode           : yes

     parallel program mode         : yes

     Timeout                       : 200

     StabDelay                     : 100

     CmdexeDelay                   : 25

     SyncLoops                     : 32

     ByteDelay                     : 0

     PollIndex                     : 3

     PollValue                     : 0x53

     Memory Detail                 :



                              Block Poll               Page                       Polled

       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

       eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff

       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff

       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00



     Programmer Type : STK500

     Description     : Atmel STK500 Version 1.x firmware

     Hardware Version: 2

     Firmware Version: 1.18

     Topcard         : Unknown

     Vtarget         : 0.0 V

     Varef           : 0.0 V

     Oscillator      : Off

     SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000

avrdude: Yikes! Invalid device signature.

     Double check connections and try again, or use -F to override

     this check.

avrdude done. Thank you.

An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Hi, I have the same problem as you. Have you managed to solve it? I' ve also seen this article : avrdude: Device signature = 0x000000

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.