Programming ATTiny 13 with AVR Pocket Programmer

Although I’ve used the Arduino as an AVR programmer in the past, I’ve recently got the AVR Pocket Programmer from SparkFun:

http://www.sparkfun.com/products/9825

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:

ATTiny 13 pin layout

ATTiny 13 pin layout

AVR Pocket Programmer Connector

AVR Pocket Programmer Connector

Here’s a photo of the setup:

ATTiny and AVR Pocket Programmer

ATTiny and AVR Pocket Programmer

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.

About these ads

3 thoughts on “Programming ATTiny 13 with AVR Pocket Programmer

  1. Pingback: Running a servo on ATTiny 85 | mogshade

  2. Hi,
    Thanks for the write up. I would like to mention that Sparkfun has a number of European distributors, as well as distributors across the world. We do recommend that if you want to purchase parts from Sparkfun and are not in the United States, that you might check to see if you can get the parts from a authorized distributor. This will save you money and time. A list of our Distributors can be found here http://www.sparkfun.com/distributors
    Thanks,
    Tim

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s