Circuit Lake

Electronic Project and Circuit Collection

Programming AVR ATxMega using USBasp

09/05/2012 Category: AVR, Microcontroller, Miscellaneous

ATxmega programmer has different interface than 8-bit AVRs. It uses PDI interface instead of ISP. If you don’t want to buy new programmer for ATxmega you can try this little hack done by Szu. He uses USBASP (USB in-circuit programmer for Atmel 8-bit AVR controllers) with some modification to program AVR ATxmega. The hack convert SCK line to PDI DATA and MOSI becomes PDI CLK. Be sure to drop SCK and MOSI voltage from 5V to 3.3V using zener and resistor since PDI operates at 3,3V.

simple ATxmega programmer

Next step is upgrading your USBASP Firmware with new firmware that supporting PDI. Another programmer is needed to do this. And don’t forget to download AVRDUDE with patch that supporting USBASP with PDI. This Upgraded USBASP still can be used to program old AVRs (without the interface).