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

Hi:

I am following these instructions to program Attiny85:
http://hlt.media.mit.edu/?p=1229

First of all, I have realized that we cannot use arduino IDE 1.0. So I downloaded version 0022. There are no compiling errors in this version.

However, as I try to upload the simple blink example, moving the output to pin 2, I obtain these results:

Problem uploading to board:
Binary sketch size: 658 bytes (of a 8192 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I am doing exactly the same steps and connections as that webpage states... what is wrong?

Thanks in advance
Logged

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


Did you disable auto-reset using a 10 uF capacitor?
Logged

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


Did you disable auto-reset using a 10 uF capacitor?


Yes, following exactly those instructions.
Logged

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


The error indicates that either the Arduino ISP sketch is not installed or that auto-reset is still firing.  I suggest working through the steps a second time.
Logged

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

http://hlt.media.mit.edu/?p=1695 Updated for UNO and 1.0 IDE. Works well, I have tested it. Of course, Coding_Badly's response still applies, but also make sure everything is wired and powered correctly. I spent an hour messing with the IDE files only to realize my reset resistor was connected to GND.  smiley-red
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

http://hlt.media.mit.edu/?p=1695 Updated for UNO and 1.0 IDE. Works well, I have tested it. Of course, Coding_Badly's response still applies, but also make sure everything is wired and powered correctly. I spent an hour messing with the IDE files only to realize my reset resistor was connected to GND.  smiley-red

Thanks a lot.

I am taking breakfast now, no time to check it.

This afternoon I will try it.
Logged

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

Please, help me.  smiley-cry smiley-cry smiley-cry

I cannot find anything wrong. Follows some pictures with all the info.













I have changed the capacitor as well, just to check whether it was defective.

any feedback? Thanks.
Logged

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

And I have tried to burn the bootloader to run at 8MHz, and I obtain the same error:

avrdude: stk500_getsync(): not in sync: resp=0x00
Logged

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

More trials...

I am not sure whether I have to use a capacitor or a resistor to disable the autoreset. So now I have used a 150 Ohm resistor (not have 120) between Reset and Ground. Is this another option? is this right?

Anyway, I obtain the same error as before. This is really frustrating....
Logged

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

Now I tried reset-resistor-+5V... same error...
Logged

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


The wiring looks fine.


Quote
I am not sure whether I have to use a capacitor or a resistor to disable the autoreset.

You may not have to use either.  The latest Optiboot does not require disabling auto-reset.  If you purchased the Uno recently, it may already have a "good" bootloader installed.  Try...

  • Removing the capacitor and / resistor
  • Re-uploading the ArduinoISP sketch (don't forget to change the board selection to Uno)
  • Uploading a test to the ATtiny


Quote
So now I have used a 150 Ohm resistor (not have 120) between Reset and Ground. Is this another option? is this right?

http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection
Don't go below 110 ohms or above 124 ohms


Do you have another Arduino board?
Logged

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

I have a nano as well, can I use it?

removing capacitor or resistor does not help....
« Last Edit: December 21, 2011, 05:45:54 pm by ProfePaco » Logged

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

so this is what I have done:

I load file/examples/ArduinoISP
I set board = Arduino Uno
I upload it


No errors


Then I load Blink example.
board = Attiny internal 1MHz
Programmer = Arduino as ISP (and this was selected before, for the previous case as well)
I upload it
I get this error:
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(): programmer is out of sync

in the last case, if the capacitor is used. the error is:
Binary sketch size: 768 bytes (of a 8192 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00


« Last Edit: December 21, 2011, 05:57:13 pm by ProfePaco » Logged

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

I have a nano as well, can I use it?

It should work well.  I suggest using the 120 ohm resistor method to disable auto-reset.  You will have to find a combination of resistors to get the value in the correct range.  I don't know if using a capacitor is appropriate with the FTDI chip.

If you get the Nano working as an ISP, I also suggest updating the Uno bootloader.  Not having to fiddle with auto-reset is very nice!

Quote
removing capacitor or resistor does not help....

Unfortunately, you are not the first person to have trouble disable auto-reset on an Uno.  You may want to search through the forum for other suggestions.


And just to make certain you are not wasting your time with the Nano... Whenever you get the "expect=0x14, resp=0x51" error or the "not in sync: resp=0x00", you have to re-upload the Arduino ISP sketch.  There is a very good chance the sketch was erased when the bootloader ran.  If you have not been re-uploading the Arduino ISP sketch when that error occurred, this would be a good time to start from scratch using the capacitor to disable auto-reset.
Logged

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

so this is what I have done:

I load file/examples/ArduinoISP
I set board = Arduino Uno
I upload it

No errors

Did you disable auto-reset at this point?


Quote
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

These can be ignored.

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

Huh.  That's different.
Logged

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