Using the TinyLoadr to program ATtiny84s

November 27, 2013

I’ve been using the excellent TinyLoadr Shield to program a bunch of ATtiny2313 chips I’ve got. Doing so was easy.

But when I moved over to program ATtiny84s, I ran into a bunch of problems. First, I’d get an error when burning the bootloader:

configuration file for part ATtiny84
avrdude: Yikes!  Invalid device signature.

This was because, although I’d switched all the switches on in the second bank (and off in the first and third banks), I’d neglected to move the three jumpers below them from ATtinyx313 to Other.

Once I did that, I started getting different errors:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

and

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

This is due to a defect in Arduino 1.0. Luckily, more information about the problem is here:

http://code.google.com/p/arduino/issues/detail?id=661

The upshot: I went into
c:\Program Files\Arduino\hardware\arduino\cores\arduino
and edited HardwareSerial.cpp to have the following:

#if (RAMEND < 1000)
  #define SERIAL_BUFFER_SIZE 16
#else
// Was 64; changed to 128 for serial buffer overflow problem
// http://code.google.com/p/arduino/issues/detail?id=661
  #define SERIAL_BUFFER_SIZE 128
#endif

I then reburned ArduinoISP on my Uno, then plugged the TinyLoadr back in. After that, I was able to burn ATtiny84s with no problem.