avrdude: Yikes! Invalid device signature.

Hi
I have arduino Nano which I want to flush and have the Uno's firm ware running on it (I need the watchdog). I am using another Uno board as ISP programmer. This is what I am doing exactly:

1- Had the ArduinoISP example loaded onto the Uno bard.
2- Had the port selected of the Uno and the programmer type to "Arduino as ISP".
3- I used pretty much the standard wiring between the two devices:


4- I am plugging only the Uno to the usb port (the nano is being powered by the UNO).
5- I hit burn bootloader and I am getting this:

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

Error while burning bootloader.

I am using windows 7 machine and 1.6.4 arduino IDE.
What is wrong with this set up and what is it that I am missing?

Thx in advance.

Turn on verbose uploads, so you see what signature it reads. All 0s out all 1s indicates wiring problem, or target device is set to use a crystal but isn't connected to one (which renders it inoperative)

That wiring is rather cumbersome - which means it is easy to make a mistake..

Easier to use Nick Gammon's (or not necessarily his) programming cable:

"Paul__B", thank you for your reply, I followed the wiring scheme that you recommended and now I am getting:
" avrdude: stk500_recv(): programmer is not responding". Do I need to place a 120 ohms resistor or some capacitor between the reset and the ground? (I have seen that in some tutorials).
"Dr Azzy", I was about to enable the verbose mode but I got a different error now.

Thx again guys.

1 Like

Yeah, you need a cap between reset and ground on the arduino used as the programmer, 10uF is the standard recommended value here, but anything a couple uF or larger will work. It's there to clobber the auto-reset, which otherwise would reset the board when you try to use it to program the chip (autoreset on opening serial connection), and isn't through the bootloader in time for when AVRDude expects to be able to communicate with it to program the bootloader.

Still same problem, I connected 22 uF capacitor between the ground and the reset pin. Still getting the same error + a new line of info:

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03

Any idea?

Go into preferences and check show verbose output during upload. Burn the bootloader. Show us the full output, including error messages and everything else. Also please post a clear photo of your wiring between the 2 Arduinos.

As for the wiring I have exactly the exact wiring posted on Gammon's website:

Arduino Uno Target Uno

D10 (SS) Reset
D11 (MOSI) D11
D12 (MISO) D12
D13 (SCK) D13

Gnd Gnd
+5V +5V

I also had a 22 uF capacitor between reset and ground, but with no luck.

As for the verbose output:

Arduino: 1.6.4 (Windows 7), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM23 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 



avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

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

         Copyright (c) 2007-2009 Joerg Wunsch



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



         Using Port                    : COM23

         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



Error while burning bootloader.

avrdude: stk500_recv(): programmer is not responding

Shall I try to change the baudrate from 19200 to 9600 or that was an old issue and it got fixed?

And that cap is between reset and ground on the programming uno, not the target? After you uploaded the ArduinoAsISP sketch to it?

The Uno is the programmer and the Nano is the target one. Yes I uploaded the ISP example to the Uno then I connected the capacitor and the other board.

Is this a working Nano, and all you are trying to do is upgrade the bootloader?
What do the LEDs on the Nano show during the process of burning the bootloader?
Do you have another device such as another Nano or Uno that you can burn the bootloader to in order to test the programmer?
Have you made any changes to files in the Arduino IDE installation such as programmers.txt, platform.txt, etc. or is it stock?
What are the various things you have selected on the Tools menu?

And are you choosing the port of the Uno?

Is this a working Nano, and all you are trying to do is upgrade the bootloader?
Yes It is a working nano, and I am trying to have Uno's bootloader running on it.

What do the LEDs on the Nano show during the process of burning the bootloader?
They show nothing, just the power is turning red.

Do you have another device such as another Nano or Uno that you can burn the bootloader to in order to test the programmer?
Yes I have another nano, and I will try to use it as the programmer and see if the problem is with th Uno itself

Have you made any changes to files in the Arduino IDE installation such as programmers.txt, platform.txt, etc. or is it stock?
No, I didn't alter any files.

What are the various things you have selected on the Tools menu?
Programmer: Arduino as ISP
Board: Arduino Uno (I choose this because I wan the optiboot installed on the target nano device.
Then I hit burnbootloader.
Uno's Com port is also selected.

I have just about run out of ideas. I just now burned the Uno bootloader on my Nano using the same wiring and procedure. I suppose if I were in your shoes I would change out all the dupont wires you have there to make sure none of them are the culprit. And I would upload a sketch onto both the Uno and the Nano which "blink" pins 10 through 13 and attach an external LED with resistor to each pin to make sure each pin works. Pin 13 on your Nano appears bent or the orange wire you have leading to it appears out of whack, is that just the way it appears in the photo?

Note, after verifying the pins work, upload the ArduinoISP sketch to the Uno and upload the bare minimum (do nothing sketch which loads when you first launch the IDE) on to the Nano BEFORE reconnecting for ISP programming. That will prevent bus contention.

"dmjlambert ", thank you very much for taking time to delve with me into this problem. I will follow your instructions and report back.

Thx again.

dmjlambert:
Note, after verifying the pins work, upload the ArduinoISP sketch to the Uno and upload the bare minimum (do nothing sketch which loads when you first launch the IDE) on to the Nano BEFORE reconnecting for ISP programming. That will prevent bus contention.

I don't know which one of your steps exactly did the trick but I did as you said:

1- I changed the wires.
2- Flushed the Nano with the nothing sketch.
3- ReUploaded the ISP sketch on the UNO.
4- THIS TIME IT WORKED.

By the way, I just tested the old wires that I used to make the connections and they work just fine. I guess it is the "nothing sketch" is the one which did the trick. When I was encountering that error the Nano was running the "Blink sketch".

Hey, that is good news. What luck! I had a look at the ArduinoISP sketch to see what the potential is for contention on the wires, and it looks to me like there is only potential for about 50ms of contention when pin 10 is brought high and other pins are set for output and 50ms goes by before pin 10 is brought low. That doesn't sound like enough time to cause trouble considering how tough these ATmega chips are. So that was probably not the problem after all. Sometimes these things just have to be a mystery.

I would like to believe it was the "nothing sketch" that did the trick, otherwise I will be clueless about what really happened over the last two days.

Thx again for all the help man, really appreciate it.
Mike.

Iḿ trying to upload a sketch to an avr "virgim" chip "atmega328p". I already tested with other board ie. arduino nano and itś worked well. I tryed bootloader with arduino as isp programmer without success...wire connection is checked... signature is" avrdude: Yikes! Invalid device signature." How can I validate the signature of this chip? some idea... ? thanks