XMega Learning
Toolchain Installation
Linux
This installation is more or less straightforward:
sudo apt get install ...
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:
brew tap calischs/homebrew-avr
brew install calischs/avr/avr-gcc53
brew install calischs/avr/avr-libc20
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
- adc.8E5.c
- adc.8E5.make
- serial.h
- adc.h
- Layout
- Traces
- Outline
- Board
- Tag Connect Programming connector
- Force measurement using onboard 64x gain.
- $7 load cell
USART
XCL
I2C
- hall-encoder.c
- serial.h
- hall-encoder.make
- hall-encoder-layout.png
- hall-encoder-traces.png
- hall-encoder-interior.png
- load.py
- Testing
- Results