Programming ATtiny85 with Arduino UNO as ISP

Hello everyone, I was hesitant to start a new thread, but none of the solutions that have worked for other people seem to be working for me.

I am using an ATtiny85 to control a small project I am working on. I am using an Arduino UNO and the default Arduino as ISP sketch.

Using the old IDE (1.0.x I believe), the setup worked perfectly. I could upload my code to the 85 all day long.

However, I hit the "4000 bytes" glitch, and the IDE would no longer write to the 85 because it thought there was no space left. After some intense googling I found out it was an IDE glitch, so I updated to the latest version (1.6.1) and reinstalled everything as per this webpage: High-Low Tech – Programming an ATtiny w/ Arduino 1.6 (or 1.0). The code actually compiled past 4000 bytes, and everything seemed peachy.

Now I'm stuck. Nothing is working like it did before. I am consistently getting the "not in sync error" (see code below). I can upload normal sketches to the arduino, but writing to the 85? Forget it. I can't even send a blink sketch.

If anyone could shed some light on this I would greatly appreciate it. I am almost 100% my wiring is correct (I have the 10 uF capacitor installed). However, I can include a picture of things if you like.

The error log (thanks, verbose mode):

avrdude: Version 6.0.1, compiled on Jan 15 2015 at 12:42:51
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/MrRoboto/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1431
         Using Programmer              : stk500v1
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Thanks in advance!

Oh and I'm on OSX Yosemite, 2013 MacBook Pro Retina. If that matters (say, as opposed to Linux or Windows OS).

At any point did you select ATtiny85 (external 20 MHz clock) then execute Burn Bootloader?

I'm pretty sure I never selected that option.

I have several 85s, and I get the same results with each one. I make sure to select "1MHz (internal)" for each one.

That didn't work, so I switched back to the default "ArduinoISP" (as opposed to the work around one that disabled the heartbeat, which fixed this problem for other folks) and now I get this error message.

avrdude: Version 6.0.1, compiled on Jan 15 2015 at 12:42:51
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/MrRoboto/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1431
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         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
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.11s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/var/folders/c6/f78ym4ks2_qf_nc1xc8f_yv40000gn/T/build7251621808056141975.tmp/_4N6MIRRORS_v2.cpp.hex"
avrdude: writing flash (4430 bytes):

Writing | avrdude: stk500_recv(): programmer is not responding
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Post the verbose output from avrdude. Please use
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags.

I'm sorry I thought I did.

I have enabled verbose upon uploading and this is my output:

Build options changed, rebuilding all

Sketch uses 4,430 bytes (54%) of program storage space. Maximum is 8,192 bytes.
Global variables use 57 bytes of dynamic memory.
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -pattiny85 -cstk500v1 -P/dev/tty.usbmodem1431 -b19200 -Uflash:w:/var/folders/c6/f78ym4ks2_qf_nc1xc8f_yv40000gn/T/build7251621808056141975.tmp/_4N6MIRRORS_v2.cpp.hex:i 

avrdude: Version 6.0.1, compiled on Jan 15 2015 at 12:42:51
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/MrRoboto/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1431
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         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
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.11s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/var/folders/c6/f78ym4ks2_qf_nc1xc8f_yv40000gn/T/build7251621808056141975.tmp/_4N6MIRRORS_v2.cpp.hex"
avrdude: writing flash (4430 bytes):

Writing | avrdude: stk500_recv(): programmer is not responding
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Uh, OK. I guess "verbose" is significantly less verbose.

Do you have the three LEDs (plus resistors) connected to your Uno?

Yep, they are hooked up.

Try this version of ArduinoISP…
https://raw.github.com/rsbohn/ArduinoISP/master/ArduinoISP/ArduinoISP.ino

@CodingBadly: I found out recently that rsbohn’s original version lost the extra delay between the reset pulse and sending the program enable command. Not sure it matters here because I can program an attiny85 (at least at 1MHz internal osc), even without the delay.But it should be there.

Anyway, I am collecting some minor ArduinoISP improvements. I try to only put in changes that hopefully make ArduinoISP more reliable. (The at89s support is the only one that does not match this criterion). In case somebody wants to try it (take the master branch!): ArduinoISP/ArduinoISP.ino at master · PeterVH/ArduinoISP · GitHub. I have found it to work more reliably than the one in the IDE.

Anyway, I think I also observed mrroboto20’s problem. Since Arduino 1.6.0, avrdude somtimes keeps running in background. Killing the old process normally makes programming possible again.

Sorry to but in. I'm having a similar problem, and i've been digging thru the forums a little bit trying to find a way to fix it.

It's been about a year since the last time I picked up an ATTiny85, and I was going to rebuild my last project. I'm on a new computer, and I think the last time I did this with 1.0x. Anyways, I installed 1.60, installed the latest core. I just re-programmed my arduino uno as an ISP, and am using the seeed shield as a programmer.

Long story short, I can burn chips with it.. it's always worked. I upgraded the ISP Code per the post above, and I am using the code.google.com version of the attiny core for the 1.50 (per a previous post) They're all dated 12/7/2013 on the code.

So, on my ATTINY85-20PU chips I got from ebay, I need to burn the bootloader first If I remember correctly, which sets my cpu up, and timers, etc.. then I can go ahead, load my sketch and go back to whatever I was doing. However, I'm getting the error:avrdude: Yikes! Invalid device signature.

I want to think that setting it as ATTiny85 @ 16MHz (internal PLL; 4.3VBOD) what what I did before, but i'm second guessing myself to think that the 8MHz internal oscillator; BOD Disabled) is the right one to use.

Either way, no matter which one I try, I get an invalid device signature. I haven't burned any code to it yet. (I've gone thru a few chips screwing this up already). So, starting fresh, I am still getting this issue. Can anyone give me a hint or should I keep trying chips as some may have already had a bootloader burned to them?

Thanks for the help.

"invalid device signature" could be a number of things, bad power, bad connections, insufficient target clocking, or programmer sck clock too fast, and others (including bricked chips, dead chips, bougus chips,...).

I think it's a bogus chip, or a chip that has already been programmed. I grabbed 2 from a new tube, and these worked just fine using 8MHz internal oscillator; BOD Disabled. I went back and tried one of the old ones, and it went right back to Invalid device signature. All the chips have the same writing on them.

Thanks hiduino, I appreciate your quick response. Looks like I'm better off buying straight from digikey or something.

~Doc

@JustDoc

I came across a similar issue a while ago, I tried using tinyISP instead of the ArduinoISP... tinyISP was able
to program the attiny85 and was usable again.

I also read in a forum(not sure if it was here), someone used a 12v programmer to reset the attiny85 fuses,
and they were able to program the chip again using the ArduinoISP.

JustDoc:
I think it's a bogus chip, or a chip that has already been programmed. I grabbed 2 from a new tube, and these worked just fine using 8MHz internal oscillator; BOD Disabled. I went back and tried one of the old ones, and it went right back to Invalid device signature. All the chips have the same writing on them.

I think you've been bricking the chips yourself.

If you do burn bootloader with 16 or 20 mhz selected, the chip can no longer be programmed if there's no clock source (there are some sketches that provide an 8mhz clock output for programming such parts (some of Nick's ISP sketches do that), so you could connect it to the appropriate pin to give it a clock signal so you can fix the fuses).

rxpc:
I also read in a forum(not sure if it was here), someone used a 12v programmer to reset the attiny85 fuses, and they were able to program the chip again using the ArduinoISP.

The 12V programmer is only necessary if you've set the fuse bit that disables the reset pin.

Update: (sorry for my lateness, the Spring Semester has been very busy)

I am a dingus. Somehow I turned the breadboard upside down, I was hooking the minis in backwards.

I am truly deserving of my newbie status.

Thanks for all the help though!