Although I’ve used the Arduino as an AVR programmer in the past, I’ve recently got the AVR Pocket Programmer from SparkFun:
It was a pain to set up initially on Win 7 64bit, but the workaround on the site seemed to do the trick (here). Initially I tried to use the default drivers from the SparkFun page, but had to use Device Manager to update the drivers to the ones in the workaround.
Once the drivers are installed you can hook up the programmer to a ATTiny chip. I used the colour diagram on this SparkFun tutorial page (the one with the AVR Pocket Programmer and the Arduino side by side) in combination with the ATTiny 13 data sheet (page 2). The ATTiny 13 can handle 5 volts, so I used the programmer for power.
To make life easier I used coloured wires which matched up with the colours in the SparkFun tutorial table. Here’s how the layout on the ATTiny matches up with the AVR Pocket Programmer connector:
Here’s a photo of the setup:
I’d previously installed WinAVR, so I already have AVRDude on the machine. To transfer a file to the chip I opened the command line, navigated to the directory where the hex file was stored, then entered (where test.hex is the name of the file to upload):
avrdude -c usbtiny -p t13 -U flash:w:test.hex
I’ll cover creating and compiling a hex file in another post.
Just a quick warning about postal chages with SparkFun orders – I got charged an extra £16 on top of the order price. Customs added £8 on for VAT and the Post Office added £8 ‘handling fee’. I had a few other things on the order, but it might work out cheaper buying a more expensive AVR programmer from Britain rather than ordering from the States with these extra charges on top.