0

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

  • 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 '16 at 15:19
  • There are two easy ways than that Method 1 - Using Atmel Studio Click-here Method 2 - Without Atmel Studio Click-here I Did using method 2 successfully .For method 2 if your are using Atmel Studio 7.0you need AVRISP MKII firmware 1.18 Download-Here If above webpages not available you can get those in PDF format below from my google driv – Seyon Seyon Jan 8 '18 at 10:34
1

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.

  • 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 '16 at 15:59
0

More than a year down the road, I learned a few things, and I am answering my own question so that if anyone faces the problem I faced (and I know how stressful it is) can give this a go. It may help.

One of the most interesting things I have learned is Mr. Nick Gammon's (Someone have actually called him Mr. Arduino) wonderful collection of sketches designed to do exactly this sort of thing.

If you ever need to find out what is the signature of your ATMega328 (or any arduino micro controller chip for this matter, visit this site.

The main reason I asked the question was to "un-brick" my ATMega328s, and I have actually done some thing wrong that to this day I can not figure out that resulted in 4 chips giving the error in the question. Just when I was about to give up, I found this link from Mr Gammon's website which sorted out the problem in 3 out of the 4 ATMegas, the fourth I am keeping to test a high voltage programmer in the future.

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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