The high-performance, low-power 8/16-bit AVR XMEGA microcontroller combines 64KB ISP flash memory (4KB boot code section) with read-while-write capabilities, 2KB EEPROM, 4KB SRAM, a four-channel event system, a programmable multi-level interrupt controller, 50 general purpose I/O lines, a 16-bit real time counter, five flexible 16-bit timer/counters with compare modes and PWM, three USARTs, two 2-wire interfaces, two serial peripheral interfaces, one 16-channel/12-bit A/D converter with optional differential input with programmable gain, two analog comparators with window mode, a programmable watchdog timer with separate internal oscillator, accurate internal oscillators with PLL and prescaler, and a programmable brown-out detection. The Program and Debug Interface (PDI), a fast 2-pin interface for programming and debugging, is available. By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.