Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Good day.

I have successfully built and tested an Arduino-on-breadboard about 2 days ago.

The device is rather straight forward, I have added a voltage divider and an LED to indicate power.

The schematics are as follows: enter image description here

And this is a picture of the actual board: enter image description here

I am using an ATMega328P-PU as a Microcontroller chip.

I uploaded quite a few sketches on the board and all seemed to work well. I was trying to upload a sketch yesterday but I got: "avrdude: Yikes! invalid device signature".

I rebooted the computer, rebuilt the entire board again, and tried once again to load a sketch using Arduino as ISP. The message changed again to:

avrdude: Expected signature for ATmega328P is 1E 95 0F Double check chip, or use -F to override this check. Wrong microcontroller found. Did you select the right board from the Tools > Board menu?

I did a search online and I have found many forums suggesting that I change the avrdude.conf file parameters to different signatures "Although these are mainly targeted at people using ATMega328-PU, not ATMega328P-PU" but this also did not help.

I tried burning the bootloader again but I still get the same error message.

I tried to find a way to "retrieve" the chip signature, but I didn't.

I know that there is a chance that I have bricked the chip somehow, but how do I know for sure? and is there anyway that one can use and Arduino as a tool to retrieve the chip signature or verify if the chip itself is dead?

Thank You

share|improve this question
    
In the arduino setting enable verbose output. After that the device signature should be visible, along with a whole lot of other information, when you try to upload. – Gerben May 1 at 15:19
    
@Gerben: Thanks! This helped. – MDChaara May 1 at 16:00
up vote 1 down vote accepted

There is a nice explanation here about Atmel chip signatures.

It sounds like you already know this, so for others looking for help:

It says that there are different signatures in the Atmel chips you mention. That you can over ride the Avrdude program using an "-F" switch. Or you can change the Avrdude configurations to use the "other" Atmel chip (however, the consequences if any were unknown by the author).

This may be an obvious step, but double check to make sure the IDE's target board settings are correct.

You may also want to check the communications between the programmer and the target. You might look into dropping the speed. But the better way is to scope the lines to see if data is being sent to the target and if the target is talking back. From that you can infer if the problems is a bad connection or if the chip has been damaged.

If you want to dig further using software tools you could look into driving Avrdude for your self. There is a easy to read tutorial here and what appears to be an everything you wanted to know and more document here.

In the 1st tutorial (from ladyada.net) we see a test which they purposely try the wrong signature:

Just for kicks try running this command avrdude -c usbtiny -p atmega8 -U flash:w:test_leds.hex

enter image description here

You'll see that it stops at step 2, once the signature is different than the expected one it stops. This is because code that is compiled for an attiny2313 wont run on an atmega8 (this is true of most microcontrollers, the .hex files are not cross compatible)

But more interestingly, Avrdude prints out the signature read back from the target! So, if you run the same test, you could tell if Avrdude is able to communicate at all with the target. That is, you may see all zeros or all ones or even an alternate message from Avrdude. Which could be an indication that the target is not talking.

share|improve this answer
    
Thank you for the detailed answer. I have accepted the answer as it did point me to some very interesting findings. One of the findings is the fact that even a "Briked" ATMEGA328P-PU or any AVR chip for this matter can have it's "Virginity" restored according to This Post – MDChaara May 1 at 15:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.