Atmel AVR

From Academic Kids

(Redirected from AVR)

The Atmel AVR is a family of RISC microcontrollers from Atmel. The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH) and further refined and developed at Atmel Norway, the Atmel daughter company founded by the two chip architects.

The AVR is a Harvard architecture CPU. It has 32 8-bit registers. Some instructions only operate on a subset of these registers. The concatenated register file, input/output file and data memory make up a unified address space accessed through load/store operations. Unlike the PIC, the stack is located in this unified memory space and isn't strictly limited to a fixed size.

The AVR was designed at the outset for efficient execution of compiled C code. Thus some instructions, such as 'add immediate', are strangely missing (you have to 'subtract immediate' the complement instead), while others, such as 'compare with carry', are included.

The AVR instruction set is physically implemented and sold on the market as a number of different controllers, sharing the same AVR core but differing on peripheral / RAM / ROM capabilities: from the Tiny AVR controllers with 1KB flash ROM, no RAM, and 8 pins, up to Mega AVR controllers with 128KB flash ROM, 4KB RAM, 4KB EEPROM, 10 bit ADC with 8 channels, timers, comparators, JTAG, etc. Compatibility across models is preserved to a reasonable degree.

Atmel's AVR controllers have a pipeline with 2 stages (fetch and execute) that allows them to execute most instructions in 1 clock, which makes them relatively fast among the 8-bit controllers on the market.

The AVR instruction set is more regular than that of many other 8-bit microcontrollers (PIC for example). However, it is not orthogonal:

  • Pointer registers X, Y, and Z have addressing capabilities that are different from each other.
  • Register file locations 0...15 have different addressing capabilities than register file locations 16...31.
  • IO locations 0 to 31 have different addressing capabilities than IO locations 32 to 63.
  • CLR affects flags, while SER does not, even though they seem to be complementary intructions (set all bits to 0 and respectively to 1).
  • opcodes 0x95C8 and 0x9004 do exactly the same thing (LPM).


Like the PIC, it has a dedicated hobbyist following (exemplified by the AVRFreaks Internet forum), largely due to the existence of inexpensive/free development tools, for instance a port of the GNU GCC tools.

The acronym AVR has been reported/rumoured to stand for Advanced Virtual RISC and/or the initials of the two company founders—Alf Egil Bogen and Vegard Wollan—who for their part have chosen to let the matter rest unresolved, giving mostly shadowy answers when asked directly.

Setup Tools For Development

  • Setup tools in Linux Debian box
    • login to root user
    • using apt-get command to install them, typing by "apt-get install binutils-avr gcc-avr avr-libc uisp"
  • prepare a simple avr serial programmer (http://www.linuxfocus.org/English/November2004/article352.shtml#352lfindex8)
    • examples to use the above programmer with uisp
uisp -dprog=dapa --rd_fuses -dpart=ATmega8535
uisp -dlpt=/dev/parport0 --erase -dprog=dapa -dpart=ATmega8535
uisp -dlpt=/dev/parport0 --upload if=avrm8ledtest.hex -dprog=dapa  -v=3 --hash=32 -dpart=ATmega8535
Chungyan5 12:13, 21 Jun 2005 (UTC)

External links

de:Atmel AVR fr:Atmel AVR ja:Atmel AVR

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools