Skip to main content

AVR Microcontrollers

AVR is a 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 in operation. AVR was developed in year 1996 by Atmel corporation. The architecture of AVR was developed by Alf-Egil Bogen and Regards Swollen. AVR derives from its developers and stands for Alf-Egil Bogen Vegard Wollen RISC microcontroller, also known as Advanced Virtual RISC machine. The AT90S8515 was 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 as shown below;
Series Name Pins Flash Memory Special Features
Tiny AVR 6-32 0.5-8Kb Small in size
Mega AVR 28-100 4-256Kb Extended peripherals
XmegaAVR AVR 44-100 16-384Kb DMA,Event system included

TinyAVR:-

Less memory, small size, suitable only for small applications.

MegaAVR:-

These are most popular ones having good amount of memory(256Kb), higher number of inbuilt peripherals and suitable for moderate to complex applications.

XmegaAVR:-

Used commercially for complex applications which require large program memory and high speed.
AVR microcontrollers 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 most commonly used families of microcontrollers;
Parameters 8051 PIC AVR
Speed Slow Moderate Fast
Memory Small Large Large
Architecture CISC RISC RISC
ADC Absent Inbuilt Inbuilt
Timers Inbuilt Inbuilt Inbuilt
PWM Channels Absent Inbuilt Inbuilt
Features
• High-performance, Low-power Atmel®AVR® 8-bit Microcontroller
• Advanced RISC Architecture
– 131 Powerful Instructions – Most Single-clock Cycle Execution
– 32 × 8 General Purpose Working Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16MHz
– On-chip 2-cycle Multiplier
• High Endurance Non-volatile Memory segments
– 32Kbytes of In-System Self-programmable Flash program memory
– 1024Bytes EEPROM
– 2Kbytes Internal SRAM
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C(1)
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
– Programming Lock for Software Security
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary-scan Capabilities According to the JTAG Standard
– Extensive On-chip Debug Support
– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface
• Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
– Real Time Counter with Separate Oscillator
– Four PWM Channels
– 8-channel, 10-bit ADC
8 Single-ended Channels
7 Differential Channels in TQFP Package Only
2 Differential Channels with Programmable Gain at 1x, 10x, or 200x
– Byte-oriented Two-wire Serial Interface
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
• Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby
and Extended Standby
• I/O and Packages
– 32 Programmable I/O Lines
– 40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF
• Operating Voltages
– 2.7V - 5.5V for ATmega32L
– 4.5V - 5.5V for ATmega32
• Speed Grades
– 0 - 8MHz for ATmega32L
– 0 - 16MHz for ATmega32
• Power Consumption at 1MHz, 3V, 25°C
– Active: 1.1mA
– Idle Mode: 0.35mA
– Power-down Mode: < 1µA

Comments

Popular posts from this blog

8051 Simple Programs

Sum of 8-bit Numbers Stored in Memory Here  we will discuss about 8051 programs but we can't discuss about all of the 8051 instructions. For programming 8051 we should know about assembler directives as well as instruction set. Click  here to download Atmel c51 user guide that will discuss about 8051(c51 family microcontroller) instruction set, assembler directives, c51 cross assembler from Atmel.  Program ORG 00H MOV R0,#50H   ; get memory location in memory pointer R0 MOV R1,#51H   ; get memory location on memory pointer register R1 MOV A,@R0       ; get content of memory location 50H to accumulator ADD A,@R1        ; add content of A with content of memory location 51H and store result in A MOV R0,#52H    ; get 52H to memory pointer R0 MOV@R0,A         ; copy content of A to memory location 52H END Add 16-bit Numbers ...

Introduction to 8051 embedded C

For 8051 we need to include the file reg51.h. This file contains the all the definitions of 8051 registers. With this information C compiler produces hex file that can be downloaded into the ROM of the microcontroller. It is important to note that the size of the hex file produced by the assembly language is much larger than the hex file produced by C compiler. Apart from this fact, there is many reasons for writing programs in C instead of assembly: ●It is much easier and less time consuming to write programs in C assembly. ●C is more flexible; it is easier to modify and update. ●Programming in C allows to use code available in function libraries. ●Program written inC for one microcontroller is portable to other microcontrollers with little or no modifications. Data Types in 8051 Embedded C The table shown below lists the data types that are available in typical C51 compiler. The gives information about the size of the data variable and it's value range. Data type ...

Frequency of Oscillation of RC Phase Shift Oscillator

Derivation of Frequency of Oscillation We have to find out the transfer function of RC feedback network. Feedback Circuit of RC Phase Shift Oscillator Applying KVL to various loops on the figure, we get, $$I_1 \left(R+\frac{1}{j \omega C }\right) -I_2R=V_i \text{ ....(1)}$$ $$-I_1R+I_2\left (2R+\frac {1}{j\omega C}\right)-I_3R=0\text{ ... (2)}$$ $$0-I_2R+I_3\left(2R+ \frac{1}{j\omega C}\right)=0\text{ ...(3)}$$ Replacing \(j\omega\) with \(s\) and writing equations in the matrix form, $$\begin{bmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{sC} & -R \\0 & -R & 2R+\frac{1}{2sC} \end{bmatrix}\begin{bmatrix}I_1\\I_2\\I_3\end{bmatrix}=\begin{bmatrix}V_i\\0\\0\end{bmatrix}$$ Using Cramer's rule to find out \(I_3\), $$\text{Let, }D=\begin{bmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{sC} & -R \\0 & -R & 2R+\frac{1}{2sC} \end{bmatrix}$$ \(|D|=\begin{vmatrix}R+\frac{1}{sC} & -R & 0 \\-R & 2R+\frac{1}{...