# Compare AVR programming tools

I am dealing with PICs for some time and now I want to learn how to use an AVR. I have 2 MCUs in here, the AT32UC3C2512C-A2UT and the ATXMEGA32A4U-AU but I still dont have any programming tools.

In the PIC, things are pretty simple: You just buy PIC Kit 3 and you can program and debug all PICs for a cheap price. But in AVR I can see so many options in Atmel's website, and not just in products but in technologies (PDI, JTAG etc..).

Since I am pretty noob in this subject, I wanted a quick comparison of the options out there and not just the programmers and debuggers but also about the technologies inside them. The DIY options will be most welcome.

In the internet there are some quick reference guides, like this one, but they are years old and they do not compare the technologies inside them (in that link they don't say for example the difference between TPI and PDI or JTAG and the benefits of each one of them), just what they do, so it's hard to choose one.

Please bear in mind I need a programming board for the MCUs I mentioned. I appreciate all the help!

EDIT: I think this link might help.

• USBasap is just a programmer, it doesn't support debugging. Go to atmel . com, search for the devices you have, then click on "tools". The tools page will show you all the tools available. Apr 19 '13 at 3:41
• I know but I believe they are expensive development tools. I was looking for something more DIY, on the USBasp price range. (why the -1?) Apr 19 '13 at 3:56

There are dozens of different programmers, but they all fall into one or more of these categories:

• JTAG. any JTAG programmer can program any device (not just AVRs, and not even just micros) that accepts JTAG. I have several JTAG programmers (Olimex AVR-JTAG-USB, Terasic's Blaster, Abatron BDI2000). Requires 4 or 5 lines.

• PDI. AVR-specific, 2-wire protocol for programming and debugging. Many AVR programmers support PDI (Dragon, AVRISP, JTAGMkII, etc.)

• ISP. AVR-specific, 5 wire protocol built on top of SPI. Most AVR programmers support this and I believe that every AVR supports this. The bus pirate also works as an AVR ISP programmer.

• HVPP. This mode uses a lot of pins and uses 12V to program the device (as opposed to the normal 1.8-5V supply). I have never used this.

• HVISP. AVR-specific 5 wire protocol which can be used on the ATTiny parts or other AVRs which have had their reset pin disabled. Uses 12V like HVPP, but with much fewer pins. The Dragon is one of very few programmers which support this option.

• TPI. I don't know much about this method, it looks very similar to PDI to me. Used on the ATTiny devices.

For my own stuff, I use JTAG or ISP since they both work well in-circuit, but on a recent design I am using the ATTiny13A and need every pin, so I use a Dragon and HVISP for that design. HVISP isn't really meant for in-circuit programming and there are some caveats that I've had to incorporate into the design to make it work.

Which programmer is right for you? Look around for an inexpensive USB ISP programmer with a case. Get a Dragon if you really need the HV programming modes, but you probably don't need them at this point. Digikey or Mouser are the usual sources but you can build your own, use ebay or any number of sites like ladyada or sparkfun. Definitely don't spend more than $50, you can get the Dragon for$56 from Digikey.

You want a case to protect the programmer because one thing you don't want to is to start guessing whether it's your design or the programmer that's causing you grief. :-)

Edit 1

Which programmer to use for AVR32 and XMEGA? Both can use JTAG, so I'd look for a JTAG programmer. JTAG programmers can be built out of pretty much anything, there are homebrew/"free" designs available, and you could even make one out of a parallel port. I suggest looking at something like a AVR-JTAG-USB or ByteBlaster since they're both about USD\$50 and well supported by avrdude (the software which programs AVRs under Linux and OSX), but as I said, any JTAG cable will work. If you're using AVR Studio then I'd check their list of supported programmers (a link to which I could not find, sadly). I know it does support the AVR-JTAG-USB, and I believe Atmel's official recommendation is the JTAGICE3.

You may want to take a look at LadyAda's AVR Tutorial -- the link goes to their "choosing a programmer" section but the whole tutorial is good.

Edit 2

Why the cost disparity between programmers? Features mostly. Some programmers can only do ISP or JTAG. Some programmers only work with a specific VCC, or make assumptions about whether the device you're programming is powered by the programmer or not. Some programmers do not take care to protect themselves against misconnection, or have "dumb" power supplies which don't shut down in the case of short circuits or overcurrent. I already mentioned that most programmers DO NOT support the high voltage (12V) programming that you may need in some cases.

For starting out with XMEGA and AVR32, I'd recommend the Olimex AVR-JTAG-USB or Terasic ByteBlaster as menitoned above. They're reasonably rugged, have level shifters to match the power supply of the device you're going to program, and reasonably priced.

• Nice post, but is all of this applicable to Xmegas and AT32UC3s? Apr 20 '13 at 23:28
• xmega can use any PDI or JTAG programmer. AT32s can do JTAG and they seem to also have a DFU USB mode. Apr 21 '13 at 0:01