Attiny85 programming failing - Invalid device signature

I'm trying to program an Attiny85 using an Arduino Uno, but no luck...

With 1.0, following http://hlt.media.mit.edu/?p=1695: Used arduino isp sketch from here: https://github.com/arduino/Arduino/blob/master/build/shared/examples/ArduinoISP/ArduinoISP.ino Attiny definitions from here: https://github.com/damellis/attiny/zipball/Arduino1 Tried fixing baud rate from 19200 to 9600 as described here: https://github.com/arduino/Arduino/commit/80a2154279a02fd69f995ef6ff9eb889363c73ca

Sketch uploads ok unto the Uno, but when I try burning the tiny's bootloader (8Mhz internal osc)...

I get this "avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check."

First one is dismissable, second one no... I read somewhere that it might be the UNo's reset that isn't being correctly prevented, and the programmer is trying to burn the bootloader unto the 328, hence the signature problem, but I tried with and without a 10uF capacitor between RESET and GND (and even a 100uF), but nothing...

Tried doing the programming with 0.22 (http://hlt.media.mit.edu/?p=1229) instead of 1.0 (both the arduino isp uploading and attiny bootloader burning) with provided attiny defs. Same error message...

Weird thing is some months ago I tested programming the same chip and managed to get it to work by uploading the Arduino ISP sketch with 0.22, and then burning the bootloader. Going back to 1.0 worked fine. Now I get the same error message on either version (0.22 or 1.0). Checked and double checked all the connections, changed jumper cables, nothing...

If you turn on verbose output you will get to see the value of the received signature. If it matches the ATmega328P then you are accidentally resetting the UNO. If it is all 0's or all FF's you have an incorrect connection on the target processor.

I'm getting either "Device signature = 0x000000" or "Device signature = 0xffffff". Alternates when I re-connect the reset jumper on the tiny... Changed all jumper cables again, but nothing changes...

Fried tiny? (hopefully no, as it's really hard to find them here in Portugal)

Sounds like one or more of the six connections to the ATtiny are misplaced or broken.

D10 -> Pin 1 (Reset) Gnd -> Pin 4 D11 -> Pin 5 (MOSI) D12 -> Pin 6 (MISO) D13 -> Pin 7 (SCK) +5V -> Pin 8

That is (unfortunately) exactly how I have it connected... Since I changed all the jumper wires twice, and tested all the wires before the last switch, I'm kinda stumped on this one...

Arduino pins are all ok (tested input and output with blink and pushbutton sketches for each one), so my only guess is the tiny isn't working... =(

Damaged / defective jumper wire?

Has the ATtiny85 ever been programmed or is it fresh from the factory?

I programmed it some months ago, to test, and succesfully burned the bootloader and uploaded blink sketch.

Well, I might as well change jumpers again, but I tested them this last time I switched. I'll test and leave some feedback here.

johnwasser: If you turn on verbose output you will get to see the value of the received signature.

How do you turn on verbose output?

In preferences. You can turn verbose "on" for both compiling and uploading.

Ishkur: I programmed it some months ago, to test, and succesfully burned the bootloader and uploaded blink sketch.

Any possibility it has been set to use an external crystal / oscillator?

Actually now that you say it, that might be a possibility. I had a 16Mhz crystal lying around at the time, so it's possible I tried to set it to run with an external oscillator. Didn't think of that. Anyway, even if i thought about it I would never have thought it'd be a necessity to connect it to reprogram it... (noob)

ISP programming requies a processor clock. If the processor is configured to run from an internal oscillator then nothing special is needed for programming. If the processor is configured for something else than a clock signal has to be present on the XTAL1 pin for programming.

I believe LadyAda has published an ArduinoISP version that outputs a "recovery clock".

So in theory if I re-connect a crystal like I did back when i programmed it, I should be able to re-program it to use the internal clock?

Yes.

Aaaaaand it works. Connected a crystal and capacitators and burned bootloader ok. Removed Crystal, uploaded blink sketch ok and all is working.

Awesome, thank you all very much!!

I apologize for revisiting this older post, but my issue is the exact one described here. I am "shrinkifying" my Arduino project using an ATTiny85-20pu-nd. I first tried the Configuring the ATtiny to run at 8 MHz from http://hlt.media.mit.edu/?p=1695, and then thought maybe since it's the 20pu version, I should use the ATTiny (external 20 Mhz clock) board configuration in the IDE. So then I burned the bootloader, with Arduino as ISP, using the external clock. From that point forward, I would get the Yikes! Invalid Device Signature error as described by original post. From there, I found this thread, and now have a question: without having a crystal (or even knowing how to use one if I did), is there a way to recover that chip? I have 4 more to use, and successfully got one of the spares going, but it would be nice to see if I can undo my mess-up.

As a side question, for my successful chip, I did not burn the bootloader. Instead, I simply chose the Internal 1 Mhz clock, and it worked. What is the difference between 1 and 8 Mhz, and which should I use?

Next question (probably should be in a new post): to power the ATTiny85, I am using a 9V battery. This, as most of you probably know, is way too much for the chip, which I did not even think of before connecting it. I used the Blink LED example to test out my setup, but the LED would just stay on. I placed a 220 ohm resistor between pin 0 and the positive leg, and it made it blink once, but then stayed on. I then placed another 220 ohm resistor between the positive of my 9V and VCC(+) of the ATTiny85 and it worked. Am I going about this the correct way, or will I eventually damage the chip? Should I use a AA battery instead?

Thank you!

benmctee:
From there, I found this thread, and now have a question: without having a crystal (or even knowing how to use one if I did), is there a way to recover that chip?

Yes. You will need to provide a clock signal (I like 1 MHz) on the XTAL1 pin. LadyAda has published a version of ArduinoISP that outputs an appropriate clock signal. I believe Nick Gammon also has something that will help. If you cannot find what you need after searching, report back and I’ll provide you with a solution.

As a side question, for my successful chip, I did not burn the bootloader. Instead, I simply chose the Internal 1 Mhz clock, and it worked. What is the difference between 1 and 8 Mhz,

Approximately 8 million instructions per second versus 1 million instructions per second.

and which should I use?

1 MHz is generally a better choice for battery powered applications otherwise just go with 8 MHz.

Next question (probably should be in a new post): to power the ATTiny85, I am using a 9V battery.

Directly?

This, as most of you probably know, is way too much for the chip, which I did not even think of before connecting it.

I’ll assume that was a “yes”. Unless you like buying processors you should not do that again.

Am I going about this the correct way, or will I eventually damage the chip?

Eventually? You have already damaged the processor.

Should I use a AA battery instead?

I typically use two AA alkaline batteries and configure the processor for 1 MHz for battery powered projects.

Thank you for your response! I'll forego attempting to recover the processor since I've already caused damage to it with the 9V (yes, directly), but having the LadyAda info will be good for future use.

So using the 9V with a resistor in between it and the VCC(+) leg is not advisable as well then?

The tiny85 (nor any microcontroller) will not draw a constant current from the VCC pin What happens if you turn an LED on? the uC draws more current). If the current increases, more voltage will be dropped across the resistor in series with VCC (ohms law, V=IR), and thus the voltage at VCC will drop - possibly causing the uC to reset or brown out. Conversely, what happens if you turn an LED off, or put the uC to sleep? Less current will be drawn, and less voltage dropped across the resistor, and suddely you could have 6 or 7 or 8 or 9 volts across the IC and blow it up.

You need a proper voltage regulator.

Hi As far as I undestood, Ishkur faced a problem trying to reprogram his ATtiny85 since there was an external oscillator connected to it the first time he tried to program this microcontroller. So he could solve it re-connecting the oscillator and running the bootloader again. Am I right?

My problem is that I'm facing the same error: "avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 avrdude: Yikes! Invalid device signature. * Double check connections and try again, or use -F to override* * this check."*

But in my case, it's the first time I try to program the ATtiny85. I've followed all the procedures described here: http://hlt.media.mit.edu/?p=1695 And I can't burn any bootloader nor any sketch to the ATtiny85. Does somebody know how could I solve it? Thank you in advance!!