Atmel AVR facts for kids
The AVR microcontroller architecture was developed by Atmel in 1996. It is based on the Harvard microcontroller architecture. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
Many people think that AVR stands for Alf (Egil Bogen) and Vegard (Wollan)'s Risc processor".
This architecture replaces older MCS-51 architecture. One machine cycle of MCS-51 takes 12 clock cycles and most of instructions are executed in one machine cycle.
AVR microcontrollers (MCUs) can execute most of instructions in single machine cycle too, but one machine cycle takes only one clock cycle. Performance per clock cycle is 12 times higher with AVR.
The core has 32 general purpose registers directly connected to ALU. It allowing two independent registers to be accessed and instruction with them executed in one machine cycle.
Basic families
tinyAVR
- 0,5-8 kB program memory
- up to 0,5 kB SRAM
- up to 0,5 kB EEPROM
- up to 20 MHz
- 6-32 pin package
megaAVR
- 4-256 kB program memory
- 0,5-16kB SRAM
- 0,5-4 kB EEPROM
- up to 20 MHz
- 20-100 pin package
XMEGA
- 16-384kB program memory
- 2-32 kB SRAM
- external Bus Interface for up to 16M bytes SRAM of SDRAM
- 1-4 kB EEPROM
- up to 32 MHz
- 44-100 pin package
Features
Every AVR has some input/output ports. The port has up to 8 physical pins on its package. Every pin can be configured as input or output. If a pin is used for input, it can turn on built-in pull-up resistors through register PORTx. If a pin is configured as output, it can handleup to 40mA of load per pin and max 100mA for all pins on the port.
A/D converter
- 10-bit (tinyAVR, megaAVR) with multiplex up to 8 channels
- 12-bit (XMEGA) with multiplex up to 16 channels
Timers/counters (8-bit or 16-bit)
- Users can configure it asi PWM, counter or timer.
- In simple PWM mode, the counting register runs without stopping and is compared to another register. If the counting register is higher than second register pin Ocx is set to „1“. In other time is pin Ocx set to „0“.
- Counter have some external source like photo sensor and can count amount of people which pass photo sensor.
- Timer gives pulses in exact time. It is used for programing clock applications.
TWI – Two Wire Interface This uses the same protocol as I2C and can be used as I2C interface
UART/USART The UART can be used for RS232/RS485 communication.
SPI - Serial Peripheral Interface
- very fast serial bus which is used for data transfer of communication with devices
- you can burn/read program into/from program memory or EEPROM through this bus
USI - Universal Serial Interface
- used for two or three wire synchronous data transfer
JTAG
- interface for online debugging
D/A converter
- 12-bit (only XMEGA) with multiplex up to 2 channels
Related pages
- Primary Sources
- , numerous AVR links
Images for kids
-
Various older AVR microcontrollers: ATmega8 in 28-pin narrow dual in-line package (DIP-28N), ATxmega128A1 in 100-pin thin quad flat pack (TQFP-100) package, ATtiny45 in 8-pin small outline (SO-8) package.
See also
In Spanish: AVR para niños