The high-performance, low-power Atmel AVR RISC-based CMOS 8-bit microcontroller combines 32K ISP flash memory with read-while-write capabilities, 1KB bytes EEPROM, 2KB SRAM, 32 general purpose I/O lines, 32 general purpose working registers, real time counter, three flexible timer/counters with compare modes and PWM, 2 USARTs, a byte oriented 2-wire serial interface, an 8-channel/10-bit A/D converter with optional differential input stage with programmable gain, programmable watchdog timer with internal oscillator, SPI serial port, a JTAG (IEEE 1149.1 compliant) test interface for on-chip debugging and programming, and six software selectable power saving modes. By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and processing speed.