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:
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
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.