|
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: 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. 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. 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. 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: 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. 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. Features Current AVRs offer a wide range of features: 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: 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. STK500 Expansion Modules Several expansion modules are available for the STK500 board. These include: The Dragon New USB support. Limited supply at the moment. 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 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. 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. Footnotes See also Atmel Official Links AVR Forums & Discussion Groups C Language Development Other AVR Links | |||||||||
|
| ||||||||||
![]() |
|
| |