Pages: [1]   Go Down
Author Topic: Cannot use the ArduinoISP to program attiny85.  (Read 628 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 99
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4837
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are choosing the right target controller?
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4837
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4837
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4837
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Pages: [1]   Go Up
Jump to: