Pages

Search in This Blog

Friday, 13 July 2012

Introduction to AVR.....


AVR was developed in the year 1996 by Atmel Corporation. The architecture of AVR was developed by Alf-Egil Bogen and Vegard Wollan. AVR derives its name from its developers and stands for Alf-Egil Bogen Vegard Wollan RISC microcontroller, also known as Advanced Virtual RISC. The AT90S8515 was the first microcontroller which was based on AVR architecture however the first microcontroller to hit the commercial market was AT90S1200 in the year 1997.

AVR microcontrollers are available in three categories:
1.      TinyAVR – Less memory, small size, suitable only for simpler applications
2.      MegaAVR – These are the most popular ones having good amount of memory (upto 256 KB), higher number of inbuilt peripherals and suitable for moderate to complex applications.
3.      XmegaAVR – Used commercially for complex applications, which require large program memory and high speed.
The following table compares the above mentioned AVR series of microcontrollers:
 Series Name
Pins
Flash Memory
Special Feature
TinyAVR
6-32
0.5-8 KB
Small in size
MegaAVR
28-100
4-256KB
Extended peripherals
XmegaAVR
44-100
16-384KB
DMA , Event System included

 What’s special about AVR?
They are fast: AVR microcontroller executes most of the instructions in single execution cycle. AVRs are about 4 times faster than PICs, they consume less power and can be operated in different power saving modes. Let’s do the comparison between the three most commonly used families of microcontrollers.


8051
PIC
AVR
SPEED
Slow
Moderate
Fast
MEMORY
Small
Large
Large
ARCHITECTURE
CISC
RISC
RISC
ADC
Not Present
Inbuilt
Inbuilt
Timers
Inbuilt
Inbuilt
Inbuilt
PWM Channels
Not Present
Inbuilt
Inbuilt

AVR is an 8-bit microcontroller belonging to the family of Reduced Instruction Set Computer (RISC). In RISC architecture the instruction set of the computer are not only fewer in number but also simpler and faster in operation. The other type of categorization is CISC (Complex Instruction Set Computers). We will explore more on this when we will learn about the architecture of AVR microcontrollers in following section.

Let’s see what all this means. What is 8-bit? This means that the microcontroller is capable of transmitting and receiving 8-bit data. The input/output registers available are of 8-bits. The AVR family controllers have register based architecture which means that both the operands for an operation are stored in a register and the result of the operation is also stored in a register. Following figure shows a simple example performing OR operation between two input registers and storing the value in Output Register.


The CPU takes values from two input registers INPUT-1 and INPUT-2, performs the logical operation and stores the value into the OUTPUT register. All this happens in 1 execution cycle.
In our journey with the AVR we will be working on ATmega16 microcontroller, which is a 40-pin IC and belongs to the megaAVR category of AVR family. 


Some of the features of Atmega16 are:
·     
      16KB of Flash memory
·         1KB of SRAM
·         512 Bytes of EEPROM
·         Available in 40-Pin DIP
·         8-Channel 10-bit ADC
·         Two 8-bit Timers/Counters
·         One 16-bit Timer/Counter
·         4 PWM Channels
·         In System Programmer (ISP)
·         Serial USART
·         SPI Interface
·         Digital to Analog Comparator.


2 comments:

  1. AVR 8- and 32-bit microcontrollers deliver a unique combination of performance, power efficiency, and design flexibility. Optimized to speed time to market, they are based on the industry's most code-efficient architecture for C and assembly programming.

    ReplyDelete
    Replies
    1. Thanks for your interest sir.

      You have taught me a beaut topic which i hadn't known before.

      Delete