Atmel AVR
Atmel AVR
Atmel AVR
AVR logo
2 Device overview
Atmel ATmega8 in 28-pin narrow DIP
Brief history
2
Extensive peripheral set
XMEGA the ATxmega series
16384 KB program memory
4464100-pin package (A4, A3, A1)
32-pin package: XMEGA-E (XMEGA8E5)
Extended performance features, such as
DMA, Event System, and cryptography
support
Extensive peripheral set with ADCs
Application-specic AVR
DEVICE OVERVIEW
2.2
Device architecture
The very smallest of the tinyAVR variants use a reduced architecture with only 16 registers (r0 through r15
are omitted) which are not addressable as memory loca2.2.1 Program memory
tions. I/O memory begins at address 000016 , followed
Program instructions are stored in non-volatile ash by SRAM. In addition, these devices have slight deviamemory. Although the MCUs are 8-bit, each instruction tions from the standard AVR instruction set. Most notakes one or two 16-bit words.
tably, the direct load/store instructions (LDS/STS) have
2.3
Program execution
3
same way an external peripheral device is, using special pointer registers and read/write instructions, which
makes EEPROM access much slower than other internal
RAM.
GPIO ports
cution of compiled C code in mind and have several built DDRx: Data Direction Register, congures the pins in pointers for the task.
as either inputs or outputs.
PORTx: Output port register. Sets the output value 2.4 Instruction set
on pins congured as outputs. Enables or disables
Main article: Atmel AVR instruction set
the pull-up resistor on pins congured as inputs.
PINx: Input register, used to read an input signal.
On some devices (but not all, check the datasheet),
this register can be used for pin toggling: writing a
logic one to a PINx bit toggles the corresponding bit
in PORTx, irrespective of the setting of the DDRx
bit.[8]
xmegaAVR have additional registers for push/pull,
totem-pole and pullup congurations.
2.2.5
EEPROM
DEVICE OVERVIEW
2.5
MCU speed
2.6
Development
AVRs have a large following due to the free and inexpensive development tools available, including reasonably
priced development boards and free development software. The AVRs are sold under various names that share
the same basic core, but with dierent peripheral and
memory combinations. Compatibility between chips in
each family is fairly good, although I/O controller features
may vary.
See external links for sites relating to AVR development.
2.7
Features
3.1
ISP
Analog comparator
MISO
1
1
VCC
MOSI
VCC
SCK
MOSI
NC
GND
RST
GND
RST
GND
SCK
GND
MISO
10
GND
ISP
HEADERS
TOP
VIEW
3.1 ISP
3.2 PDI
The Program and Debug Interface (PDI) is an Atmel proLow-voltage devices operating down to 1.8 V (to 0.7 prietary interface for external programming and on-chip
debugging of XMEGA devices. The PDI supports highV for parts with built-in DCDC upconverter)
speed programming of all non-volatile memory (NVM)
picoPower devices
spaces; ash, EEPROM, fuses, lock-bits and the User
Signature Row. This is done by accessing the XMEGA
DMA controllers and event system peripheral NVM controller through the PDI interface, and executing
communication.
NVM controller commands. The PDI is a 2-pin interface
using the Reset pin for clock input (PDI_CLK) and a dedFast cryptography support for AES and DES
icated data pin (PDI_DATA) for input and output.[16]
Programming interfaces
4.2 JTAG
The Joint Test Action Group (JTAG) feature provides access to on-chip debugging functionality while the chip
3.4 High-voltage parallel
is running in the target system.[23] JTAG allows accessing internal memory and registers, setting breakpoints on
High-voltage parallel programming (HVPP) is consid- code, and single-stepping execution to observe system beered the nal resort and may be the only way to correct haviour.
bad fuse settings on an AVR chip.
Atmel provides a series of JTAG adapters for the AVR:
3.5
Bootloader
3.6
ROM
3.7
aWire
Debugging interfaces
4.1
debugWIRE
debugWIRETM is Atmels solution for providing on-chip 5 Development tools and evaluadebug capabilities via a single microcontroller pin. It is
tion kits
particularly useful for lower pin count parts which cannot provide the four spare pins needed for JTAG. The
JTAGICE mkII, mkIII and the AVR Dragon support de- Ocial Atmel AVR development tools and evaluation kits
bugWIRE. debugWIRE was developed after the original contain a number of starter kits and debugging tools with
support for most AVR devices:
JTAGICE release, and now clones support it.
5.3
7
STK503 Adds support for microcontrollers in
100-pin TQFP packages.
STK504 Adds support for LCD AVRs in 100-pin
TQFP packages.
STK505 Adds support for 14 and 20-pin AVRs.
STK520 Adds support for 14 and 20, and 32-pin
microcontrollers from the AT90PWM and ATmega
family.
5.1
STK525 Adds support for the AT90USB microcontrollers in 64-pin TQFP packages.
The STK600 starter kit and development system is an update to the STK500.[30] The STK600 uses a base board,
a signal routing board, and a target board.
STK526 Adds support for the AT90USB microcontrollers in 32-pin TQFP packages.
The base board is similar to the STK500, in that it provides a power supply, clock, in-system programming, an 5.3 STK200 starter kit
RS-232 port and a CAN (Controller Area Network, an
automotive standard) port via DE9 connectors, and stake The STK200 starter kit and development system has a
DIP socket that can host an AVR chip in a 40, 20, or
pins for all of the GPIO signals from the target device.
8-pin package. The board has a 4 MHz clock source, 8
The target boards have ZIF sockets for DIP, SOIC, QFN, light-emitting diode(LED)s, 8 input buttons, an RS-232
or QFP packages, depending on the board.
port, a socket for a 32k SRAM and numerous general I/O.
The signal routing board sits between the base board and The chip can be programmed with a dongle connected to
the target board, and routes the signals to the proper pin the parallel port.
on the device board. There are many dierent signal routing boards that could be used with a single target board,
5.4 AVRISP and AVRISP mkII
depending on what device is in the ZIF socket.
The STK600 allows in-system programming from the PC
via USB, leaving the RS-232 port available for the target
microcontroller. A 4 pin header on the STK600 labeled
'RS-232 spare' can connect any TTL level USART port
on the chip to an onboard MAX232 chip to translate the
signals to RS-232 levels. The RS-232 signals are connected to the RX, TX, CTS, and RTS pins on the DB-9
connector.
5.2
The AVRISP and AVRISP mkII are inexpensive tools allowing all AVRs to be programmed via ICSP.
or 6-pin connector. The AVRISP has been discontinued, bugWIRE interfaces. The debugWire interface enables
replaced by the AVRISP mkII.
debugging using only one pin (the Reset pin), allowing
The AVRISP mkII connects to a PC via USB and draws debugging of applications running on low pin-count mipower from USB. LEDs visible through the translucent crocontrollers.
case indicate the state of target power.
5.5
AVR Dragon
JTAGICE3
5.6
JTAGICE mkI
5.13
Third-party programmers
9
Buttery cards, plus a wireless USBKey; and costing
about that much (under $US100). All these boards support JTAG-based development.
The kit includes two AVR Raven boards, each with a 2.4
GHz transceiver supporting IEEE 802.15.4 (and a freely
licensed ZigBee stack). The radios are driven with ATmega1284p processors, which are supported by a custom
segmented LCD display driven by an ATmega3290p processor. Raven peripherals resemble the Buttery: piezo
speaker, DataFlash (bigger), external EEPROM, sensors,
32 kHz crystal for RTC, and so on. These are intended for
use in developing remote sensor nodes, to control relays,
or whatever is needed.
5.11 AT90USBKey
This small board, about half the size of a business card,
is priced at slightly more than an AVR Buttery. It includes an AT90USB1287 with USB On-The-Go (OTG)
support, 16 MB of DataFlash, LEDs, a small joystick,
and a temperature sensor. The board includes software,
which lets it act as a USB mass storage device (its documentation is shipped on the DataFlash), a USB joystick,
and more. To support the USB host capability, it must
be operated from a battery, but when running as a USB
peripheral, it only needs the power provided over USB.
Third-party programmers
A wide variety of third-party programming and debugging tools are available for the AVR. These devices use
various interfaces, including RS-232, PC parallel port,
and USB. AVR Freaks has a comprehensive list.
10
REFERENCES
8 See also
Arduino
AVR32
Atmel AVR ATmega8 28-pin DIP on a custom development board
9 References
memory capabilities, have also been employed to develop
the Arduino Mega platform. Arduino boards can be used
with its language and IDE, or with more conventional programming environments (C, assembler, etc.) as just standardized and widely available AVR platforms.
USB-based AVRs have been used in the Microsoft Xbox
hand controllers. The link between the controllers and
Xbox is USB.
Numerous companies produce AVR-based microcontroller boards intended for use by hobbyists, robot
builders, experimenters and small system developers including: Cubloc,[39] gnusb,[40] BasicX,[41] Oak
Micros,[42] ZX Microcontrollers,[43] and myAVR.[44]
There is also a large community of Arduino-compatible
boards supporting similar users.
[1] Since 1996, NTH has become part of the Norwegian University of Science and Technology (NTNU)
[2] alfbogen.com blog
[3] The Story of AVR. youtube.com.
[4] The AVR Microcontroller and C Compiler Co-Design
(PDF). Retrieved 2012-09-19.
[5] UNSW School of Computer Science and Engineering General AVR Info. Cse.unsw.edu.au. Retrieved 201209-19.
[6] Atmel press release. Atmels AVR Microcontroller Ships
500 Million Units.
Schneider Electric produces the M3000 Motor and Motion Control Chip, incorporating an Atmel AVR Core and
an advanced motion controller for use in a variety of motion applications.[45]
FPGA clones
[8] http://www.atmel.com/Images/
Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_
AVR-8-bit-Microcontroller-ATtiny25Datasheet.pdf
ATtiny45-ATtiny85_Datasheet.pdf
[10] AVR319: Using the USI module for SPI communication (PDF). Atmel. 2004. Retrieved 10 June 2014.
11
[14] AVR Hardware Design Considerations (PDF) (application note). Atmel Corporation. Jun 2015. p. 5. Retrieved
14 Jun 2015. The reset line has an internal pull-up resistor, but if the environment is noisy it can be insucient
and reset can therefore occur sporadically.
[15] AVRDUDE programmer. Savannah.nongnu.org. Retrieved 2012-09-19.
[16] PDI programming driver (PDF). Retrieved 2012-0919.
[17] HVSP_Description.
2012-09-19.
Support.atmel.no.
Retrieved
[48] Navr AVR clone (8-bit RISC) :: Overview. OpenCores. Retrieved 2012-09-19.
10 Further reading
Atmel.com.
Re-
11 External links
Ocial
Atmel AVR
Communities
AVR Freaks community
12
Arduino community
Other
Atmel AVR at DMOZ, numerous AVR links
AVR-Libc
Atmel AVR Serial Port Programmer
Why you need a clock source for the AVR?
AVR Basics - AVR guide for beginners
Simplest AVR programmer Using LPT Port
ATmega8 Breadboard Tutorial
AVR
DIP-Package
Pinout
Diagrams:
ATtiny44/45/84/85, ATmega328P, ATmega644P,
ATmega1284P
AVR
TQFP-Package
Pinout
Diagrams:
ATmega328, ATmega2560, ATmega32U4
11
EXTERNAL LINKS
13
12
12.1
12.2
Images
12.3
Content license