AVR Micro-controller Basics

Micro-controller:   

        The Micro-controllers can be termed as a single on chip computer ,they includes number of inside peripherals like RAM, EEPROM, Timers,counters etc., required to perform some predefined task.!!
Does this mean that the micro-controller is another name for a computer…??? The answer is NO!!!
The computer is designed to performs all general purpose tasks on a single machine like you can use a computer to run a software to perform calculations or you can use a computer to store some multimedia file like photos,videos,text  to access internet through the browser, whereas the micro-controllers are meant to perform only the specific tasks, for ex, switching the AC off automatically when room temperature drops to a certain defined limit and again turning it ON when temperature rises above the defined limit.

There are number of popular families of micro-controllers which are used in different applications as per their capability and requirement of as per user  to perform the desired task, most common of these are 8051, AVR and PIC micro-controllers. In this article i will introduce you with AVR family of micro-controllers.

History of AVR

The 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 micro-controller, also known as Advanced Virtual RISC. The AT90S8515 was the first micro-controller which is based on AVR architecture however the first micro-controller to hit the commercial market was AT90S1200 in the year 1997.

AVR Micro-controllers 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.

Comparison of AVR And 8051 Family

1)  You guys being surprised after knowing that the Basic AVR controllers are even have the instructions for Addtion ,substraction,and multiplication or division, we have to use some 10 line program to make addition weather in 8051 we have basic ADD,Sub and MUL and Div instructions.

2) 8051 is better for bit manipulation and when your application use this feature 8051 code is a bit smaller.

3) But in general AVR has more compact code because of architecture.

4) 8051 has very limited number of registers and very small SRAM memory (only 256 bytes).

5)The external memory access in 8051 is an overkill, requires too many cycles trying to pass everything with DPTR.

For conclusion about code size:
->For very small projects with many bit manipulations 8051 code is a bit smaller than AVR.
->For projects with external memory (over 256 bytes in 8051) AVR is much better.

Kategori

Kategori