XMega Learning

Toolchain Installation

Linux

This installation is more or less straightforward:

TODO: do a fresh install and make notes.

Mac

Cross pack is a great bundle available via homebrew for these tools. Unfortunately, currently (3/21/2016) it doesn't include avr-libc v2.0, and so doesn't include support for the xmega8e5. I made an experimental homebrew tap with avr-libc v2.0 and arg-gcc 5.3.0. To get it, run:

Also, as of 10/31/2016, there seems to be some strange behavior when trying to use an Atmel Ice programmer from a mac. When you try to program, you may see an error message from usbdev_open() about not claiming the interface. I used the answer posted here (post 32 and 33) -- the attached kext file already has the correct VID and PID. A full restart was required.

Examples

Below are projects using the xmega peripherals as I'm learning about them. They definitely aren't minimal "hello world" examples, but at some point hopefully I'll get around to boiling them down. For the moment, however, hopefully they demonstrate how to use each capability of the mcu.

DAC

Quadrature Decoding with Timer/Counters

ADC

USART

XCL

I2C

USB

DMA

WEX