I've already uploaded the Arduino ISP sketch to the arduino Uno with no problems. After doing that the Board is defined as Attiny85 internal 8 MHz clock, programmer is Arduino as ISP.
The blink sketch is loaded and the led port is defined as 1. On the attiny the led is connected to port 0. (I'm doing this because the led was blinking when uploading the sketch and I needed to know if it was the sketch running or some boot stuff -> it was boot stuff).
Now I tested the sketch upload with 2 methods:
Just connecting arduino uno and pressing Upload sketch button
Connecting arduino uno, holding reset and just when "Binary sketch..." shows in the console I let the reset go.
The two methods return different errors (at least in the video but i'm trying to reproduce it right now with no success).
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
I've tried a lot of things, I've read a lot of tutorials but I can't solve this problem.. Help?
I've checked the wiring a lot of times and I don't see anything wrong..
EDIT: if you look at the capacitor you can see the stripe on the left side meaning the capacitor is reversed but it's only an illusion from the light and the negative side of the capacitor is connected to the ground
I had some trouble with the capacitor not connecting properly when plugged directly in the headers of the board. Moving it to the breadboard solved the problem.
Shpaget:
I had some trouble with the capacitor not connecting properly when plugged directly in the headers of the board. Moving it to the breadboard solved the problem.
yep, already did that with no success. the measurements I took in the last post were with the capacitor on the breadboard.
i bought the attiny85 from ebay and this is the first time i'm doing something with it.
i've read some stuff about clocking but I can't figure it out. i have a spare 32KHz crystal, I tried plugin it in the attiny external crystal pins (from the datasheet) but it didn't work. I know almost nothing about attiny and external crystals and fuses etc...
So please guide me, it must be the clock. My arduino is running the ArduinoISP sketch successfully (it is heartbeating in D9), everything is connect like it should to the attiny and I have a spare 32KHz crystal I can use (no 16MHz nor 20MHz..). What steps should I take using the crystal to get my attiny to work right at 8MHz with internal clock
Use this version of ArduinoISP... https://raw.github.com/adafruit/ArduinoISP/master/ArduinoISP.ino Don't forget to remove the capacitor when you upload the new ArduinoISP sketch and reconnect the capacitor after uploading. Don't forget to change the board setting before uploading.
Connect pin 9 on the programmer (your Uno) to XTAL1 / physical pin 2 on the target (ATtiny85).
Try to upload a sketch to the target. Don't forget to change the board setting to one of the ATtiny85 internal oscillator settings.
So I unplugged Uno, removed the capacitor, set the board as Arduino Uno, plugged Uno, uploaded the ArduinoISP sketch you provided, everything went fine, unplugged Uno again, connected capacitor, set board as ATtiny85 @ 1MHz (internal osc), plugged Uno, sent the blink sketch and freaking error again......
what if I told you that using the command line avrdude and the command -F to ignore the signature, it worked?
but it's too fast. the blinking is set to 1s but it's taking something like 1/4s to blink. and i still can't upload it correctly using the arduino program, it always gives me signature error
is there any way to correct the signature error? the fuses are set correctly but i still can't use the arduino software to send the sketches..
edit: and i can make it run at 1MHz but the timings are off (delay)
First step should always to be sticking LEDs on pins 7/8/9. From the ArduinoISP code:
// this provides a heartbeat on pin 9, so you can tell the software is running.
uint8_t hbval=128;
int8_t hbdelta=8;
void heartbeat() {
if (hbval > 192) hbdelta = -hbdelta;
if (hbval < 32) hbdelta = -hbdelta;
hbval += hbdelta;
analogWrite(LED_HB, hbval);
delay(20);
}
Now you'll know if you've actually got the ISP sketch running. Anything else is guesswork.