Search
Product Info
Pocket AVR Programmer
sku: PGM-09231
Description: This is a simple to use USB AVR programmer. It is low cost, easy to use, works great with AVRDude, and is tested extensively on a Windows desktop. Based on Dick Steefland's USBtiny and Limor Fried's USBtinyISP.We've gotten a big response (see comments and forum posts below) from Mac and Linux users having problems. We use this programmer extensively on a Windows box and love it.
However, this is a low-cost programmer designed for those on a tight budget. For out-of-the-box compatibility with other operating systems and machines, checkout the AVR ISP2 USB programmer from Digikey.
This programmer works really well for ATmega168 and ATmega328 and should work with all the AVR micros supported by AVRDUDE. We've played a bit with the ATtinys but we cannot guarantee that this board will be compatible with anything but ATmega168/328.
This board is buffered and power protected so that you can do some really evil things to the programmer without killing it. It is fast! Comparable speed to the AVR ISP2 USB programmer from Digikey. One of the greatest features of this board is the ability to power the target (up to 500mA) from the programmer.
To use this programmer, attach to a Windows machine and install the drivers listed below. Open a command prompt. Assuming WinAVR (and therefore AVRDUDE) have been installed, type:
avrdude -c usbtiny -B 1 -patmega328 -U flash:w:main.hex
Be sure to include the "-B 1" flag as this will significantly increase the programming speed! You may need to change -p flag to your appropriate microcontroller. You can setup a tool and hotkey in Programmers Notepad to do this automatically.Features:
- Standard AVR ISP programmer
- ATtiny2313 with USBtiny firmware preloaded
- Buffered output
- PTC fuse protected power
- Programmer can power target
- Supports ATmega168/328 and many others
- Two status LEDs
- Both 10-pin and 6-pin targets supported (cable included)
Open Source Hardware: We like to share. The original engineering files are available for mass hackery.
- Firmware based on USBtiny (type 'make all' in the spi directory). I've found that the compile only works with older versions of WinAVR (20080430).
- Eagle Files (Licensed under CC v3.0 Share-Alike)
Pricing
Comments
82 comments
Feeds
Currency
Display prices in
Feedback
If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.






















Looks very good and suitable for travels!
Is this compatible with Arduino IDE?
After that, I'm not sure how to connect the programmer+cable to the processor. Presumably, there's a correspondence between the pins on the programmer and the processor but I don't know what this is. Hardware setup tips for this would also be appreciated.
Once again, I apologise as my background is programming an not electronics and I've found the documentation out there to be difficult to get what I need. I'm not just being lazy!
Thanks in advance for any help received.
Okay, I haven't done it yet with a Tiny13, but I just set it up with a Mega168, and it works, and I think I understand it. Here's what I think you need to do:
Get a programming cable: the one you suggested will do. The "Beginning Embedded Electronics" tutorial at the Sparkfun site has a photo that will help you to identify the pinouts from the cable, in Lecture 2:
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=93
You can power the Tiny13 from the 5V and gnd connections in the cable, at least while you're programming. A Google search will get you to a datasheet for the Tiny13, where you'll read that pin 1 is reset, pin 8 is Vcc (5V), pin 4 is gnd. Pins 2 and 10 from the cable go to your 5V and gnd rails (assuming you have the Tiny13 mounted in a breadboard. The tutorial mentioned above will tell you how to wire a pushbutton for the reset line. Pin 5 from the cable also goes to the reset pin (1).
Pins 4, 6, and 8 of the cable also need to be tied to ground. I believe you may be able to save some trouble with that if you use the 6 pin programming connection on the cable rather than the 10 pin, but then you're on your own figuring out the pinouts.
In short:
cable pin - connection
1 - Pin 5 of Tiny13 (MOSI)
2 - Vcc (5V)
3 - No connection
4 - Gnd
5 - Pin 1 of Tiny13 (RST)
6 - Gnd
7 - Pin 7 of Tiny13 (SCLK)
8 - Gnd
9 - Pin 6 of Tiny13 (MISO)
10- Gnd
In your Make file, the programmer should be "usbtiny", and the port should be simply "usb".
pin 1: MISO
pin 2: VCC
pin 3: SCK
pin 4: MOSI
pin 5: RST
pin 6: GND
That should save you several (three) unnecessary connections, but then, I haven't tried it, so no guarantees.
I have also seen an 8-pin AVR development board on this site too, which also looks useful. I might get that to have a permanently setup development environment and to leave my breadboard free of clutter.
Once again, I can't thank you enough for your help here.
It's good for me to think aloud, and I'm a bit pumped from having gotten it to work myself mere minutes ago.
Now, there's no guarantee that it's going to work with a Tiny13, as the product page says. If it does work, please let us know: I've got a few of those laying around here and I'd like to try it, but I'm not tearing apart what I've got here unless I have reason to think it'll work.
Have fun!
I just ordered a couple of the "BOB-08508 AVR Programming Adapter" boards to save having to set up that rat's nest of wires on the breadboard.
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA168 is 1E 94 06
Ive checked the connections 100 times
avrdude: error: usbtiny_transmit: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.
Proper labeling is:
1-MOSI
3-
5-RST
7-SCK
9-MISO
This is how the pins are labeled
1- MISO
3- SCK
5-
9- MOSI
This is how the pins are labeled on the board
1- MISO
3- SCK
5- RST
7-
9- MOSI
Its a good thing that GND and VCC weren't also flipped. That would have caused some major headaches.
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
After a moment I decided, I really don't care about speed. It would be nice if the programmer would go wooshy wooshy and program my 328...
So, instead of the recommended command line in the product description, I used:
Z:somedir avrdude -F -c usbtiny -patmega328p -U flash:w:blink_1MHz.hex
** I ommitted the -B 1 command line option recommended in the product description **
And the result:
avrdude: AVR device initialized and ready to accept instructions
Reading |
# | 100% 0.02s
avrdude: Device signature = 0x1e950f
avrdude: verifying ...
avrdude: 262 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Thank you.
The result: one overpowered 20 mips 328 powering a blinking LED.
On to more exciting things...
-DogNo7
note: i recently purchased (this week) my pocket avr and it looks like the earlier batch issues of mis-labelled pins is now fixed.
new-host:~ stuart$ avrdude -c usbtiny -p m16 -P usb
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
avrdude done. Thank you.
(I'm using avrdude version 5.6 (from CrossPack), which should supports usbtiny)
Any thoughts would be greatly appreciated. Thanks!
http://forum.sparkfun.com/viewtopic.php?p=75454#75454
"The IOUSBFamily was not able to enumerate a device."
A google search turned up this link: http://wiki.embedded-projects.net/index.php?n=Main.MacAndUsbprog which leads me to believe that there is potentially an issue with the firmware of the programmer?
usb 2-1: new low speed USB device using uhci_hcd and address 19
hub 2-0:1.0: unable to enumerate USB device on port 1
And that's it.
What is the problem here? What does one need to do to get it working under linux/MacOS?
This is not ideal. What is causing this issue?
I couldn't get itrecognised under Windows on a Dell laptop. Blue Power LED on, but Windows didn't know the USBTiny device was there. Connected it through the USB 1.1 hub in an ancient iMac keyboard and it worked perfectly.
It lights up but the PC does not seem to notice it is plugged in. I've tried a couple of different USB ports and cables. I even rebooted the PC. Both ports and cables work with other devices (arduinos, logic analyser, cameras etc).
I see no apparent defects on the board.
I will try it on my work PC tomorrow.
Eddie,
My old Dell latitude notebook (win2K) does "see" the programmer. The programmer is obviously OK but somehow incompatible with my big PC.
When plugged into the XP desktop only the blue light comes on but in the notebook a red light comes on as well and the "new hardware" wizard kicks in.
My PC is a dual core 3.4 Ghz intel machine. It shouldn't make any difference but something is unhappy.
If I can get it working on the dell I can get around my immediate problems.
Eddie.M.
I figured there is something subtly different between the USB ports on my two machines and a way to "clean them up" was to insert a USB hub.
I literally dusted off and inserted an old 4-port hub and presto the programmer is recognized. The drivers installed OK. I still can't get AVRdude to see it but that is another matter.
Eddie,
eddiem: Update on my "dud" programmer.
My old Dell latitude notebook (win2K) does "see" the programmer. The programmer is obviously OK but somehow incompatible with my big PC.
When plugged into the XP desktop only the blue light comes on but in the notebook a red light comes on as well and the "new hardware" wizard kicks in.
My PC is a dual core 3.4 Ghz intel machine. It shouldn't make any difference but something is unhappy.
If I can get it working on the dell I can get around my immediate problems.
Eddie.M.
You came to discover the same thing that Tim had previously found: using a USB hub (such as a keyboard) can help your computer recognize the programmer. His theory is that the programmer needs to communicate over USB 1.1 instead of USB 2.0, but the computer doesn't know this. So, making it communicate via a slow USB hub forces 1.1 operation.
We're hoping that someone at Sparkfun might be able to come up with a fix for this, because keeping an extra keyboard on my workbench just for this seems silly! At the very least, I don't think they should call it a "pocket" programmer if they don't fix it, because it won't work without my keyboard, which doesn't fit in my pocket! :-)
You can also add the drivers by starting the add new hardware wizard manually, through control panel, before connecting the programmer.
In any case, there isn't a program to install the drivers. You just have to point windows to where they are stored when it asks, and say, "here are the drivers".
Using cut and paste to provide the filepath works nicely, but you can also navigate manually in the wizard to wherever you saved the drivers on your windows machine.
-DogNo7
If right clicking and choosing install fails, go ahead and try the procedure I provided above.
-DogNo7
I noticed this board lacks 3.6V Zener Diode on USB D+/D- line. (Original USBtinyISP has)
so I cut pattern back of JP1, and switched to 'Power Target' to feed 3.3V from ISP connector. then avrdude runs perfectly.
(Ubuntu 9.04 / ThinkPad X31)
Under Linux the same message "hub 5-0:1.0: unable to enumerate USB device on port 1". Tested on two laptops and desktop pc.
More sadly I have not any usb hubs around to test.
Guys, you should really fix this programmer to make it work with modern usb controllers.
I have tested it on two Vaio laptops (fs415 which old one and fw11er), Ibm laptop (t43 which old one too), on Shuttle XPC (sg31g2), and on intel Mac mini 1.6. All failed.
Cut the trace and power it externally.
I was unable to successfully program any chip until I did this.
http://wtfmoogle.com/arduino/poketavr.jpg
With my ICSP wired as TheMoogle has shown, I have successfully programmed an AVR on my Mac. But instead of cutting the JP1 trace, I use a D-Link USB 2.0 powered hub. Without the powered hub, the device isn't recognized by avrdude. Presumably it just takes too much current from the USB bus to work.
Also, the "Powered/Not powered" switch doesn't work because the TARGET-PWR net is also powering U2, but if you disconnect its power, then the other inputs to U2 hold TARGET-PWR high. U2 should be powered by VCC.
Plugging it in directly into a USB port of my PC the OS doesn't recognise the device properly. Plugging it into a USB hub (in my case built into the monitor) works. The blue LED should light up immediately, the "stat1" red LED should light up after a few seconds.
The other problem I had was avrdude complaining "Operation not permitted". This is due to read/write permissions in udev (running Ubuntu 8.04) Setting up a udev rule fixed the problem. Check here http://www.ladyada.net/forums/viewtopic.php?p=21579 for details.
Sometimes I need to run avrdude to make the red LED come on (avrdude will quit with an error "could not find USBTiny"). After the red LED turned on avrdude will work fine.
So there are a few problems to make it work, but with a few workarounds it's a great compact programmer. I also have the STK500 clone USB AVR programmer from Sparkfun which works fine out of the box - but it's a lot more expensive, much bigger, and it doesn't power my circuit either.
If you are having issues with this device not working then I'm guessing your are using an intel based mac. It seems Apple started using a different USB chip or maybe different firmware in these macs. These chips are much more careful about monitoring the voltage and current levels being drawn by USB peripheral when they see a potential issue they shut down the USB port to protect the computer from damaging itself, this is done without telling you or giving you a warning. A work around to this problem is to plug it into a hub and let that manage your power, this should make your device work properly. Perhaps in a revision of this board sparkfun will place two 3.6V zeners to regulate the power on the data lines, this should fix most of these issues.
I just hate buying something that never was going to work. I like "just out of the box".
Anyone found a working solution?
thank you for any feedback
I chalk this up to the design. Since the USB interface is implemented on the onboard AtTiny, rather than say, an ftdi 232, I think the fault lies in the USB implementation on the AtTiny.
I think it would be a good move to re-engineer this board before version 2 is released. $5-$10 more for the board would be worth it if it meant higher reliability.
As far as the overall quality of the PCB and soldering, I can't complain. Just a design issue.
C:UsersUserDesktopblink_1MHz>avrdude -F -c usbtiny -patmega168 -U flash:w:T
est.hex
...
avrdude: 144 bytes of flash written
avrdude: verifying flash memory against Test.hex:
avrdude: load data flash data from input file Test.hex:
avrdude: input file Test.hex auto detected as Intel Hex
avrdude: input file Test.hex contains 144 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.09s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0007
0x00 != 0x0c
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK
avrdude done. Thank you.
DO NOT BUY until they fix their design.
1) cut back of patter JP1
2) put LED on JP1
LED usually drop about 2V. that means...
VBUS(5V) - LED(about 2V) = VCC(about 3V)
so AVR will run with 3V and USB D+/D- line swings 0 to 3V.
I tried some LEDs for best result. and little red LED which drops 1.875V( VCC: 3.125V ) is the best.
LED drops just 2.00V ( VCC: 3.00V ) did not work properly.
hope this helps.
I also had one problem that no one else mentioned; I hope someone can help me with it. When I try to use the ISP feature (ie, while IC is in my application circuit), the programmer doesn't work (gives the "initialization failed, rc=-1 ... Device signature = 0x000000"), however when I pull the IC out and just wire up the programmer, it works fine (no pull up on reset). Any ideas why this may be? Thanks
hope this helps anyone
also, in linux there is not a setup config for avrdude for ATmega328, look at this site for help if you run into this problem: http://spiffie.org/know/arduino_328/ide.shtml
the directory also, for those who don't know for the avrdude.conf is /etc/avrdude.conf , just add the def to the end of the file and the atmega328 will be shown as m328p
Finally, I found that it was the given cable which caused this problem. When I use jump wire to connect the two ISP sockets manually, it worked.
So, briefly:
A Microcontroller with standard 10 Pin ISP Socket on its header board
+
The cable that come with this programmer
+
This programmer
=
Does not work
I'm sure my MCU header board is OK because I've used it many times. What I am not sure is which one caused it. Is it the cable, or the pin arrangement of the programmer?
A simple solution may be to plug the cable reversely on the programmer. I have cut a gap on the socket to force the cable goes in.
System is Fedora 11 (kernel 2.6.30.9-96.fc11.i686.PAE). Main board is ASUS P5Q. avrdude-5.8-1.fc11.i586 (installed from default Fedora repositories using yum).
I did have to add a file to the UDEV configuration as described here:
http://www.ladyada.net/make/usbtinyisp/avrdude.html
After reading here about the missing zener diodes, I had a go at modifying a USB cable by adding the zener diodes inline. This seems to work a treat.
The programmer is now recognised when I plug it directly into my computer or into a USB hub.
So I'm basically out 20 bucks?
If this thing doesn't work, why are distributors still selling this? The manufacture date is 8/12/2009, :(
And this was my very first sparkfun product to boot ... what a shame!
http://www.mail-archive.com/avrdude-dev@nongnu.org/msg01823.html
If you just type in "avrdude -v" at your command line it will tell you where to find the config file.
I also had to use a usb hub in between the pocket programmer and my computer for windows xp to recognize it.
Finally, the programmer was having problems with the command line given above for programming. I ended up using the following:
avrdude -c usbtiny -B 10 -pt48 -U flash:w:display.hex -vvvv
The main change was making the B option 10. Until I did this I was getting "programmer operation not supported errors".
The -pt48 sets it up for the attiny48.
I also included the -vvvv option to get more information, as I was having so many problems until I set B to 10.
avrdude -c usbtiny -F -P USB -pt13 -U flash:w:main.hex
Wanted to get this explicitly to migrate towards the Vista machines because the the old XP machine is the only one with a parallel port to use the classic bit-bang programmer. Turns out I couldn't get it working in Vista. Period. I tried installing unsigned drivers with the appropriate boot setting, running avrdude as an administrator, self-signing the drivers, nothing in Vista nor the VM. The classic XP box worked fine, red AND blue lights and a successful program. Of course, already had the parallel programmer. Oh well. Somewhat disappointing.
My mouse, Keyboard, USB Stick, everything I own would not communicate with my computer after installing the driver - it scared the hell out of me.
I managed to repair the issue by running the Windows 7 install CD and doing a 'revert' - thankfully Windows had made an automatic backup before applying the driver, phew.. at least they got something right in 7.
From what I have read, if you are not using Windows XP this device is not for you, spend the extra $20 or so and get the DigiKey device instead, you'll waste more than $20 in time trying to get AVRdude to communicate with it.