Recently I’ve been doing some Atmel AVR Xmega work. The Atmel website says that their low-cost programmer, the AVRISP2, can be used to program an xmega device. But their (current) documentation would appear to tell a very different story. If you read the documentation, you’d reasonably conclude that it wouldn’t work at all.

In fact the AVRISP MkII can be used to program an Xmega part. You just need to know how to hook it up.

AVRISP

First of all, make sure you’re using the very latest version of AVR Studio, as you’ll need to use that as your programming software.  (AVR Studio also contains a decent IDE, and a plugin to support the free WinAVR C compiler, so it’s actually much more than just a programming program, if you want it to be.)

The AVRISP2 has a 6-pin header.  Here’s how to connect it to an Xmega part:

AVRISP2
PIN

1    -    xmega PDI data pin
2    -    xmega VCC power rail
3    -    no connect
4    -    no connect
5    -    xmega PDI clock (often the xmega reset pin)
6    -    xmega GND power rail

That’s it. Only 4 pins to hook up. Now you can tell AVR studio which xmega part you have, select the AVRISP MkII programmer, and program away. Easy!