ATTiny85 constant error

Hi!

I got a bunch of ATtiny85 chips and would like to play with them.
I followed this tutorial to programm them:
http://hlt.media.mit.edu/?p=1695

I hooked everthing up as described but I allways get this error:

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

Furthermore the heartbeat LED freezes when the this error message shows up
and I have to reset the Arduino to get the ISP-Sketch running again.

Im using:
Arduino R3 as ISP
Arduino 1.0.1 IDE

I wired everything as described in the tutorial so I post just the error
message (I will post a photo of the wiring if neccessary)!

Thanks in advance!!

Hi,

What stage is this at - is it during the 'burn bootloader' step, or did that go okay?

Geoff

Buggy ArduinoISP sketch.

This should help...

Thanks for your answers!

I downloaded your ArduinoISP sketch but unfortunately I still get this error... :frowning:

As far I remember Ive sucessfully programmed this tiny on my previous Arduino board, not Rev3
and the 0023 IDE. Could there be a problem with my Arduino?? Its also strange that the led on pin 13 is
allways lit. As far as I remember this wasnt on all the time on my old board.
Also strange behaviour: I allready had programmed the chip before with my old board some while
ago and if I disconnect the reset wire from the tiny the old programm runs.

I attached my wiring.

Here is my process:

  1. Upload the ArduinoISP (your new version from your post)
  2. I connect the 10uF cap between reset and gnd
  3. open up the blink sketch
  4. select the ATtiny45@1Mhz (I want only 1Mhz, I tried a 45 and a 85) from the boards
  5. select the programmer "Arduino as ISP"
  6. changed the pin to 0
  7. upload as programmer

Hmmm I tried to upload the bootloader first in 1Mhz or 8Mhz
but both seem to fail too. :frowning:

I get again this sync problem:

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

The ISP code is very complex. Could there be a problem with
the "reset" (Arduino Pin10 -> Tiny Pin 1) line? Since the old program
runs when I disconnect this wire?!

I get this verbose output when trying to burn the bootloader:

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

And this output when just uploading to the tiny:

C:\Program Files\Arduino\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -Uflash:w:C:\Users\Marius\AppData\Local\Temp\build7330596740181897178.tmp\Blink.cpp.hex:i 

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

It seems that the tiny doesnt even respond... :frowning:

asuryan:
It seems that the tiny doesnt even respond... :frowning:

That could be a problem with the tiny's RESET pin not going low.

The "Arduino as ISP" thing is a cute trick but tricky to get working properly. It's much better to invest in a $10 ISP programmer.

You could try the new TinyISP it has a lot of goodies (You can just use it as the normal ArduinoISP if you want)

https://github.com/Coding-Badly/TinyISP/zipball/master

Thank you!

@Erni:
How do I use the TinyISP? :astonished: Is the pde a Processing sketch?

I have a "Betemcu MiniProg" at hand which says its a USBasp programmer.
http://www.ebay.de/itm/Neu-USB-ISP-USBASP-Programmiergerat-Programmierer-fur-Atmel-AVR-ATMega-51-ATTiny-/261100135914?pt=Bauteile&hash=item3ccac7e5ea

Can I use this programmer to upload sketches directly to a tiny from the
Arduino IDE? That would be really cool!:slight_smile: I tried and selected the USBasp
from the programmer menu but I get this error:

Using Port                    : usb
         Using Programmer              : usbasp
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc

Is there something I have to do to use this programmer within the IDE?
Thanks!

How do I use the TinyISP? Is the pde a Processing sketch?

You can use it just like the usual ArduinoISP sketch.
Make a folder where your othher sketches are located and drop the files in there.
Then open the TinyISP.ino in the IDE and you are ready.

Coding Badly has explained some of the advantages here:
http://arduino.cc/forum/index.php/topic,123388.30.html reply#33

And yes I have used USBasp programmer too. Just remeber to choose tools->programmer->USBasp

If you don't have this option, you can edit your programmer.txt

Hurray!! :slight_smile:
I got it working with the USBasp programmer!! Nice! I just forgot to
install the drivers for the USBasp ... :sleeping:
Cool!

Thank you all for your help!:slight_smile:

Congratulations.
After playing with tiny's for over a year, I still think there is something magical about that you can get such a small gizmo to do what you tell it to do

asuryan:
I downloaded your ArduinoISP sketch but unfortunately I still get this error...

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
avrdude: stk500_getsync(): not in sync: resp=0x00

The errors are different. The first is what I said: buggy ArduinoISP sketch. The second usually indicates a wiring or clocking problem.

I'm glad you have it working.