All Topics  
Atmel AVR

 

   Email Print
   Bookmark   Link






 

Atmel AVR



 
 
The AVR is a Modified Harvard architecture
Modified Harvard architecture

The Modified Harvard Architecture is a variation of the Harvard architecture that allows the contents of the instruction memory to be accessed as if it were data....
 8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 RISC
Reduced instruction set computer

The acronym RISC , for reduced instruction set computing, represents a CPU design strategy emphasizing the insight that simplified instructions that "do less" may still provide for higher performance if this simplicity can be utilized to make instructions execute very quickly....
 single chip microcontroller
Microcontroller

A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc....
 (΅C) which was developed by Atmel
Atmel

Atmel Corporation is a manufacturer of semiconductors, founded in 1984. Its focus is on system-level solutions built around flash memory microcontrollers....
 in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory
Flash memory

Flash memory is a non-volatile memory computer storage that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products....
 for program storage, as opposed to One-Time Programmable ROM
Programmable read-only memory

A programmable read-only memory or field programmable read-only memory is a form of digital memory where the setting of each bit is locked by a Fuse or antifuse....
, EPROM
EPROM

An EPROM, or Erasable Programmable Read Only Memory, is a type of memory integrated circuit that retains its data when its power supply is switched off....
, or EEPROM
EEPROM

EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration tables or device configuration....
 used by other microcontrollers at the time.

s believed the AVR basic architecture was conceived by two students at the Norwegian Institute of Technology
Norwegian Institute of Technology

The Norwegian Institute of Technology, known by its Norwegian language acronym NTH is a science institute in Trondheim, Norway. It was established in 1910, and existed as an independent technical university for 85 years, after which it was merged into Norwegian University of Science and Technology ....
 (NTH) Alf-Egil Bogen and Vegard Wollan.

The original AVR MCU was developed at a local ASIC
ASIC

The acronym ASIC, depending on context, may stand for:* Application-specific integrated circuit, an integrated circuit customized for a particular use, rather than intended for general-purpose use...
 house in Trondheim, Norway, where the two founders of Atmel Norway were working as students.






Discussion
Ask a question about 'Atmel AVR'
Start a new discussion about 'Atmel AVR'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Atmega169 Mlf
The AVR is a Modified Harvard architecture
Modified Harvard architecture

The Modified Harvard Architecture is a variation of the Harvard architecture that allows the contents of the instruction memory to be accessed as if it were data....
 8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 RISC
Reduced instruction set computer

The acronym RISC , for reduced instruction set computing, represents a CPU design strategy emphasizing the insight that simplified instructions that "do less" may still provide for higher performance if this simplicity can be utilized to make instructions execute very quickly....
 single chip microcontroller
Microcontroller

A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator, timers, watchdog, serial and analog I/O etc....
 (΅C) which was developed by Atmel
Atmel

Atmel Corporation is a manufacturer of semiconductors, founded in 1984. Its focus is on system-level solutions built around flash memory microcontrollers....
 in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory
Flash memory

Flash memory is a non-volatile memory computer storage that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products....
 for program storage, as opposed to One-Time Programmable ROM
Programmable read-only memory

A programmable read-only memory or field programmable read-only memory is a form of digital memory where the setting of each bit is locked by a Fuse or antifuse....
, EPROM
EPROM

An EPROM, or Erasable Programmable Read Only Memory, is a type of memory integrated circuit that retains its data when its power supply is switched off....
, or EEPROM
EEPROM

EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration tables or device configuration....
 used by other microcontrollers at the time.

Brief History

It is believed the AVR basic architecture was conceived by two students at the Norwegian Institute of Technology
Norwegian Institute of Technology

The Norwegian Institute of Technology, known by its Norwegian language acronym NTH is a science institute in Trondheim, Norway. It was established in 1910, and existed as an independent technical university for 85 years, after which it was merged into Norwegian University of Science and Technology ....
 (NTH) Alf-Egil Bogen and Vegard Wollan.

The original AVR MCU was developed at a local ASIC
ASIC

The acronym ASIC, depending on context, may stand for:* Application-specific integrated circuit, an integrated circuit customized for a particular use, rather than intended for general-purpose use...
 house in Trondheim, Norway, where the two founders of Atmel Norway were working as students. It was known as a ΅RISC (Micro RISC). When the technology was sold to Atmel, the internal architecture was further developed by Alf and Vegard at Atmel Norway, a subsidiary of Atmel founded by the two architects.

Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for.

Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR Microcontrollers.

Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051
Intel 8051

The Intel 8051 is a Harvard architecture, single chip microcontroller which was developed by Intel in 1980 for use in embedded systems. Intel's original versions were popular in the 1980s and early 1990s, but has largely been superseded by a vast range of faster and/or functionally enhanced 8051-compatible devices manufactured by more th...
 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051's having an active-high RESET, while the AVR has an active-low RESET), but other than that, the pinout was identical.

Device Overview

The AVR is a Modified Harvard architecture
Modified Harvard architecture

The Modified Harvard Architecture is a variation of the Harvard architecture that allows the contents of the instruction memory to be accessed as if it were data....
 machine with program and data stored in separate physical memory systems that appear in different address spaces, but having the ability to read data items from program memory using special instructions.

Basic Families

AVRs are generally classified into four broad groups:

  • tinyAVR — the ATtiny series
    • 1–8 kB program memory
    • 8–32-pin package
    • Limited peripheral set


  • megaAVR — the ATmega series
    • 4–256 kB program memory
    • 28–100-pin package
    • Extended instruction set (Multiply instructions and instructions for handling larger program memories)
    • Extensive peripheral set


  • XMEGA — the ATxmega series
    • 16–384 kB program memory
    • 44–64–100-pin package (A4, A3, A1)
    • Extended performance features, such as DMA, "Event System", and cryptography support.
    • Extensive peripheral set with DACs


  • Application specific AVR
    • megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN etc.
    • (Field Programmable System Level Integrated Circuit), an AVR core on-die with an FPGA
      Field-programmable gate array

      A field-programmable gate array is a semiconductor device that can be configured by the customer or designer after manufacturing—hence the name "field-programmable"....
      . The FPSLIC uses SRAM for the AVR program code, unlike all other AVRs. Partly due to the relative speed difference between SRAM and flash, the AVR core in the FPSLIC can run at up to 50MHz.


Device Architecture


Data RAM
Flash
Flash memory

Flash memory is a non-volatile memory computer storage that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products....
, EEPROM
EEPROM

EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration tables or device configuration....
, and SRAM
Static random access memory

Static random access memory is a type of semiconductor memory where the word static indicates that, unlike dynamic random access memory, it does not need to be periodically memory refresh, as SRAM uses bistable latch to store each bit....
 are all integrated onto a single chip, removing the need for external memory. Some devices have an external bus to allow adding additional data memory or memory-mapped devices.

Program Memory (Flash)
Program instructions are stored in non-volatile Flash memory
Flash memory

Flash memory is a non-volatile memory computer storage that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products....
. Although they are 8-bit MCUs, each instruction takes one or two 16-bit words.

The size of the program memory is occasionally indicated in the naming of the device itself (e.g., the ATmega64x line has 64 kB of Flash).

There is no provision for off-chip program memory; all code executed by the AVR core must reside in the on-chip flash.

Internal Data Memory
The data address space
Address space

In computing, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a Node , peripheral device, disk sector or other logical or physical entity....
 consists of the register file
Register file

A register file is an array of processor registers in a central processing unit. Modern integrated circuit-based register files are usually implemented by way of fast static RAMs with multiple ports....
, I/O registers, and SRAM
Static random access memory

Static random access memory is a type of semiconductor memory where the word static indicates that, unlike dynamic random access memory, it does not need to be periodically memory refresh, as SRAM uses bistable latch to store each bit....
.

Internal Registers
The AVRs have 32 single-byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
 register
Processor register

In computer architecture, a processor register is a small amount of Computer storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere....
s and are classified as 8-bit RISC devices.

In most variants of the AVR architecture, the working registers are mapped in as the first 32 memory addresses (000016-001F16) followed by the 64 I/O registers (002016-005F16).

Actual SRAM starts after these register sections (address 006016). (Note that the I/O register space may be larger on some more extensive devices, in which case the memory mapped I/O
Memory-mapped I/O

Memory-mapped I/O and port I/O are two complementary methods of performing input/output between the Central processing unit and peripheral devices in a computer....
 registers will occupy a portion of the SRAM address space.)

Even though there are separate addressing schemes and optimized opcodes for register file and I/O register access, all can still be addressed and manipulated as if they were in SRAM.

In the XMEGA variant, the working register file is not mapped into the data address space; as such, it is not possible to treat any of the XMEGA's working registers as though they were SRAM. Instead, the I/O registers are mapped into the data address space starting at the very beginning of the address space. Additionally, the amount of data address space dedicated to I/O registers has grown substantially to 4096 bytes (000016-0FFF16). As with previous generations, however, the fast I/O manipulation instructions can only reach the first 64 I/O register locations (the first 32 locations for bitwise instructions). Following the I/O registers, the XMEGA series sets aside a 4096 byte range of the data address space which can be used optionally for mapping the internal EEPROM to the data address space (100016-1FFF16). The actual SRAM is located after these ranges, starting at 200016.

EEPROM
Almost all AVR microcontrollers have internal Electrically Erasable Programmable Read Only Memory (EEPROM) for semi-permanent data storage. Like Flash memory, EEPROM can maintain its contents when electrical power is removed.

In most variants of the AVR architecture, this internal EEPROM memory is not mapped into the MCU's addressable memory space. It can only be accessed the 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.

However, some devices in the SecureAVR (AT90SC) family uses a special EEPROM mapping to the data or program memory depending on the configuration. The XMEGA family also allows the EEPROM to be mapped into the data address space.

Since the number of writes to EEPROM is not unlimited — Atmel specifies 100,000 write cycles in their datasheets — a well designed EEPROM write routine should compare the contents of an EEPROM address with desired contents and only perform an actual write if contents need to be changed.

Program Execution

Atmel's AVRs have a three stage, single level pipeline design. This means the next machine instruction is fetched as the current one is executing. Most instructions take just one or two clock cycles, making AVRs relatively fast among the eight-bit microcontrollers.

The AVR family of processors were designed with the efficient execution of compiled
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 code in mind and has several built-in pointers for the task.

Instruction Set

The AVR Instruction Set is more orthogonal
Orthogonal instruction set

Orthogonal instruction set is a term used in computer engineering. A computer's instruction set is said to be orthogonal if any instruction can use data of any type via any addressing mode....
 than most eight-bit microcontrollers, in particular the PIC microcontroller
PIC microcontroller

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division....
s with which AVR competes today. However, it is not completely regular:
  • Pointer registers X, Y, and Z have addressing capabilities that are different from each other.
  • Register
    Register

    Register may refer to:In linguistics:* Tone #Register tones and contour tones, a linguistics term for tones distinguished by relative pitch...
     locations R0 to R15 have different addressing capabilities than register locations R16 to R31.
  • I/O ports 0 to 31 have different addressing capabilities than I/O ports 32 to 63.
  • CLR affects flags, while SER does not, even though they are complementary instructions. CLR set all bits to zero and SER sets them to one. (Note that CLR is pseudo-op for EOR R, R; and SER is short for LDI R,$FF. Math operations such as EOR modify flags while moves/loads/stores/branches such as LDI do not.)


The mostly-regular instruction set makes programming it using C (or even Ada) compilers fairly straightforward. In fact, Atmel solicited input from major developers of compilers for small microcontrollers, to determine the instruction set features that were most useful in a compiler for high-level languages.

MCU Speed

The AVR line can normally support clock speeds from 0-20 MHz, with some devices reaching 32 MHz. Lower powered operation usually requires a reduced clock speed. All recent (Tiny and Mega, but not 90S) AVRs feature an on-chip oscillator, removing the need for external clocks or resonator circuitry. Some AVRs also have a system clock prescaler that can divide down the system clock by up to 256. This prescaler can be reconfigured by software during run-time, allowing to optimize clock speed.

Since all operations (excluding literals) on registers R0 - R31 are single cycle, the AVR can achieve up to 1MIPS per MHz. Loads and stores to/from memory take 2 cycles, branching takes 3 cycles.

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 different peripheral and memory combinations. Compatibility amongst chips is fairly good.

See external links for sites relating to AVR development.

Features

Current AVRs offer a wide range of features:
  • Multifunction, Bi-directional General Purpose I/O ports with configurable, built-in pull-up resistor
    Pull-up resistor

    Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected....
    s
  • Multiple Internal Oscillators
  • Internal, Self-Programmable Instruction Flash Memory
    Flash memory

    Flash memory is a non-volatile memory computer storage that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products....
     up to 256 K
    • In-System Programmable
      In-System Programming

      In-System Programming is the ability of some programmable logic devices, microcontrollers, and other programmable electronic chips to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system....
       using ISP, JTAG
      JTAG

      Joint Test Action Group is the common name used for the Institute of Electrical and Electronics Engineers 1149.1 standard entitled Standard Test Access Port and Boundary-Scan Architecture for test access ports used for testing printed circuit boards using boundary scan....
      , or High Voltage methods
    • Optional Boot Code Section with Independent Lock Bits for Protection
  • On chip debugging (OCD) support through JTAG or debugWIRE on most devices
    • The JTAG signals (TMS, TDI, TDO, and TCK) are multiplexed on GPIO
      GPIO

      General is an acronym of General Purpose Input/Output.A microprocessor, microcontroller or Physical interface device may have one or more GPIO connections, to interface with the outside world....
      s. These pins can be configured to function as JTAG or GPIO depending on the setting of a fuse bit, which can be programmed via ISP or HVSP. By default, AVRs with JTAG come with the JTAG interface enabled.
    • debugWIRE uses the /RESET pin as a bi-directional communication channel to access on-chip debug circuitry. It is present on devices with lower pin counts, as it only requires one pin. debugWIRE can only be enabled using ISP or HVSP. Once enabled, it can only be disabled via the debugWIRE interface.
  • Internal Data EEPROM
    EEPROM

    EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration tables or device configuration....
     up to 4 kB
  • Internal SRAM
    Static random access memory

    Static random access memory is a type of semiconductor memory where the word static indicates that, unlike dynamic random access memory, it does not need to be periodically memory refresh, as SRAM uses bistable latch to store each bit....
     up to 8 K
  • External 64KB little endian data space on certain models, including the Mega8515 and Mega162.
    • The external data space is overlaid with the internal data space, such that the full 64KB address space does not appear on the external bus. An accesses to e.g. address 010016 will access internal RAM, not the external bus.
    • In certain members of the XMEGA series, the external data space has been enhanced to support both SRAM and SDRAM. As well, the data addressing modes have been expanded to allow up to 16MB of data memory to be directly addressed.
    • AVR's generally do not support executing code from external memory. Some ASSP's
      Application specific standard product

      An application specific standard product or ASSP is an integrated circuit that implements a specific function that appeals to a wide market....
       using the AVR code do support external program memory.
  • 8-Bit and 16-Bit Timers
    • PWM
      Pulse-width modulation

      Pulse-width modulation of a Signalling or Power source involves the modulation of its duty cycle, to either convey information over a communications channel or control the amount of power sent to a load....
       output (Dead time generator on some devices)
    • Input capture
  • Analog Comparators
  • 10 or 12-Bit A/D Converters
    Analog-to-digital converter

    An analog-to-digital converter is a device which converts continuous signal to Discrete signal digital numbers. The reverse operation is performed by a digital-to-analog converter ....
    , with multiplex of up to 16 channels
  • 12-bit D/A Converters
    Digital-to-analog converter

    In electronics, a digital-to-analog converter is a device for converting a digital code to an analog signal .An analog-to-digital converter performs the reverse operation....
  • A variety of serial interfaces, including
    • I²C
      I²C

      I?C isa multi-master bus serial communications computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard, embedded system, or cellphone....
       Compatible Two-Wire Interface (TWI)
    • Synchronous/Asynchronous Serial Peripherals (UART/USART) (used with RS-232
      RS-232

      In telecommunications, RS-232 is a standard for serial communications binary data signals connecting between a DTE and a DCE . It is commonly used in computer serial ports....
      , RS-485, and more)
    • Serial Peripheral Interface Bus
      Serial Peripheral Interface Bus

      The Serial Peripheral Interface Bus or SPI bus is a synchronous Serial communications standard named by Motorola that operates in full duplex mode....
       (SPI)
    • Universal Serial Interface (USI) for Two or Three-Wire Synchronous Data Transfer
  • Brownout
    Power outage

    A power outage refers to the short- or long-term loss of the electric power to an area.There are many causes of power failures in an electricity network....
     Detection
  • Watchdog Timer
    Watchdog timer

    A watchdog timer is a computer hardware timing device that triggers a system Reset if the main computer program, due to some fault condition, such as a hang , neglects to regularly service the watchdog ....
     (WDT)
  • Multiple Power-Saving Sleep Modes
  • Lighting and motor control (PWM
    Pulse-width modulation

    Pulse-width modulation of a Signalling or Power source involves the modulation of its duty cycle, to either convey information over a communications channel or control the amount of power sent to a load....
     Specific) Controller models
  • CAN
    Controller Area Network

    Controller?area network is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer....
     Controller Support
  • USB Controller Support
    • Proper Full-speed (12 Mbit/s) hardware & Hub controller with embedded AVR.
    • Also freely available Low-speed (1.5 Mbit/s) (HID
      Human interface device

      A human interface device or HID is a type of Peripheral that interacts directly with, and most often takes Input device from, humans and may deliver Output device to humans....
      ) bitbanging software emulations
  • Ethernet
    Ethernet

    Ethernet is a family of Data frame-based computer networking technologies for local area networks . The name comes from the physical concept of the Luminiferous aether....
     Controller Support
  • LCD Controller Support
  • Low-voltage Devices Operating Down to 1.8v
  • picoPower Devices
  • DMA
    Direct memory access

    Direct memory access is a feature of modern computers and microprocessors that allows certain hardware subsystems within the computer to access system Computer storage for reading and/or writing independently of the central processing unit....
     controllers and "Event System" peripheral communication.
  • Fast Cryptography support for AES
    Advanced Encryption Standard

    In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
     and DES
    Data Encryption Standard

    The Data Encryption Standard is a block cipher that was selected by National Bureau of Standards as an official Federal Information Processing Standard for the United States in 1976 and which has subsequently enjoyed widespread use internationally....


Development Tools and Evaluation Kits

Official Atmel AVR development tools and evaluation kits consists of a small number of starter kits and debugging tools with support for most AVR devices:

STK500 Starter Kit

The STK500 starter kit and development system features ISP and high voltage programming (HVP) for all AVR devices, either directly or through extension boards. The board is fitted with DIP sockets for all AVRs available in DIP packages.

STK500 Expansion Modules: Several expansion modules are available for the STK500 board:
  • STK501 - Adds support for microcontrollers in 64-pin TQFP packages.
  • STK502 - Adds support for LCD AVRs in 64-pin TQFP packages.
  • 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-pin microcontrollers from the AT90PWM family.
  • STK524 - Adds support for the ATmega32M1/C1 32-pin CAN/LIN/Motor Control family.
  • STK525 - Adds support for the AT90USB microcontrollers in 64-pin TQFP packages.
  • STK526 - Adds support for the AT90USB microcontrollers in 32-pin TQFP packages


AVR ISP and AVR ISP mkII

The AVR ISP and AVR ISP mkII are inexpensive tools allowing all AVRs to be programmed via ICSP
ICSP

ICSP may refer to:*In Circuit Serial Programming , a method in programming*Indian Centre for Space Physics, a research institute in India*Institute of Corporate Secretaries of Pakistan, a professional body in Pakistan...
.

The AVR ISP connects to a PC via a serial port, and draws power from the target system. The AVR ISP allows using either of the "standard" ICSP pinouts, either the 10-pin or 6-pin connector. The AVR ISP has been discontinued, replaced by the AVR ISP mkII.

The AVR ISP mkII connects to a PC via USB, and draws power from USB. LEDs visible through the translucent case indicate the state of target power.

AVR Dragon (USB)

The Dragon is an inexpensive tool allowing all AVRs to be programmed via JTAG, HVP or ICSP. The Dragon allows debugging of AVRs with 32KB or less of program memory, via JTAG or DebugWire. The Dragon has a small prototype area which can accommodate an 8, 28, or 40-pin AVR, including connections to power and programming pins. There is no area for any additional circuitry.

JTAG (IEEE 1149.1)

The Joint Test Action Group, In Circuit Emulator (JTAGICE) debugging tool supports on-chip debugging (OCD) of AVRs with a JTAG boundary-scan interface. The original JTAGICE is no longer in production, however it has been replaced by the JTAGICE mkII.

JTAGICE mkI

The JTAGICE mkI debugging tool supports on-chip debugging (OCD) of older AVRs with JTAG interface. Newer devices using the debugWire interface cannot be debugged.

JTAGICE mkII

The JTAGICE mkII debugging tool supports on-chip debugging (OCD) of AVRs with JTAG or debugWIRE interface. The debugWire interface enables debugging using only one pin (the Reset pin), allowing debugging of applications running on low pin-count microcontrollers.

The Butterfly Demo Board

The very popular AVR Butterfly demonstration board is a self-contained, battery-powered computer running the Atmel AVR ATmega169V microcontroller. It was built to show-off the AVR family especially a new built-in LCD interface. The board includes the LCD screen, joystick, speaker, serial port, real time clock (RTC), flash memory chip, and both temperature and voltage sensors. Earlier versions of the AVR Butterfly also contained a CdS photoresistor
Photoresistor

A photoresistor or light dependent resistor or cadmium sulfide cell is a resistor whose electrical resistance decreases with increasing incident light intensity....
; it is not present on Butterfly boards produced after June 2006 to allow RoHS compliance. The small board has a shirt pin on its back so it can be worn as a name badge.

The AVR Butterfly comes preloaded with software to demonstrate the capabilities of the microcontroller. Factory firmware can scroll your name, display the sensor readings, and show the time. The AVR Butterfly also has a piezo speaker that can be used to reproduce sounds and music.

The AVR Butterfly demonstrates LCD driving by running a 14-segment, six alpha-numeric character display. However, the LCD interface consumes many of the I/O pins.

The Butterfly's ATmega169 CPU is capable of speeds up to 8 MHz, however it is factory set by software to 2 MHz to preserve the button battery life. A pre-installed bootloader program allows the board to be re-programmed via a standard RS-232 serial plug with new programs that users can write with the free Atmel IDE tools.

AT90USBKey

This small board, about half the size of a business card, is priced at slightly more than an AVR Butterfly. It includes an at90usb1287 with USB-OTG support, 16 MB of DataFlash
DataFlash

DataFlash is a low pin-count serial interface for flash memory. It is an Atmel proprietary interface, compatible with the Serial Peripheral Interface Bus....
, LEDs, a small joystick, and a temperature sensor. It's clocked at 8 MHz, and comes with 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.

Only the JTAG port uses conventional 2.54mm pinout. All the other AVR I/O ports require more compact 1.27mm headers, which are not widely supported.

Since it has 128 KB of flash memory, a JTAGICE mkII is the best debug solution; a Dragon can program it, but can't examine its status. You can also program it through USB from a Windows or Linux host, using the USB "Device Firmware Update" protocols. Atmel ships proprietary (source code included but distribution restricted) example programs and a USB protocol stack with the device. is a third party free software
Free software

Free Software or software libre is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with minimal restrictions only to ensure that further recipients can also do these things and to prevent consumer-facing hardware...
 (MIT license
MIT License

The MIT License is a free software license originating at the Massachusetts Institute of Technology , used by the MIT X Consortium.It is a Permissive_free_software_licence license, meaning that it permits reuse within proprietary software on the condition that the license is distributed with that software....
) USB protocol stack for the USBKey.

Raven Wireless Kit

The RAVEN kit supports wireless development using Atmel's IEEE 802.15.4
IEEE 802.15.4

IEEE 802.15.4-2006 is a standard which specifies the physical layer and Media Access Control for low-rate wireless personal area networks . It is maintained by the IEEE 802.15 working group....
 chipsets, for ZigBee
ZigBee

ZigBee is a specification for a suite of high level communication protocols using small, low-power digital radios based on the IEEE 802.15.4-2006 standardization for wireless personal area networks , such as wireless headphones connecting with cell phones via short-range radio....
 and other wireless stacks. It resembles a pair of wireless more-powerful Butterfly 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 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 Butterfly: piezo speaker, DataFlash (bigger), external EEPROM, sensors, 32K crystal for RTC, and so on. These are intended for use developing remote sensor nodes, to control relays, or whatever is needed.

The USB stick uses an AT90usb1287 for connections to a USB host and to the 2.4 GHz wireless links. These are intended to monitor and control the remote nodes, relying on host power rather than local batteries.

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. has a comprehensive list.

Atmel AVR Usage

AVRs have been used in various automotive applications such as security, safety, powertrain and entertainment systems. Atmel has recently launched a new publication "Atmel Automotive Compilation" to help developers with automotive applications. Some current usages are in BMW, Daimler-Chrysler and TRW.

The Arduino
Arduino

Arduino is a physical computing platform based on a simple input/output board and a development environment that implements the Processing /Wiring language....
 physical computing
Physical computing

Physical computing, in the broadest sense, means building interactive physical systems by the use of software and hardware that can sense and respond to the analog signal world....
 platform is based on an ATMega168 (or ATmega8 in older versions) processor.

USB-based AVRs have been used in the Microsoft Xbox hand controllers. The link between the controllers and Xbox is USB.

Lego has recently released the firmware source code files for 8-bit AVRs to aid in the development of open-source alternatives to its popular robotics NXT
Lego Mindstorms NXT

Lego Mindstorms NXT is a programmable robotics kit released by Lego in late July 2006.It replaces the first-generation Lego Mindstorms kit, which was called the Lego Mindstorms#Robotics Invention System....
 "brick" operating system.

Several companies produce AVR-based microcontrollers intended for use by hobbyists, robot builders, experimenters and small system developers (many of which are pin compatible with the PIC
PIC microcontroller

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division....
-based Basic Stamp
BASIC Stamp

The BASIC Stamp is a microcontroller with a small, specialized BASIC programming language interpreter built into read-only memory. It is made by Parallax, Inc....
) including , , , and .

recently released the "System on a Chip", which is a Motor and Motion Control Chip, the with an Atmel AVR Core married to an Advanced Motion Controller for use in a variety of motion applications.

The New 32-Bit AVRs

In 2006 Atmel released microcontrollers based on the new, 32-bit, AVR32
AVR32

The AVR32 is a 32-bit RISC microprocessor architecture designed by Atmel. The microprocessor architecture was designed by a handful of people educated at the Norwegian University of Science and Technology, including lead designer ?yvind Str?m, PhD and CPU architect Erik Renno, M.Sc in Atmel's Norwegian design center....
 architecture. They include SIMD
SIMD

In computing, SIMD is a technique employed to achieve data level parallelism....
 and DSP
Digital signal processor

A digital signal processor is a specialized microprocessor designed specifically for digital signal processing, generally in real-time computing....
 instructions, along with other audio and video processing features. This 32-bit family of devices is intended to compete with the ARM
ARM architecture

The ARM architecture is a 32-bit RISC central processing unit architecture developed by ARM Limited that is widely used in embedded system designs....
 based processors. The instruction set is similar to other RISC cores, but is not compatible with the original AVR or any of the various ARM cores.

Footnotes



External links