Unable to upload sketch to ATTiny85 using an Arduino Uno

I am trying to upload a sketch to an ATTiny85 using an Arduino Uno. I have done it previously but since updating the IDE to 1.6 I've had no luck.

Configuration
ATTiny85
Arduino Uno R2
Mac OS X 10.10.4
Arduino IDE 1.6.4

Steps

  1. Modify ArduinoISP sketch to have a heartbeat delay of 40
  2. Upload ArduinoISP sketch to Arduino Uno
  3. Connect ATTiny85 to Arduino Uno like this
  4. In the Arduino IDE
  • Set the board to ATTiny85 @ 1 MHz
  • Set progammer to "Arduino as ISP"
  1. Upload blink sketch

Results
It erased the blink sketch that was on the ATTiny85 and fails to write the new one. Heres the verbose output.

Sketch uses 710 bytes (8%) of program storage space. Maximum is 8,192 bytes.
Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -pattiny85 -cstk500v1 -P/dev/cu.usbmodem1421 -b19200 -Uflash:w:/var/folders/20/0kqxp2dx2n90121zr32rbjh00000gn/T/build4722774662855568999.tmp/Blink.cpp.hex:i 

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         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/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/clevererror/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem1421
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny85
         Chip Erase delay              : 400000 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    12     4    0 no        512    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      8192   64    128 30000 30000 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/20/0kqxp2dx2n90121zr32rbjh00000gn/T/build4722774662855568999.tmp/Blink.cpp.hex"
avrdude: writing flash (710 bytes):

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

I've tried multiple ways of adding ATTiny support to the Arduino IDE but they all have the same result.

This is driving me crazy, any help would be appriciated.

put 10uf cap between reset and ground on the Arduino running ArduinoAsISP. This will clobber the autoreset, which may be causing the problem you're having.

The problem is not with the core.

I do have a 10uf cap in there but I'll try swapping it with another one to see if thats the problem.

The log looks indeed like the programmer auto resets as DrAzzy suggests.
(If you install the leds, you can easily verify whether or not the the programmer auto resets).
But the work around of setting the heartbeat to 40 is rather dodgy.
So if cap turns out to be ok, you might want to try this version. (it is the ArduinoISP 'release candidate' for upcoming arduino ide).

It is possible that I don't need the 40 anymore. The instructions I used to follow said that but it looks like it might not be needed anymore.

@PeterVH Oh, man, enhancements in a release candidate! I like very much that SS is no longer reset and the new documentation at the top is great! Is it too late to get a couple of other things added? Like changing the name of the sketch to "Arduino as ISP.ino" so it matches the programmer chosen in the IDE and so it will no longer be confused with the ArduinoISP device? And I really also like this enhancement to allow different baud rates: ArduinoISP @57600 baud instead of 19200 - Troubleshooting - Arduino Forum

1 M is a better choice for baud rate.

@PeterVH Thanks! That version of ArduinoISP worked first try :slight_smile:

@dmjlambert:
About the name change. I see your point but don't have a strong opinion on this myself (I somehow became attached to the name ArduinoISP, but I see more and more people on the forum refer to it as 'ArduinoAsISP'). I passed your suggestion to the arduino devs.

About the baud rates. The modified sketch already works with higher baudrates. I leave the default to 19200 because I want to maximize the probability it works correctly the first time. E.g. on the Uno and mega the baudrate of 1M suggested by Coding Badly works if the baudrate was already set to 1M prior to invoking avrdude. If not, avrdude has to switch baudrates on the fly and this causes the usb2ser converter on the uno to send out garbage bytes which may spoil the fun. Also I want to avoid trouble with settings settings in programmers.txt...
I added a macro in the config section to make it more convenient to configure a different baudrate though.

Great, thanks! I'm glad the sketch is getting an overhaul.