Arduino Forum

Using Arduino => Microcontrollers => Topic started by: marian42 on Oct 15, 2012, 05:47 pm

Title: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 15, 2012, 05:47 pm
Hi,

Id like to program an ATtiny85 with Arduino code (http://hlt.media.mit.edu/?p=1695) using an Arduino Uno as programmer (http://hlt.media.mit.edu/?p=1706) as explained in the tutorial by MIT Media lab.

When uploading the blink sketch or trying to burn a bootloader it says:

Code: [Select]
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.


I heard that I can ignore the first error.
What did I do wromg?
The arduino has an ATmega328 chip.

Also, here is a picture (http://s.gullipics.com/image/z/n/b/4o7o0n-jeeemy-yl79/IMAG0573.jpeg) of my setup.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 15, 2012, 06:39 pm
You *may* need a 10k pullup resistor on the reset pin (between pin1 and pin8).  All the other connections appear correct.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 15, 2012, 07:25 pm
Got the same results with the resistor.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 15, 2012, 07:28 pm
Do the lights on the Arduino blink when you try and upload?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Erni on Oct 15, 2012, 07:36 pm
It would be easyer to troubleshoot if you connect the 3 LED's mentioned in the sketch

Quote

Put an LED (with resistor) on the following pins:
9: Heartbeat - shows the programmer is running
8: Error - Lights up if something goes wrong (use red if that makes sense)
7: Programming - In communication with the slave


And you could try this core:
http://code.google.com/p/arduino-tiny/downloads/list
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 15, 2012, 09:09 pm

The blue wire does not look correct.

Going from left-to-right, the second green wire is not necessary.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 15, 2012, 09:32 pm


The blue wire does not look correct.


In that diagram the black wire above the blue wire should be one hole to the left - I think the blue is correct.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 15, 2012, 09:49 pm
Okay so I got it to work!

But I promise all I changed was attaching the three LEDs.
During the process the error led lights up shortly.
The power led stays on and the working led blinks.

The pullup resistor is not necesary.

Thanks for your help guys!

I tried it with another (small) ATtiny85 on a PCB with components attached and got this problem:

Code: [Select]

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


and after some tries its always this one
Code: [Select]

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


During the upload only the power led is on.
This ATtiny already has a sketch on it.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 15, 2012, 09:53 pm
Quote
I tried it with another (small) ATtiny85 on a PCB with components attached and got this problem:


Components?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 15, 2012, 10:04 pm
Two LEDs, a light sensor, a piezo buzzer and a button. It also has a battery slot and some resistors.
I dont have the schematics but I think the components are simply wired up to the five pins.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 15, 2012, 10:09 pm

The LEDs are very unlikely to be a problem.

The light sensor may or may not be a problem.

If the piezoelectric buzzer is wired directly to an SPI pin it is a problem.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 15, 2012, 10:25 pm
I watched the board being programmed with the ATtiny soldered on it so Im quite sure its possible. It has eight holes for programming.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 15, 2012, 11:33 pm

Enable verbose output for uploads and post the results.  Please use code tags.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 16, 2012, 02:59 pm
Code: [Select]
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                    : \\.\COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
         AVR Part                      : ATtiny85
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [15]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x15
avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [14]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [10]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: Send: A [41] . [98]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Recv: . [14]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
         Hardware Version: 1981277309
         Firmware Version: -2.-1937312626
avrdude: Send: A [41] . [84]   [20]
avrdude: Recv: . [02]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
avrdude: Send: A [41] . [85]   [20]
avrdude: Recv: . [10]

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: Send: A [41] . [86]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [87]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [12]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [89]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
         Vtarget         : 429496729.4 V
         Varef           : 235765467.0 V
         Oscillator      : 194.021 kHz
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x00
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: Send: Q [51]   [20]
avrdude: Recv: . [10]
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 16, 2012, 09:02 pm

avrdude and the ArduinoISP sketch lost synchronization.  It's an annoying bug in the ArduinoISP sketch.

Give this version a try...
http://arduino.cc/forum/index.php/topic,108797.msg824488.html#msg824488
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 01:29 am
I downloaded this (http://code.google.com/p/arduino-tiny/) from your thread.
It worked with my single attiny (the core from MIT media lab worked with this one as well) but not with my onboard attiny.
Only the power led of the programmer lights up.

This is the error:
Code: [Select]
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                    : \\.\COM3
         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.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 17, 2012, 02:37 am

Did you try the ArduinoISP sketch from the link I posted?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: funkyguy4000 on Oct 17, 2012, 04:26 am
I tried that one codingBadly,

I keep on getting an error invalid conversion from 'const char*' to 'uint8_t'
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 17, 2012, 07:56 am
I keep on getting an error invalid conversion from 'const char*' to 'uint8_t'


Quote
Binary sketch size: 5,176 bytes (of a 32,256 byte maximum)


Compiles for me using Arduino 1.0.1 on Windows with Arduino Uno as the selected board.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 12:08 pm

Did you try the ArduinoISP sketch from the link I posted?


Im sorry I didnt find the attachment in the first place.
I tried the ArduinoISP sketch from the attachment.
However, I got the same results.
The two ArduinoISP sketches are identical, exept in line 126 heartbeat(); is commented off.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Riva on Oct 17, 2012, 01:45 pm

I watched the board being programmed with the ATtiny soldered on it so Im quite sure its possible. It has eight holes for programming.

What device was being used to program the ATtiny? Maybe someone with greater knowledge of Atmel chips can say if you can still program these chips using ArduinoISP if the reset disable and/or the SPI program fuse is set, or do you have to use high voltage programming?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 03:14 pm
I assembled the board on an exhibition myself and it was programmed by a self-made piece of hardware that was connected to a laptop.
I asked whether it is possible to program it my self with an arduino and I was told to use the tutorial from MIT Media Lab.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 17, 2012, 03:37 pm
if the reset pin is disabled and/or spi programming is disabled then you have to either use a hv programmer to program, or a hv programmer to set the fuse byte to enable both the reset pin and spi programming bits and then you can use isp to program again.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 03:46 pm
Im not sure about the reset pin but they told me that it is possible to lock ATtinies and that this one is not locked.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: fungus on Oct 17, 2012, 03:50 pm

Maybe someone with greater knowledge of Atmel chips can say if you can still program these chips using ArduinoISP if the reset disable and/or the SPI program fuse is set, or do you have to use high voltage programming?


You need HVP if the reset pin has been configured as an I/O pin.

Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: fungus on Oct 17, 2012, 03:53 pm

Im not sure about the reset pin but they told me that it is possible to lock ATtinies and that this one is not locked.


You can "lock" it against SPI programming is by configuring the reset pin as a general I/O pin. I don't think there's any way to lock them against special programmers (HVP).


Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 17, 2012, 04:01 pm
There is something else you can do if you want an extra IO pin, but still want to be able to program without a HVP, and that is to use a bootloader - the one I made for tiny85s and 84s is designed to allow serial programming (software uart) without the need for a reset pin.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 17, 2012, 07:38 pm
However, I got the same results.


If you want me to continue helping, post the verbose output.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 17, 2012, 07:40 pm
Im not sure about the reset pin...


What is connected to RESET?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 09:53 pm
Verbose output varies randomly between the one posted in #17 and this:
Code: [Select]
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                    : \\.\COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
         AVR Part                      : ATtiny85
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [02]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [12]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [98]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
avrdude: Send: A [41] . [84]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [85]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [86]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [87]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [89]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [01]
avrdude: Recv: . [10]
avrdude: Send: A [41] . [82]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [12]
avrdude: Recv: . [10]
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Send: P [50]   [20]
avrdude: Recv:
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: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.


I do not see any connection at the reset pin but I can barely see any connections at all because the PCB is covered with some kind of black ink so the wires are only slightly lower than the rest.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 17, 2012, 10:11 pm

There are two possibilities left...

1. There is a mistake in your wiring.

2. RESET has been disabled.

What happens to the target when you connect a low value resistor (like 220 ohms) from RESET to GND?  Does the target reset?
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: marian42 on Oct 17, 2012, 10:37 pm
The setup works with another single ATtiny.
Connecting a 470 resistor between Reset and GND has no effect.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Coding Badly on Oct 20, 2012, 06:52 am

Assuming the processor's Vcc is 5 volts, if the pull-up resistor on RESET is 10 K? then a 470 ? resistor from RESET to ground should bring the voltage on RESET to 0.22 volts.  0.1Vcc is the guaranteed low threshold which is 0.50 volts.  In this scenario the 470 ? resistor is guaranteed to reset the processor.

If the pull-up resistor on RESET is 4.7 K? then a 470 ? resistor from RESET to ground should bring the voltage to 0.45 volts.  Still below the threshold.

If the pull-up resistor on RESET is 4230 ? the voltage is 0.5 volts.  The lowest value that still guarantees a reset.

It seems very likely that RESET has been disabled.  To eliminate all doubt, you could try a lower value resistor.  Were I in your shoes, I wouldn't bother.
Title: Re: Programming an ATtiny85 with Arduino Code and Arduino Uno as Programmer
Post by: Tom Carpenter on Oct 20, 2012, 10:52 am
If the reset is disabled you might want to look at this:
http://www.rickety.us/2010/03/arduino-avr-high-voltage-serial-programmer/

It is an arduino based programmer that allows you to reset the fuse bytes even if the reset pin has been disabled.