Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]





    The AVR®s are a family of RISC microcontrollers from Atmel. Their internal architecture was conceived by two students: Alf-Egil Bogen and Vegard Wollan, at the Norwegian Institute of Technology (NTH) and further developed at Atmel Norway, a subsidiary founded by the two architects.
    Atmel recently released the Atmel AVR32 line of microcontrollers. These are 32-bit RISC devices featuring SIMD and DSP instructions, along with additional features for audio and video processing, intended to compete with ARM based processors.

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

    The acronym AVR has been reported to stand for Advanced Virtual RISC. It's also rumoured to stand for the chip's designers: Alf and Vegard, who evade the question when it comes up.


        Atmel AVR
            Device Overview
            Program Memory
            Data Memory and Registers
            EEPROM
            Program Execution
            Speed
            Development
            Features
            Development Tools and Evaluation Kits
                STK500 Starter Kit
                STK500 Expansion Modules
                The Dragon
                JTAG (IEEE 1149.1)
                JTAGICE mkII
                Butterfly Demo Board
            Footnotes
            See also
                Atmel Official Links
                AVR Forums & Discussion Groups
                C Language Development
                Other AVR Links

    top

    Device Overview
    The AVR is a Harvard architecture machine with programs and data stored separately. Typical Harvard type machines store their programs in permanent or semi-permanent memory and data in volatile memory. Hence, they are ideal for embedded systems in the field, since the program memory is protected from voltage spikes and other harsh environmental factors that might corrupt the program.

    Flash, EEPROM, and SRAM are all integrated onto a single die, removing the need for external memory (though still available on some devices).

    AVRs are generally divided into three broad groups:

      tinyAVRs
        1-8kB program memory
        8-20 pin package
        Limited peripheral set
      megaAVRs
        4-256kB program memory
        28-100 pin package
        Extended instruction set (Multiply instructions and instructions for handling larger program memories)
        Extensive peripheral set
      Application specific AVRs
        megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM etc.

    top

    Program Memory
    Program instructions are stored in non-volatile Flash memory. Each instruction is either 16 or 32 bits in length. The Flash memory is addressed using 16 bit word sizes.
    This may be surprising and somewhat confusing for some that an 8-bit MCU addresses it's program memory 16-bits at-a-time and addressed RAM 8-bits at-a-time.

    The size of the program memory is indicated in the naming of the device itself. For instance, the ATmega64x line has 64Kbytes of Flash. Almost all AVR devices are self-programmable.

    top

    Data Memory and Registers
    The data address space consists of the register file, I/O registers, and SRAM. The AVRs have thirty-two single-byte registers and are classified as 8-bit RISC devices.

    The working registers are mapped in as the first thirty-two memory addresses (000016-001F16) followed by the 64 I/O registers (002016-005F16). The actual SRAM starts after these 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 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.

    top

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

    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 registers and read/write instructions which makes EEPROM access much slower than other internal RAM. Although the number of writes to EEPROM is practically unlimited, Atmel claims reliability only up to 100,000 writes.

    top

    Program Execution
    Atmel's AVRs have a single level pipeline design. 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 for the efficient execution of compiled C code.

    The AVR instruction set is more orthogonal than most eight-bit microcontrollers, however, it is not completely regular:
      Pointer registers X, Y, and Z have addressing capabilities that are different from each other.
      Register 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 though, that neither CLR nor SER are native instructions. Instead CLR is syntactic sugar for produces the same machine code as EOR R,R while SER is syntactic sugar for LDI R,$FF. Math operations such as EOR modify flags while moves/loads/stores/branches such as LDI do not.)

    top

    Speed
    The AVR line can normally support clock speeds from 0-16MHz, with some devices reaching 20MHz. Lower powered operation usually requires a reduced clock speed. All AVRs feature an on-chip oscillator, removing the need for external clocks or resonator circuitry.

    Because many operations on the AVR are single cycle, the AVR can achieve up to 1MIPS per MHz.

    top

    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 marketed 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.

    top

    Features
    Current AVRs offer a wide range of features:
      RISC Core Running Many Single Cycle Instructions
      Multifunction, Bi-directional I/O Ports with Internal, Configurable Pull-up Resistors
      Multiple Internal Oscillators
      Internal, Self-Programmable Instruction Flash Memory up to 256K
        In-System Programmable using ISP, JTAG, 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
      Internal Data EEPROM up to 4KB
      Internal SRAM up to 8K
      8-Bit and 16-Bit Timers
        PWM output (Dead time generator on some devices)
        Input capture
      Analog Comparators
      Dedicated I²C Compatible Two-Wire Interface (TWI)
      Synchronous/Asynchronous Serial Peripherals (UART/USART) (As used with RS-232,RS-485, and more)
      Universal Serial Interface (USI) for Two or Three-Wire Synchronous Data Transfer
      Brownout Detection
      Multiple Power-Saving Sleep Modes
      Lighting and motor control (PWM Specific) Controller models
      CAN Controller Support
      USB Controller Support
        Proper High-speed hardware & Hub controller with embedded AVR.
        Also freely available low-speed (HID) software emulation
      LCD Controller Support
      Low-voltage Devices Operating Down to 1.8v
      picoPower Devices

    top

    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 device:

    top

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

    top

    STK500 Expansion Modules
    Several expansion modules are available for the STK500 board. These include:
      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.
      STK525 - Adds support for the AT90USB family of microcontrollers.

    top

    The Dragon
    New USB support. Limited supply at the moment.

    top

    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.

    top

    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.

    top

    Butterfly Demo Board
    The AVR Butterfly is a self-contained, battery-powered demonstration board running the ATMEL AVR ATmega169V Microcontroller. The board includes an LCD screen, joystick, speaker, serial port, RTC, flash chip, temperature, light & voltage sensors. The board has a shirt pin on its back and 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. Also, the AVR Butterfly has a piezo buzzer that can reproduce sound.

    The AVRButterfly demonstrates LCD driving by running a 14-segment, 6 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 8Mhz, however it is factory set by software to 2Mhz to preserve the button battery life. A pre-installed bootloader program allows the board to be re-programmed with a standard RS-232 serial plug.

    top

    Footnotes


    top

    See also



    top

    Atmel Official Links
      AVR Studio - Free assembler/simulator IDE provided by Atmel

    top

    AVR Forums & Discussion Groups
      AVR - in Polish



    top

    C Language Development
      WinAVR – Open Source Suite for Windows & GCC

    top

    Other AVR Links






     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    MIT OpenCourseWare
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "Atmel AVR". link