AVR Microcontroller: All You Need to Know

Recently we introduced the ATmega8 – a high-performance AVR microcontroller series manufactured by Atmel (Missed it? Click here to read.). Today we’ll continue to dive into the AVR subject and let’s see what information we just found.

What is an AVR Microcontroller?

– History

AVR microcontroller is basically a family of microcontrollers designed and manufactured by Atmel since 1996, long before the company was acquired by Microchips.

It is widespread that the term AVR stands for Alf-Egil Bogen and Vegard Wollan’s RISC (or Advanced Virtual RISC) which, however, Atmel never officially recognized. Anyway, today AVR generally refers to the 8-bit RISC flash microcontroller product line derived from Atmel.

– Definition

As any other microcontroller does, AVR serves as a small self-contained computer to process data and functions; it takes a crucial part in an embedded system application that ranges from medical, marine, consumer electronics, automobiles, and more.

– Categories

AVR comes in a variety of sizes, specs, and uses. Usually, they are categorized into 3 types: Tiny AVR, Mega AVR X-Mega AVR.

·Tiny AVR (e.g. ATtiny25)

Small in size, 0.5 KB ~ 32 KB program memory, 6 ~ 32 PINs, limited peripherals set, suitable for small applications

·Mega AVR (e.g. ATmega8)

Medium size, 4 KB ~ 256 KB program memory, 28 ~ 100 PINs, extended peripherals set, capable for normal and complex applications, hobbyist-friendly, and welcome for educational purposes

·X-Mega AVR (e.g. ATmega32)

Relatively large in size, 16 KB ~ 384 KB program memory, 44 ~ 106 PINs, for commercial purposes

Why AVR Microcontroller?

There are different kinds of microcontrollers like 8051, PIC (Peripheral Interface Controller), and AVR of course. Among these 3 types, AVR microcontrollers prevail in many ways. 

figure 1. typical block diagram of an AVR microcontroller

– RISC Architecture

As opposed to CISC (Complex Instruction Set Computer) which emphasizes the capability of hardware to handle complex instructions, RISC (Reduced Instruction set Computer) approach attaches importance to software ability to execute instructions in an overall shorter period. Furthermore, RISC leaves more space for registers.

Not like 8051 which utilizes the CISC approach, both AVR and PIC microcontrollers are based on RISC architecture. But, PIC runs 4 clock/instruction cycles while AVR runs 1 clock/instruction cycle which is to say technically AVR is 4 times faster than PIC.

– Cheap & Effective

Another main reason to pick an AVR microcontroller is that they have the ideal cost-to-quality ratio. By the year 2003, Atmel had delivered about 500 million AVR microcontrollers and this product line continues striving to develop branches for hobbyists’ projects.

– Wide Range of Options

As we have mentioned just now, AVR microcontrollers are provided in a wide spectrum of configurations concerning pins layout, memory, speed, peripherals (i.e. watchdog timer, IRQ, EEPROM), etc. Thus, you’ll be able to obtain the one that suits your project best.

– Easy to Program

On one hand, you can use graphical configuration to send complex instructions in its own IDE (Integrated Development Software) Atmel Studio. On the other hand, if you are experiencing any issues while programming, you can always turn to online forums since AVR is so popular among hobbyists.

Where to Use

– Arduino

Arduino is a global open-source prototyping platform for electronics hobbyists. On account of its cost-effective characteristics, AVR microcontrollers are preferred by Arduino lovers. With a boot loader, Arduino lovers can easily achieve simple programmable tasks.

– Automobile

Many of the AVR microcontrollers can operate under temperature up to 150°C which is perfect for under-the-hood applications which often undergoes a high ambient temperature. 

– Medical

Representative applications in the Medical field include pushup trainer, solar-powered pulse oximeter, heart rate display LED wears, thermistor respiratory monitor, etc.

figure 2. Automatic Feeding Machine based on Attiny13 microcontroller

– Consumer Electronics

Through sophisticated peripherals configurations and creativity, AVR has inspired plenty of human-oriented applications like Wi-Fi-controlled telescope, GSM module interface, Bluetooth module interface, automotive dishwashing machines, and more.

Choose the Right Microcontrollers

– List required hardware interfaces like ISP, PDI, UPDI, and so on.

– Figure out memory requirements for your project.

– Examine software architecture to avoid any incompatibility.

– Anticipate the total cost and power limitations of your project.

– Check out market availability and factory leading time so that you build your project development won’t be encumbered.

– Prepare supported tools or resources, sometimes they may directly come from the manufacture

Final Thoughts

In this journey with the AVR microcontroller, Easybom has discussed aspects you need to know about AVR. 

Back to days when IoT aren’t so within reach, it’s hard to imagine how tough a time that hobbyists must have gone through facing programming bugs. So I think we shall never give up questioning and learning with such versatile tools in hand. And I wish Easybom to be one of your most trustworthy partners.

Christophe Rude
Christophe Rude
Articles: 15874