History of AVR
AVR family gets divided in three categories:
fig.1 AVR Family members |
AVR was developed in the year 1996 by ATMEL corporation. the architecture of AVR was developed by Alfa-Egli Bogen and Vegard Wollan. hence naming derive by its developer Alf Vigard RISC microcontroller.
AVR family gets divided in three categories:
- Tiny AVR - small size, less memory ,less number of task can perform at a time.
- Mega AVR -Medium size, available with more specifications , ability to perform complex task.
- Xmega AVR - size increase, high performance use in complex operations in industry.
Why should we preferred AVR over typical 80c51/52:
AVR family is faster than 80c51 family. here we get more program memory and data memory.
the comparative AVR like atmega 16/32 have more features like inbuilt ADC on low cost ,it can support inbuilt protocols like I2C,SPI which lacks in 8051 basic family .
the biggest difference is the architecture it follows RISC architecture where as 8051 follows CISC architecture .
PWM(pulse width modulation) channels can be offered by AVR atmega 16/32. which is not by 8051.
so now we are more focused on AVR but 8051 is the most famous family do quarry about that also.👀
source code:led blinking on portc
USE ATMEL STUDIO TO COMPILE IT.
#define F_CPU80000000UL //inbuilt crystal frequency
#include<avr/io.h> //avr header file
#include<util/delay.h> // inbuilt delay header
int main()
{
DDRC=0XFF; //portC is selected and DDR sesides direction which 1-out 0-input
while(1) //infinite loop
{
PORTC=0XFF; //write one for out led will get on
_delay_ms(1000); // delay of 1sec
PORTC=0X00; // disable or clear led on this port will get off
_delay_ms(1000); //delay
}
return 0; //return for int type function main
}
No comments:
Post a Comment