AVR microcontrollers

Last updated
AVR logo Avr logo.svg
AVR logo
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. AVR group.jpg
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.
ATmega328P in 28-pin narrow dual in-line package (DIP-28N). It is commonly found on Arduino boards. ATMEGA328P-PU.jpg
ATmega328P in 28-pin narrow dual in-line package (DIP-28N). It is commonly found on Arduino boards.

AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. These are modified Harvard architecture 8-bit RISC single-chip microcontrollers. 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.

Contents

AVR microcontrollers find many applications as embedded systems. They are especially common in hobbyist and educational embedded applications, popularized by their inclusion in many of the Arduino line of open hardware development boards.

History

The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH), [1] Alf-Egil Bogen [2] and Vegard Wollan. [3]

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. [3] However, it is commonly accepted that AVR stands for Alf and Vegard's RISC processor. [4] Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR microcontrollers.

The original AVR MCU was developed at a local ASIC house[ clarification needed ] in Trondheim, Norway, called Nordic VLSI at the time, now Nordic Semiconductor, where Bogen and Wollan were working as students.[ citation needed ] It was known as a μRISC (Micro RISC) [5] and was available as silicon IP/building block from Nordic VLSI. [6] When the technology was sold to Atmel from Nordic VLSI, the internal architecture was further developed by Bogen and Wollan at Atmel Norway, a subsidiary of Atmel. The designers worked closely with compiler writers at IAR Systems to ensure that the AVR instruction set provided efficient compilation of high-level languages. [7]

Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 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.

The AVR 8-bit microcontroller architecture was introduced in 1997. By 2003, Atmel had shipped 500 million AVR flash microcontrollers. [8] The Arduino platform, developed for simple electronics projects, was released in 2005 and featured ATmega8 AVR microcontrollers.

Device overview

The AVR is a modified Harvard architecture machine, where program and data are 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 following:

tinyAVR – the ATtiny series

Flash size Frequency
[MHz]
Package SRAM EEPROM
0.5–32 KB1.6–206–32-pin package32–3072 bytes64–512 bytes

The ATtiny series features small package microcontrollers with a limited peripheral set available. However, the improved tinyAVR 0/1/2-series (released in 2016) include:

megaAVR – the ATmega series

Flash size Frequency
[MHz]
Package SRAM EEPROM
4–256 KB1.6–2028–100-pin package256–16384 bytes256–4096 bytes

The ATmega series features microcontrollers that provide an extended instruction set (multiply instructions and instructions for handling larger program memories), an extensive peripheral set, a solid amount of program memory, as well as a wide range of pins available. The megaAVR 0-series (released in 2016) also has functionality such as:

AVR Dx – The AVR Dx family is featuring multiple microcontroller series, focused on HCI, analog signal conditioning and functional safety.

Flash size Frequency
[MHz]
Package SRAM EEPROM Release year
16–128 KB20–24 at 1.8–5.5 V14–64-pin package4–16 KB512 bytes2020

The parts numbers is formatted as AVRffDxpp, where ff is flash size, x is family, and pp is number of pins. Example: AVR128DA64 – 64-pin DA-series with 128k flash. All devices in the AVR Dx family include:

XMEGA

Flash size Frequency
[MHz]
Package SRAM EEPROM Release year
16–256 KB3244–100-pin package1–32 KB512–2048 bytes

the ATxmega series offers a wide variety of peripherals and functionality such as:

Application-specific AVR

FPSLIC (AVR with FPGA)

32-bit AVRs

Device architecture

Atmel ATxmega128A1 in 100-pin TQFP package AVR ATXMEGA 128A1.JPG
Atmel ATxmega128A1 in 100-pin TQFP package
ATMEL MEGA32U4 die shot ATMEL MEGA32U4 (Micro Controller).png
ATMEL MEGA32U4 die shot

The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices.

Flash, EEPROM, and SRAM are all integrated onto a single chip, removing the need for external memory in most applications. Some devices have a parallel external bus option to allow adding additional data memory or memory-mapped devices. Almost all devices (except the smallest TinyAVR chips) have serial interfaces, which can be used to connect larger serial EEPROMs or flash chips.

Program memory

Program instructions are stored in non-volatile flash memory. Although the MCUs are 8-bit, each instruction takes one or two 16-bit words. The size of the program memory is usually indicated in the naming of the device itself (e.g., the ATmega64x line has 64 KB of flash, while the ATmega32x line has 32 KB). There is no provision for off-chip program memory; all code executed by the AVR core must reside in the on-chip flash. However, this limitation does not apply to the AT94 FPSLIC AVR/FPGA chips.

Internal data memory

The data address space consists of the register file, I/O registers, and SRAM. Some small models also map the program ROM into the data address space, but larger models do not.

Internal registers

In the tinyAVR and megaAVR variants of the AVR architecture, the working registers are mapped in as the first 32 data memory addresses (000016–001F16), followed by 64 I/O registers (002016–005F16). In devices with many peripherals, these registers are followed by 160 “extended I/O” registers, only accessible as memory-mapped I/O (006016–00FF16).

Actual SRAM starts after these register sections, at address 006016 or, in devices with "extended I/O", at 010016.

Even though there are separate addressing schemes and optimized opcodes for accessing the register file and the first 64 I/O registers, all can also be addressed and manipulated as if they were in SRAM.

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 locations. I/O memory begins at address 000016, followed by SRAM. In addition, these devices have slight deviations from the standard AVR instruction set. Most notably, the direct load/store instructions (LDS/STS) have been reduced from 2 words (32 bits) to 1 word (16 bits), limiting the total direct addressable memory (the sum of both I/O and SRAM) to 128 bytes. Conversely, the indirect load instruction's (LD) 16-bit address space is expanded to also include non-volatile memory such as Flash and configuration bits; therefore, the Load Program Memory (LPM) instruction is unnecessary and omitted. (For detailed info, see Atmel AVR instruction set.)

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.

GPIO ports

Each GPIO port on a tiny or mega AVR drives up to eight pins and is controlled by three 8-bit registers: DDRx, PORTx and PINx, where x is the port identifier.

  • DDRx: Data Direction Register, configures the pins as either inputs or outputs.
  • PORTx: Output port register. Sets the output value on pins configured as outputs. Enables or disables the pull-up resistor on pins configured as inputs.
  • PINx: Input register, used to read an input signal. On some devices, 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. [10]

Newer ATtiny AVR's, like ATtiny817 and its siblings, have their port control registers somewhat differently defined. xmegaAVR have additional registers for push/pull, totem-pole and pullup configurations.

EEPROM

Almost all AVR microcontrollers have internal 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 [11] use 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 limited  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 the contents need to be changed.

Program execution

Atmel's AVRs have a two-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 eight-bit microcontrollers.

The AVR processors were designed with the efficient execution of compiled C code in mind and have several built-in pointers for the task.

Instruction set

The AVR instruction set is more orthogonal than those of most eight-bit microcontrollers, in particular the 8051 clones and PIC microcontrollers with which AVR competes today. However, it is not completely regular:

Additionally, some chip-specific differences affect code generation. Code pointers (including return addresses on the stack) are two bytes long on chips with up to 128 KB of flash memory, but three bytes long on larger chips; not all chips have hardware multipliers; chips with over 8 KB of flash have branch and call instructions with longer ranges; and so forth.

The mostly regular instruction set makes C (and even Ada) compilers fairly straightforward and efficient. GCC has included AVR support for quite some time, and that support is widely used. LLVM also has rudimentary AVR support. 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. [7]

MCU speed

The AVR line can normally support clock speeds from 0 to 20 MHz, with some devices reaching 32 MHz. Lower-powered operation usually requires a reduced clock speed. All recent (Tiny, Mega, and Xmega, 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 1024. This prescaler can be reconfigured by software during run-time, allowing the clock speed to be optimized.

Since all operations (excluding multiplication and 16-bit add/subtract) on registers R0–R31 are single-cycle, the AVR can achieve up to 1 MIPS per MHz, i.e. an 8 MHz processor can achieve up to 8 MIPS. Loads and stores to/from memory take two cycles, branching takes two cycles. Branches in the latest "3-byte PC" parts such as ATmega2560 are one cycle slower than on previous devices.

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 between chips in each family is fairly good, although I/O controller features may vary.

See external links for sites relating to AVR development.

Features

AVRs offer a wide range of features:

Programming interfaces

There are many means to load program code into an AVR chip. The methods to program AVR chips varies from AVR family to family. Most of the methods described below use the RESET line to enter programming mode. In order to avoid the chip accidentally entering such mode, it is advised to connect a pull-up resistor between the RESET pin and the positive power supply. [16]

ISP

6- and 10-pin ISP header diagrams Isp headers.svg
6- and 10-pin ISP header diagrams

The in-system programming (ISP) programming method is functionally performed through SPI, plus some twiddling of the Reset line. As long as the SPI pins of the AVR are not connected to anything disruptive, the AVR chip can stay soldered on a PCB while reprogramming. All that is needed is a 6-pin connector and programming adapter. This is the most common way to develop with an AVR.

The Atmel-ICE device or AVRISP mkII (Legacy device) connects to a computer's USB port and performs in-system programming using Atmel's software.

AVRDUDE (AVR Downloader/UploaDEr) runs on Linux, FreeBSD, Windows, and Mac OS X , and supports a variety of in-system programming hardware, including Atmel AVRISP mkII, Atmel JTAG ICE, older Atmel serial-port based programmers, and various third-party and "do-it-yourself" programmers. [17]

PDI

The Program and Debug Interface (PDI) is an Atmel proprietary interface for external programming and on-chip debugging of XMEGA devices. The PDI supports high-speed programming of all non-volatile memory (NVM) spaces; flash, EEPROM, fuses, lock-bits and the User Signature Row. This is done by accessing the XMEGA NVM controller through the PDI interface, and executing NVM controller commands. The PDI is a 2-pin interface using the Reset pin for clock input (PDI_CLK) and a dedicated data pin (PDI_DATA) for input and output. [18]

UPDI

The Unified Program and Debug Interface (UPDI) is a one-wire interface for external programming and on-chip debugging of newer ATtiny and ATmega devices. The Atmel-ICE and PICkit 4 are capable of programming UPDI chips. It is also possible to use an Arduino thanks to jtag2updi, [19] or a standard USB-UART adapter with the TX and RX pin shorted by a 1 kΩ resistor and the pymcuprog utility provided by Microchip. [20]

High-voltage serial

High-voltage serial programming (HVSP) [21] is mostly the backup mode on smaller AVRs. An 8-pin AVR package does not leave many unique signal combinations to place the AVR into a programming mode. A 12-volt signal, however, is something the AVR should only see during programming and never during normal operation. The high voltage mode can also be used in some devices where the reset pin has been disabled by fuses.

High-voltage parallel

High-voltage parallel programming (HVPP) is considered the "final resort" and may be the only way to correct bad fuse settings on an AVR chip.

Bootloader

Most AVR models can reserve a bootloader region, 256 bytes to 4 KB, where re-programming code can reside. At reset, the bootloader runs first and does some user-programmed determination whether to re-program or to jump to the main application. The code can re-program through any interface available, or it could read an encrypted binary through an Ethernet adapter like PXE. Atmel has application notes and code pertaining to many bus interfaces. [22] [23] [24] [25]

ROM

The AT90SC series of AVRs are available with a factory mask-ROM rather than flash for program memory. [26] Because of the large up-front cost and minimum order quantity, a mask-ROM is only cost-effective for high-production runs.

aWire

aWire is a new one-wire debug interface available on the new UC3L AVR32 devices.

Debugging interfaces

The AVR offers several options for debugging, mostly involving on-chip debugging while the chip is in the target system.

debugWIRE

debugWIRE is Atmel's solution for providing on-chip debug capabilities via a single microcontroller pin. It is 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 debugWIRE. debugWIRE was developed after the original JTAGICE release, and now clones support it.

JTAG

The Joint Test Action Group (JTAG) feature provides access to on-chip debugging functionality while the chip is running in the target system. [27] JTAG allows accessing internal memory and registers, setting breakpoints on code, and single-stepping execution to observe system behaviour.

Atmel provides a series of JTAG adapters for the AVR:

  1. The Atmel-ICE [28] is the latest adapter. It supports JTAG, debugWire, aWire, SPI, TPI, and PDI interfaces.
  2. The JTAGICE 3 [29] is a midrange debugger in the JTAGICE family (JTAGICE mkIII). It supports JTAG, aWire, SPI, and PDI interfaces.
  3. The JTAGICE mkII [30] replaces the JTAGICE and is similarly priced. The JTAGICE mkII interfaces to the PC via USB, and supports both JTAG and the newer debugWIRE interface. Numerous third-party clones of the Atmel JTAGICE mkII device started shipping after Atmel released the communication protocol. [31]
  4. The AVR Dragon [32] is a low-cost (approximately $50) substitute for the JTAGICE mkII for certain target parts. The AVR Dragon provides in-system serial programming, high-voltage serial programming and parallel programming, as well as JTAG or debugWIRE emulation for parts with 32 KB of program memory or less. ATMEL changed the debugging feature of AVR Dragon with the latest firmware of AVR Studio 4 - AVR Studio 5 and now it supports devices over 32 KB of program memory.
  5. The JTAGICE adapter interfaces to the PC via a standard serial port. [33] Although the JTAGICE adapter has been declared "end-of-life" by Atmel, it is still supported in AVR Studio and other tools.

JTAG can also be used to perform a boundary scan test, [34] which tests the electrical connections between AVRs and other boundary scan capable chips in a system. Boundary scan is well-suited for a production line, while the hobbyist is probably better off testing with a multimeter or oscilloscope.

Development tools and evaluation kits

Atmel STK500 development board Atmel STK 500 DSC00557 wp.jpg
Atmel STK500 development board

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

STK600 starter kit

The STK600 starter kit and development system is an update to the STK500. [35] The STK600 uses a base board, a signal routing board, and a target board.

The base board is similar to the STK500, in that it provides a power supply, clock, in-system programming, an RS-232 port and a CAN (Controller Area Network, an automotive standard) port via DE9 connectors, and stake pins for all of the GPIO signals from the target device.

The target boards have ZIF sockets for DIP, SOIC, QFN, or QFP packages, depending on the board.

The signal routing board sits between the base board and the target board, and routes the signals to the proper pin on the device board. There are many different signal routing boards that could be used with a single target board, 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.

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:

STK200 starter kit

The STK200 starter kit and development system has a DIP socket that can host an AVR chip in a 40, 20, or 8-pin package. The board has a 4 MHz clock source, 8 light-emitting diode (LED)s, 8 input buttons, an RS-232 port, a socket for a 32 KB SRAM and numerous general I/O. The chip can be programmed with a dongle connected to the parallel port.

Supported microcontrollers (according to the manual)
Chip Flash size EEPROM SRAM Frequency
[MHz]
Package
AT90S12001 KB64 B0 B12PDIP-20
AT90S23132 KB128 B128 B10PDIP-20
AT90S/LS23232 KB128 B128 B10PDIP-8
AT90S/LS23432 KB128 B128 B10PDIP-8
AT90S44144 KB256 B256 B8PDIP-40
AT90S/LS44344 KB256 B256 B8PDIP-40
AT90S85158 KB512 B512 B8PDIP-40
AT90S/LS85358 KB512 B512 B8PDIP-40

Atmel-ICE

The Atmel ICE is the currently supported inexpensive tool to program and debug all AVR devices (unlike the AVRISP/AVRISP mkII, Dragon, etc. discussed below). It connects to and receives power from a PC via USB, and supports JTAG, PDI, aWire, debugWIRE, SPI, SWD, TPI, and UPDI (the Microchip Unified Program and Debug Interface) interfaces.

The ICE can program and debug all AVRs via the JTAG interface, and program with additional interfaces as supported on each device:

Target operating voltage ranges of 1.62V to 5.5V are supported as well as the following clock ranges:

The ICE is supported by the Microchip Studio IDE, as well as a command line interface (atprogram).

The Atmel-ICE supports a limited implementation of the Data Gateway Interface (DGI) when debugging and programming features are not in use. The Data Gateway Interface is an interface for streaming data from a target device to the connected computer. This is meant as a useful adjunct to the unit to allow for demonstration of application features and as an aid in application level debugging.

AVRISP and AVRISP mkII

AVRISP mkII AVRISP mkII.jpg
AVRISP mkII

The AVRISP and AVRISP mkII are inexpensive tools allowing all AVRs to be programmed via ICSP.

The AVRISP connects to a PC via a serial port and draws power from the target system. The AVRISP allows using either of the "standard" ICSP pinouts, either the 10-pin or 6-pin connector.

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

As the AVRISP mkII lacks driver/buffer ICs, [36] it can have trouble programming target boards with multiple loads on its SPI lines. In such occurrences, a programmer capable of sourcing greater current is required. Alternatively, the AVRISP mkII can still be used if low-value (~150 ohm) load-limiting resistors can be placed on the SPI lines before each peripheral device.

Both the AVRISP and the AVRISP mkII are now discontinued, with product pages removed from the Microchip website. As of July 2019 the AVRISP mkII is still in stock at a number of distributors. There are also a number of 3rd party clones available.

AVR Dragon

AVR Dragon with ISP programming cable and attached, blue/greenish ZIF Socket AvrDragon.png
AVR Dragon with ISP programming cable and attached, blue/greenish ZIF Socket

The Atmel Dragon is an inexpensive tool which connects to a PC via USB. The Dragon can program all AVRs via JTAG, HVP, PDI, [37] or ICSP. The Dragon also allows debugging of all AVRs via JTAG, PDI, or debugWire; a previous limitation to devices with 32 KB or less program memory has been removed in AVR Studio 4.18. [38] 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, although this can be provided by a third-party product called the "Dragon Rider". [39]

JTAGICE

The JTAG In Circuit Emulator (JTAGICE) debugging tool supports on-chip debugging (OCD) of AVRs with a JTAG interface. The original JTAGICE (sometimes retroactively referred to as JTAGICE mkI) uses an RS-232 interface to a PC and can only program AVR's with a JTAG interface. The JTAGICE mkI is no longer in production, however it has been replaced by the JTAGICE mkII.

JTAGICE mkII

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

The JTAGICE mkII connects using USB, but there is an alternate connection via a serial port, which requires using a separate power supply. In addition to JTAG, the mkII supports ISP programming (using 6-pin or 10-pin adapters). Both the USB and serial links use a variant of the STK500 protocol.

JTAGICE3

The JTAGICE3 updates the mkII with more advanced debugging capabilities and faster programming. It connects via USB and supports the JTAG, aWire, SPI, and PDI interfaces. [40] The kit includes several adapters for use with most interface pinouts.

AVR ONE!

The AVR ONE! is a professional development tool for all Atmel 8-bit and 32-bit AVR devices with On-Chip Debug capability. It supports SPI, JTAG, PDI, and aWire programming modes and debugging using debugWIRE, JTAG, PDI, and aWire interfaces. [41]

Butterfly demonstration board

Atmel ATmega169 in 64-pad MLF package on the back of an Atmel AVR Butterfly board ATmega169-MLF.jpg
Atmel ATmega169 in 64-pad MLF package on the back of an Atmel AVR Butterfly 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 then 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; it is not present on Butterfly boards produced after June 2006 to allow RoHS compliance. [42] 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 piezoelectric transducer 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, but 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 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.

Only the JTAG port uses conventional 2.54 mm pinout. All the other AVR I/O ports require more compact 1.27 mm headers.

The AVR Dragon can both program and debug since the 32 KB limitation was removed in AVR Studio 4.18, and the JTAGICE mkII is capable of both programming and debugging the processor. The processor can also be programmed 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.

LUFA [43] is a third-party free software (MIT license) USB protocol stack for the USBKey and other 8-bit USB AVRs.

Raven wireless kit

The RAVEN kit supports wireless development using Atmel's IEEE 802.15.4 chipsets, for Zigbee 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 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 Butterfly: 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.

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. [44]

Uses

Atmel AVR ATmega328 28-pin DIP on an Arduino Duemilanove board Arduino Duemilanove 0509.JPG
Atmel AVR ATmega328 28-pin DIP on an Arduino Duemilanove board
Atmel AVR ATmega8 28-pin DIP on a custom development board Atmega8 Development Board.jpg
Atmel AVR ATmega8 28-pin DIP on a custom development board

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 physical computing platform is based on an ATmega328 microcontroller (ATmega168 or ATmega8 in board versions older than the Diecimila). The ATmega1280 and ATmega2560, with more pinout and 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, [45] gnusb, [46] BasicX, [47] Oak Micros, [48] ZX Microcontrollers, [49] and myAVR. [50] There is also a large community of Arduino-compatible boards supporting similar users.

Schneider Electric used to produce 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 but this has been discontinued. [51]

FPGA clones

With the growing popularity of FPGAs among the open source community, people have started developing open source processors compatible with the AVR instruction set. The OpenCores website lists the following major AVR clone projects:

Other vendors

In addition to the chips manufactured by Atmel, clones are available from LogicGreen Technologies. [57] These parts are not exact clones - they have a few features not found in the chips they are "clones" of, and higher maximum clock speeds, but use SWD (Serial Wire Debug, a variant of JTAG from ARM) instead of ISP for programming, so different programming tools must be used.

Microcontrollers using the ATmega architecture are being manufactured by NIIET in Voronezh, Russia, as part of the 1887 series of integrated circuits. This includes an ATmega128 under the designation 1887VE7T (Russian : 1887ВЕ7Т). [58]

Related Research Articles

<span class="mw-page-title-main">Microcontroller</span> Small computer on a single integrated circuit

A microcontroller or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs along with memory and programmable input/output peripherals. Program memory in the form of NOR flash, OTP ROM, or ferroelectric RAM is also often included on the chip, as well as a small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general-purpose applications consisting of various discrete chips.

<span class="mw-page-title-main">PIC microcontrollers</span> Line of single-chip microprocessors from Microchip Technology

PIC is a family of microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and is currently expanded as Programmable Intelligent Computer. The first parts of the family were available in 1976; by 2013 the company had shipped more than twelve billion individual parts, used in a wide variety of embedded systems.

<span class="mw-page-title-main">TI MSP430</span> Mixed-signal microcontroller family

The MSP430 is a mixed-signal microcontroller family from Texas Instruments, first introduced on 14 February 1992. Built around a 16-bit CPU, the MSP430 was designed for low power consumption, embedded applications and low cost.

<span class="mw-page-title-main">PIC16x84</span>

The PIC16C84, PIC16F84 and PIC16F84A are 8-bit microcontrollers of which the PIC16C84 was the first introduced in 1993 and hailed as the first PIC microcontroller to feature a serial programming algorithm and EEPROM memory. It is a member of the PIC family of controllers, produced by Microchip Technology. The memory architecture makes use of bank switching. Software tools for assembler, debug and programming were only available for the Microsoft DOS and Windows operating systems.

Serial Peripheral Interface (SPI) is a de facto standard for synchronous serial communication, used primarily in embedded systems for short-distance wired communication between integrated circuits.

JTAG is an industry standard for verifying designs of and testing printed circuit boards after manufacture.

<span class="mw-page-title-main">In-system programming</span> Embedded system programming technique

In-system programming (ISP), or also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, chipsets and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. It also allows firmware updates to be delivered to the on-chip memory of microcontrollers and related processors without requiring specialist programming circuitry on the circuit board, and simplifies design work.

Atmel ARM-based processors are microcontrollers and microprocessors integrated circuits, by Microchip Technology, that are based on various 32-bit ARM processor cores, with in-house designed peripherals and tool support.

<span class="mw-page-title-main">AVR32</span>

AVR32 is a 32-bit RISC microcontroller architecture produced by Atmel. The microcontroller architecture was designed by a handful of people educated at the Norwegian University of Science and Technology, including lead designer Øyvind Strøm and CPU architect Erik Renno in Atmel's Norwegian design center.

<span class="mw-page-title-main">DataFlash</span> Flash memory

DataFlash is a low pin-count serial interface for flash memory. It was developed as an Atmel proprietary interface, compatible with the SPI standard. In October 2012, the AT45 series DataFlash product lines, related intellectual property, and supporting employee teams were purchased by Adesto Technologies.

<span class="mw-page-title-main">PICkit</span>

PICkit is a family of programmers for PIC microcontrollers made by Microchip Technology. They are used to program and debug microcontrollers, as well as program EEPROM. Some models may also feature logic analyzers and serial communications (UART) tools.

A debug port is a diagnostic interface included in an electronic system or integrated circuit to aid design, fabrication, development, bootstrapping, configuration, debugging, and post-sale in-system programming. In general terms, a debug port is not necessary for end-use function and is often hidden or disabled in finished products.

<span class="mw-page-title-main">Bus Pirate</span> Microcontroller programmer and debugger

The Bus Pirate is a universal bus interface device designed for programming, debugging, and analyzing microcontrollers and other ICs. It was developed as an open-source hardware and software project.

debugWIRE is a serial communications protocol, designed by Atmel. It is used for on-chip debugging of AVR microcontrollers.

<span class="mw-page-title-main">STM32</span> ARM Cortex-M based Microcontrollers by STMicroelectronics

STM32 is a family of 32-bit microcontroller integrated circuits by STMicroelectronics. The STM32 chips are grouped into related series that are based around the same 32-bit ARM processor core: Cortex-M0, Cortex-M0+, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M33. Internally, each microcontroller consists of ARM processor core(s), flash memory, static RAM, debugging interface, and various peripherals.

<span class="mw-page-title-main">NXP LPC</span> Family of 32-bit microcontroller integrated circuits

LPC is a family of 32-bit microcontroller integrated circuits by NXP Semiconductors. The LPC chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals. The earliest LPC series were based on the Intel 8-bit 80C51 core. As of February 2011, NXP had shipped over one billion ARM processor-based chips.

<span class="mw-page-title-main">ATtiny microcontroller comparison chart</span> Subfamily of 8-bit AVR microcontrollers

ATtiny is a subfamily of the popular 8-bit AVR microcontrollers, which typically has fewer features, fewer I/O pins, and less memory than other AVR series chips. The first members of this family were released in 1999 by Atmel.

<span class="mw-page-title-main">ATmega328</span> 8-bit microcontroller

The ATmega328 is a single-chip microcontroller created by Atmel in the megaAVR family. It has a modified Harvard architecture 8-bit RISC processor core.

<span class="mw-page-title-main">Arduino Uno</span> Microcontroller board

The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller (MCU) and developed by Arduino.cc and initially released in 2010. The microcontroller board is equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards (shields) and other circuits. The board has 14 digital I/O pins, 6 analog I/O pins, and is programmable with the Arduino IDE, via a type B USB cable. It can be powered by a USB cable or a barrel connector that accepts voltages between 7 and 20 volts, such as a rectangular 9-volt battery. It has the same microcontroller as the Arduino Nano board, and the same headers as the Leonardo board. The hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5 license and is available on the Arduino website. Layout and production files for some versions of the hardware are also available.

The MSP432 is a mixed-signal microcontroller family from Texas Instruments. It is based on a 32-bit ARM Cortex-M4F CPU, and extends their 16-bit MSP430 line, with a larger address space for code and data, and faster integer and floating point calculation than the MSP430. Like the MSP430, it has a number of built-in peripheral devices, and is designed for low power requirements. In 2021, TI confirmed that the MSP432 has been discontinued and "there will be no new MSP432 products".

References

  1. Since 1996, NTH has become part of the Norwegian University of Science and Technology (NTNU)
  2. alfbogen.com blog
  3. 1 2 Archived at Ghostarchive and the Wayback Machine : "The Story of AVR". youtube.com.
  4. "UNSW School of Computer Science and Engineering - General AVR Info". Cse.unsw.edu.au. Archived from the original on 2012-06-23. Retrieved 2012-09-19.
  5. An introduction to Atmel and the AVR microcontroller [ permanent dead link ]
  6. "Embedded Systems and Microcontrollers" (PDF). Archived from the original (PDF) on 2004-12-24. Retrieved 2018-10-01.
  7. 1 2 Myklebust, Gaute. The AVR Microcontroller and C Compiler Co-Design (PDF). Atmel Norway. CiteSeerX   10.1.1.63.1447 . Retrieved 2012-09-19.
  8. Atmel press release. "Atmel's AVR Microcontroller Ships 500 Million Units".
  9. Field Programmable System Level Integrated Circuit. Archived 2012-11-27 at the Wayback Machine .
  10. atmel.com
  11. Atmel Smart Card ICs
  12. "AVR319: Using the USI module for SPI communication" (PDF). Atmel. 2004. Archived (PDF) from the original on 2012-06-17. Retrieved 10 June 2014.
  13. "Atmel AVR310: Using the USI Module as a I2C Master" (PDF). Atmel. 2013. Archived (PDF) from the original on 2014-07-14. Retrieved 10 June 2014.
  14. "AVR312: Using the USI module as a I2C slave" (PDF). Atmel. 2005. Archived (PDF) from the original on 2014-07-14. Retrieved 10 June 2014.
  15. "AVR307: Half Duplex UART Using the USI Module" (PDF). Atmel. 2003. Archived (PDF) from the original on 2014-07-14. Retrieved 10 June 2014.
  16. "AVR Hardware Design Considerations" (PDF) (application note). Atmel Corporation. Jun 2015. p. 5. Archived (PDF) from the original on 2014-12-22. Retrieved 14 Jun 2015. The reset line has an internal pull-up resistor, but if the environment is noisy it can be insufficient and reset can therefore occur sporadically.
  17. "AVRDUDE programmer". Savannah.nongnu.org. Retrieved 2012-09-19.
  18. "PDI programming driver" (PDF). Archived (PDF) from the original on 2020-03-25. Retrieved 2012-09-19.
  19. "GitHub - ElTangas/Jtag2updi: UPDI programmer software for Arduino (Targets Tiny AVR-0/1/2, Mega AVR-0 and AVR-DA/DB MCUs)". GitHub . 17 December 2021.
  20. "pymcuprog - Python MCU programmer". Github. Microchip PIC&AVR Tools. 13 November 2022. Retrieved 18 November 2022.
  21. "HVSP_Description". Support.atmel.no. Archived from the original on 2009-10-12. Retrieved 2012-09-19.
  22. "DES-encrypted AVR Bootloader" (PDF). Archived (PDF) from the original on 2005-05-16. Retrieved 2012-09-19.
  23. "AES-encrypted AVR Bootloader" (PDF). Retrieved 2012-09-19.
  24. "XMEGA Bootloader" (PDF). Retrieved 2012-09-19.
  25. "AVR USB Bootloader" (PDF). Archived (PDF) from the original on 2006-06-28. Retrieved 2012-09-19.
  26. "Atmel's Self-Programming Flash Microcontrollers" (PDF). Retrieved 12 March 2020.
  27. "Guide to understanding JTAG and security fuses on the AVR" . Retrieved 2012-09-19.[ permanent dead link ]
  28. "Atmel-ICE - Atmel Corporation". Atmel.com. Retrieved 2015-09-11.
  29. "JTAGICE 3- Atmel Corporation". Atmel.com. Retrieved 2012-09-19.
  30. "AVR JTAGICE mkII". Atmel. Archived from the original on 15 February 2013. Retrieved 13 January 2013.
  31. "JTAGICE mkII Communication Protocol" (PDF). Archived (PDF) from the original on 2005-05-16. Retrieved 2012-09-19.
  32. "AVR Dragon". Atmel. Retrieved 13 January 2013.
  33. "AVR JTAGICE mkII User's Guide" (PDF). microchip.com. Archived (PDF) from the original on 2017-07-02. Retrieved 25 March 2020.
  34. JTAGICE Press Release, 2004. Archived 2011-07-07 at the Wayback Machine
  35. "STK600". Atmel. Archived from the original on 15 February 2013. Retrieved 13 January 2013.
  36. "AVRISP mkII Disassembled". Archived from the original on 2014-11-08. Retrieved 2014-11-08.
  37. "AVR1005: Getting started with XMEGA, page 7" (PDF). Atmel. Archived (PDF) from the original on 2009-10-07. Retrieved 7 November 2011.
  38. "AVR Studio v4.18 Release Notes" . Retrieved 2012-09-19.
  39. "ECROS Technology - Dragon Rider". Ecrostech.com. 2008-03-02. Retrieved 2012-09-19.
  40. JTAGICE3 Product Page
  41. AVR ONE! Product Page
  42. AVR Butterfly
  43. "LUFA (Formerly MyUSB)". Four Walled Cubicle. Retrieved 2012-09-19.
  44. See avrffreaks.net for a comprehensive list.
  45. "Comfile Technology". Comfile Technology, Inc. Archived from the original on 17 January 2013. Retrieved 13 January 2013.
  46. "gnusb: Open Source USB Sensor Box" . Retrieved 13 January 2013.
  47. "BasicX". NetMedia, Inc. Archived from the original on 23 May 2013. Retrieved 13 January 2013.
  48. "Welcome to Oak Micros". Oak Micros. Oak Micros. Archived from the original on 2012-10-25. Retrieved 13 January 2013.
  49. "ZBasic" . Retrieved 13 January 2013.
  50. "myAVR". Laser & Co. Solutions GmbH. Retrieved 13 January 2013.
  51. "M3000 Motion controller on a chip". imshome.com. Schneider Electric Motion USA. Archived from the original on 2009-12-02. Retrieved 2011-08-02.
  52. "pAVR :: Overview". OpenCores. Retrieved 2012-09-19.
  53. "AVR Core :: Overview". OpenCores. Retrieved 2012-09-19.
  54. "Navré AVR clone (8-bit RISC) Overview". OpenCores. Retrieved 2012-09-19.
  55. "Soft AVR Core + Interfaces Overview". OpenCores. Retrieved 2020-06-16.
  56. "CPU lecture". OpenCores. Retrieved 2015-02-16.
  57. "LGT8F88A FLASH Microcontroller". LogicGreen Technologies. Archived from the original on 2017-08-29. Retrieved 2019-01-18, a clone of the ATmega88.
  58. "Микроконтроллеры" [Microcontrollers] (in Russian). Voronezh: OAO "NIIET". Archived from the original on 22 August 2017. Retrieved 22 August 2017.

Further reading

Official Website
Official Community
Pinout Diagrams
Simulators