Pages: 1 [2] 3   Go Down
Author Topic: problem programming Attiny85 with UNO  (Read 11706 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was able to burn the bootloader (for 8MHZ option) using the method of holding the reset button, as described here:
http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

However, I cannot upload the Blink example after that. I have first upload again the ArduinoISP sketch...

error=
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync

If I am quick enough for setting 8Mhz... it is very strange it does not work for the Blink example...

I feel extremely tired....

More tomorrow..
« Last Edit: December 21, 2011, 06:24:03 pm by ProfePaco » Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why don't you add an 120R resistor between reset and +5V or a capacitor between reset and GND ?
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why don't you add an 120R resistor between reset and +5V or a capacitor between reset and GND ?

As I posted before, I have add a capacitor, remove it, with no success. I will try resistor.

As a curiosity, when i plug the capacitor, and the board is powered, the board resets itself...  smiley-eek
Logged

Rural Ozarka
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Priest of the Screaming Electron
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What I found to work, 10k resistor between attiny RST and +v AND 22nF cap between attiny RST and Arduino reset pin. No modification/parts added to arduino. Don't remember where I found these instructions. Let us know.
Logged

Entrepreneurship, Arduino, Ham Radio & General Wannabe Hackery

http://insapio.com/
Twtr: @mltd_alexander

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I found to work, 10k resistor between attiny RST and +v AND 22nF cap between attiny RST and Arduino reset pin. No modification/parts added to arduino. Don't remember where I found these instructions. Let us know.

I have used your method. It does not work  smiley-confuse

I have used a 120K resistor.... it does not work....   smiley-cry

What i can do is burning the bootloader to have 8MHz option. I can do this with the 120 resistor, or holding the reset button.

Why can I set the fuses up, with no errors, but I cannot upload the Blink example?

This is extremely frustrating...
« Last Edit: December 22, 2011, 07:05:17 pm by ProfePaco » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that with the resistor I have disconnected the auto reset. Led associated to pin 13 does not blink during upload, and now the error is different:

Binary sketch size: 768 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

any idea about the meaning of this error?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that with the resistor I have disconnected the auto reset. Led associated to pin 13 does not blink during upload, and now the error is different:

Or, the Arudino ISP sketch has been erased.

Connect an LED to pin 9.  When the ArduinoISP sketch is idle, does the LED on pin 9 slowly get brighter then dimmer?

When you try to upload to the ATtiny, does the LED on pin 9 blink?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that with the resistor I have disconnected the auto reset. Led associated to pin 13 does not blink during upload, and now the error is different:

Or, the Arudino ISP sketch has been erased.

Connect an LED to pin 9.  When the ArduinoISP sketch is idle, does the LED on pin 9 slowly get brighter then dimmer?

When you try to upload to the ATtiny, does the LED on pin 9 blink?


Thanks for your interest.

I connected the led.

When ArduinoISP is idles, yes,  LED on pin 9 slowly gets brighter then dimmer.

If I upload again ArduinoISP skecth I can see the led blinking. That's good.

However, when I try to upload the Blink example, Led does not blink, stays on. Then an error is written, and the led gets brighter and dimmer again, so the ArduinoISP sketch is not erased, but the Blink example is not uploaded.

So I think that the situation now is:  I have stopped the auto reset, but I cannot upload the blink example to the ATtiny85.

I have used another Attin85, with the same result. Yesterday i tried arduino nano with no success. At this pointy I think I will never do it....

 smiley-eek

Logged

Rural Ozarka
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Priest of the Screaming Electron
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't get discouraged. This took me a week (or two) to get working. What I posted wasn't my actual setup anyway, (http://insapio.files.wordpress.com/2011/12/breaduinoprogrammingattiny85.png is, however.)

I was getting the same error as you for at least a week. You might need to erase your Uno, disassemble your setup, and try out some other projects for a few days. Come back to it fresh. I dunno why, but that always helps me.
Logged

Entrepreneurship, Arduino, Ham Radio & General Wannabe Hackery

http://insapio.com/
Twtr: @mltd_alexander

Rural Ozarka
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Priest of the Screaming Electron
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I also got to the point where I completely deleted the IDE, reinstalled, added back the tiny cores (the new 1.0 cores of course) and gave it another go.  I'd done an inordinate amount of fiddlin' with my boards.txt and the avrdude.conf files, so ymmv.
Logged

Entrepreneurship, Arduino, Ham Radio & General Wannabe Hackery

http://insapio.com/
Twtr: @mltd_alexander

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps the only solution is buying one of these programmers:

http://www.ebay.es/itm/260766932832?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

http://www.ebay.es/itm/280761316552?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

I am spending too much time on this problemm, even I am taking too much time from you... sorry for that....

Logged

Rural Ozarka
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Priest of the Screaming Electron
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ha, no problem man, I've got infinite free time! But yeah, one of those should work out of the box. Although, so should the ArduinoISP  smiley-confuse
Logged

Entrepreneurship, Arduino, Ham Radio & General Wannabe Hackery

http://insapio.com/
Twtr: @mltd_alexander

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I have good news, annoying news, and good news.

First the good news.  I've reproduced the problem and I know what is wrong.

Now for the annoying news.  Arduino 1.0 and the ArduinoISP sketch are not compatible.  There are some problems with the ArduinoISP sketch and Arduino 1.0 surfaces at least one of those problems.

And, finally, the good news.  I have an update for the ArduinoISP sketch that works correctly with Arduino 1.0.  If you'd like a copy, send me a Personal Message with your email address.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I have good news, annoying news, and good news.

First the good news.  I've reproduced the problem and I know what is wrong.

Now for the annoying news.  Arduino 1.0 and the ArduinoISP sketch are not compatible.  There are some problems with the ArduinoISP sketch and Arduino 1.0 surfaces at least one of those problems.

And, finally, the good news.  I have an update for the ArduinoISP sketch that works correctly with Arduino 1.0.  If you'd like a copy, send me a Personal Message with your email address.



 smiley-grin smiley-grin smiley-grin

pm sent

Thanks a lot!!!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Email sent.
Logged

Pages: 1 [2] 3   Go Up
Jump to: