Go Down

Topic: Cannot use the ArduinoISP to program attiny85. (Read 695 times) previous topic - next topic

Peter Davenport

I am trying to use my Arduino Duemilanove to program a Attiny 85 microcontroller. I am running Arduino on my Windows 7 Toshiba laptop. I have done this before with a DIP in Arduino version 0022 but cannot seem to get it to work now.
I followed this tutorial: http://hlt.media.mit.edu/?p=1706
I connected all the pins (PWR, GND, SCLK, MISO, etc...) to the appropriate arduino pins and to the attiny through a header on the board it is affixed to. I double checked all the connections but still cannot get the chip to program. I tried to program it from arduino 0022 and 1.0 but to no avail.

The ISP programming sketch uploads fine but when I try to upload the code to the attiny this is the error message I get Arduino 1.0:
Code: [Select]
Binary sketch size: 818 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


If someone could point me to a solution I would be greatly appreciative.
-Peter

GoForSmoke

You are choosing the right target controller?
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

kf2qd

There is a problem with the 1.0 version of the IDE, load ArduinoISP using the 0.22 version of the IDE and it should work just fine.

Someone else had documented this problem so when the ArduinoISP didn't work when loaded from 1.0 I brought up 22 and loaded it from there and it worked just fine.

Coding Badly


http://arduino.cc/forum/index.php/topic,87951.msg660665.html#msg660665

GoForSmoke

Still running 0022 here and after reading one thread I initialize the first global var to non-zero in case someone uses the sketch with 1.0.
Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Coding Badly

after reading one thread I initialize the first global var to non-zero in case someone uses the sketch with 1.0.


You did what?

GoForSmoke

There is a thread since the change (maybe in the last week now) where it was shown that if the first (or was it last?) global is initialized to zero, it either didn't make it into the hex file or didn't get passed to the chip. Non-zero is fine, zero gets left out. That much I understood.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Coding Badly


This thread?
http://arduino.cc/forum/index.php/topic,84243.0.html

GoForSmoke

That's the one and I see it's -1 and not 0 that's the problem and so far Nick's reply #68 is the best answer but as you noted still not air tight.

As for me, I keep using 0022. I just didn't want to make examples that don't work in 1.0.

Nick Gammon on multitasking Arduinos:
1) http://gammon.com.au/blink
2) http://gammon.com.au/serial
3) http://gammon.com.au/interrupts

Go Up