Pages: [1]   Go Down
Author Topic: ATtiny45 Yikes! Invalid device signature [SOLVED]  (Read 5535 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just wanted to post this, since I spent several hours trying to figure out what was going wrong. Maybe it will help someone else having the same problem. I was trying to program an ATtiny45 using an Arduino Uno as ISP, following the very nice instructions and schematics from here: http://hlt.media.mit.edu/?p=1695

It was the first time I was trying programming an ATtiny45 or using the Arduino as ISP, so I wasn't exactly sure what I was doing, but I tried to follow the instructions as close as possible.

I had four of those ATtiny45s. The first one I tried, was giving me an error with something like "stk500: couldn't find programmer", or something along those lines. Turned out I was blind and instead of connecting the jumper wire to Arduino pin 13 as I should have, I connected it to the GND pin right next to it. OK, so I put the wire in the correct pin, but then I got this:

Code:
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny45
avrdude.exe: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

I couldn't seem to get rid of it. The first line seemed to be harmless, according to my web searches, but the others weren't. All connections seemed to be fine, so I saw no reason for this error message. I switched to verbose output, I even tried running avrdude manually, using the -F option. That seemed to run, but the ATtiny45 wouldn't blink (I was trying it with the blink example, with pin changed from 13 to 0). No matter what I did, I couldn't make it work. I looked and looked in the internet, found a few mentions of similar problems, often with no solution at all, or with solutions that wouldn't work for me, or where not applicable (like threads about using the Leonardo, instead of the Uno). I seemed to be doing everything right, but it just wasn't working.

Then I decided to try another ATtiny45 chip. This one worked! So, I was led to the conclusion that my misplacing the pin 13 wire had somehow bricked my first ATTiny45. But then I tried loading a second, a bit more complicated sketch and I got the same invalid device signature error again. I tried loading the blink example again, same problem. I removed all wires and put them back on. Still the same problem. I thought that maybe somehow I bricked this one two.

Then I tried my 3rd ATtiny45. Blink example worked. My sketch loaded! But then it was behaving erratically. It wouldn't function at all like I programmed it to. Tried loading the blink example again and same error appeared. And it seemed like the ATtiny45 wouldn't work at all now, not even erratically. I couldn't believe it.

Then I tried my last ATtiny45. Same story. I thought that somehow I had bricked all four ATTiny45s I had. More web searches and a few hours later I didn't have a solution. I found one page that said that it is possible to disable the reset pin in the ATtiny45 and then in order to reprogram it, you'd need some fancy expensive equipment to unbrick it. Oops.

But then I thought to test the ATtiny45 pins for continuity with the wires connected to the arduino with a multimeter. And I got nothing, or even when I got something, it would come and go. Everything seemed to be in place and everything should have been  connected, but obviously it wasn't and the original error message seemed to be right on the spot, even if I was dismissing it.

After making absolutely certain everything was connected, but sticking the wires together with the ATtiny45 legs in the breadboard, everything worked. All four ATtiny45 chips worked and I could program them and my sketches would work as expected.

I'm attaching two pictures of how everything was connected, so you can get an idea. First one (worksnot.jpg) is how I originally had everything connected. It all looks fine, it should have worked, but the ATtiny45 isn't really connected. The second one (works.jpg) is how I stuck everything together and this is how it worked, consistently.

So, if you're having similar problems, my advice is: if something doesn't work, double and triple-check your connections. Even if they look right, they might not be. If you have a multimeter, use it for continuity tests.

Phew, I got this out of my system.  smiley-mr-green


* worksnot.jpg (69.2 KB, 640x480 - viewed 266 times.)

* works.jpg (68.11 KB, 640x480 - viewed 273 times.)
« Last Edit: March 06, 2013, 11:53:46 am by gapan » Logged

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 29
Posts: 588
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Time to toss out that breadboard and get a new one.  smiley-wink

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think it's a problem with the breadboard. If I plug wires or LEDs or anything else in the same places, they work fine. It's the ATtiny45 that doesn't fit in there properly and was causing all that trouble.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unless the leads were shortened they should fit as any other IC does The packaging is a standard format. Your breadboard might be a cheap one.. I don't know but I do know that it shouldn't be necessary to go as far as you did. As was previously commented:
Quote
Time to toss out that breadboard and get a new one. 
And the poster is right, the pins on cheap ones will spread... I've Never seen one "That Bad" before though...

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, it's the breadboard that comes with the Arduino starter kit. And other ICs don't fit that good in it either. They never did. If that means that the breadboard that comes with the starter kit is cheap, it might very well be. It's the first breadboard I ever saw, so I wouldn't know.
« Last Edit: March 06, 2013, 06:06:42 pm by gapan » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12858
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, it's the breadboard that comes with the Arduino starter kit.

This one?
http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=2&products_id=185
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the official one.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12858
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I believe an Arduino employee is active in the Arduino Starter Kit section.  Would you mind posting there about your experience with the breadboard?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, here: http://arduino.cc/forum/index.php/topic,152741.0.html

In the mean time, I have ordered a bunch of 8pin IC sockets.
Logged

Pages: [1]   Go Up
Jump to: