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.
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
PIN1 - 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!
11 Responses
Willie Visagie
26|Oct|2009 1This is true. I also use the AVR ISP MKII to program XMega’s via PDI programming. Very fast actually. Question though? How do you use this vir AVRDude, so that I can use this via eclipse?
Regards
frank
26|Oct|2009 2I don’t know. Last time I checked AVRdude, it didn’t support this. I guess it’s just a matter of keeping an eye on AVRdude periodically and waiting until it’s supported.
a.shyamsundar
27|Oct|2009 3hi
this is shyam sundar actually i also heard about AVR but how to use/program it is not known can any one tell me how to ues it/program it
frank
27|Oct|2009 4This is a good place to start:
http://www.avrfreaks.net/
Willie Visagie
17|Mar|2010 5It works in eclipse. Just need to install new usb drivers. Google it…
Atmel Xplain Xmega board Gotchas by Frank's Random Wanderings
08|Apr|2010 6[...] different 6-to-10 pin adaptors. One for Xmega devices that use the PDI programming interface (see my previous post), and a different one for all the other AVR parts that use the older “SPI” or [...]
XMega programming
13|Mar|2011 7I need to program Xmega. I have searched a lot and found that I need to buy AVR ISP mkII programmer.
Is it true? If I buy this programmer can I be sure that I can program Xmega?
Does this programmer programmes just true PDI for XMega?
frank
13|Mar|2011 8Yes, as the posting above says, the AVR ISP II supports programming XMega with PDI. It works.
hyper
22|Mar|2011 9Thanks for the info Frank. I’m looking to get into the xmega products but don’t have the dough at the moment to buy the JTAGICEMKII. I’ll look forward to playing with the Xplain board with my AVRISPMKII. Thanks too for your other Xplain Xmega Gotchas post!
Rick
03|Apr|2011 10Hey Frank, I just got a XMEGA-A1 XPlained evaluation kit and hooked things up like you said but am having no luck programming it. From within either AVR studio 4 or 5 it will not support the ATxmega128A1 from the AVIISP mkII (000200051108). The status for the programmer is Available but it just says ATxmega128A1 Support is No.
I have the eval board powered up and both LEDs are green on the programmer.
Under Tools->AVR programming I have the Tool=AVRISPmkII, Device=ATxmega128A1, Interface=PDI
I cannot read the Device ID but the Target voltage test returns 3.0V
I just get this error “Unable to enter programming mode. Please verify that the programmer is correctly attached to the target and that target power has been switched on. Also verify that the correct device and interface settings have been specified.”
I don’t know what I am missing here.
frank
22|Apr|2011 11I’d suggest you post your question on the forums at avrfreaks.net.
Leave a reply
Search
Categories
Archives
Links
Calendar
A design creation of Design Disease
Copyright © 2009 - Frank's Random Wanderings - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease.