Learn, Implement and Share


This article is a part of Arduino / ATmega328p Embedded C Firmware Programming Tutorial. Consider exploring the course home page for articles on similar topics.

Arduino Tutorial Embedded C Register Level Arduino Master Class

Arduino Tutorial Embedded C Register Level Arduino Master Class

Also visit the Release Page for Register Level Embedded C Hardware Abstraction Library and Code for AVR.


AVR is a family of microcontrollers originally manufactured and sold by Atmel in 1996 and now by Microchip Technology from 2016. AVR family microcontroller used the AVR CPU architecture which is a modified Harvard 8-bit architecture. AVR architecture was designed by Alf-Egil Bogen and Vegard Wollan at the Norwegian Institute of Technology. They designed the architecture in such a way that program and data are stored in separate physical memory systems with different address spaces, but it was possible to read data items from program memory using special instructions. They manufactured the first development chips under Nordic VLSI (now Nordic Semiconductor), later the IP was sold to Atmel, and further development was done there which lead to their first release of the AVR 8-bit chip in 1997. In this article, we will be concentrating on the 8-bit AVR family which shares the same architecture.

What You Will Learn

  • What are the different microcontrollers in AVR family?
  • What are the different families of 8-bit AVR microcontrollers?
  • What are the features of AVR family microcontrollers?


AVR microcontrollers are generally classified into :

  • tinyAVR – small footprint, fewer features, fewer I/O pins, and less memory
  • megaAVR – standard AVR chips
  • AVR Dx – HMI, industrial control, IoT applications
  • XMEGA – large footprint, many features
FeaturestinyAVRmegaAVRAVR DxXMEGA
Program Memory0.5 – 32 KB4 – 256 KB16 – 128 KB16 – 384 KB
Pin Package6 – 32 Pin28 – 100 Pin14 – 64 Pins44 – 64 – 100 Pin
Peripheral Features Limited StandardSuper ExtendedExtended

Common Features of AVR Microcontroller Family

  • Configurable multifunction, bi-directional general-purpose I/O ports with, internal pull-up resistors
  • Configurable internal oscillators
  • Internal, self-programmable flash memory up to 256 KB (384 KB on XMega)
  • On-chip debugging (OCD) support through JTAG or debugWIRE
  • ISP, Serial Programming, Low Voltage and High Voltage programming support
  • Internal EEPROM up to 4 KB
  • Internal SRAM up to 16 KB (32 KB on XMega)
  • 8-bit and 16-bit timers with PWM and Input Capture
  • Internal analog comparator
  • 10 or 12-bit A/D converters, with multiplexer
  • 12-bit D/A converters in some devices
  • I²C compatible Two-Wire Interface (TWI)
  • Synchronous/asynchronous serial peripherals (UART/USART)
  • Serial Peripheral Interface Bus (SPI)
  • Brownout detection
  • Watchdog timer (WDT)
  • Multiple low power consumption sleep modes
  • CAN controller support in some models
  • USB controller support in some models
  • Ethernet controller support in some models
  • LCD controller support in some models
  • DMA controllers and “event system” peripheral communication in some models
  • Fast cryptography support for AES and DES in some models

Detailed Comparison of 8-bit AVR Microcontrollers

Device FamilyPin CountProgram Flash Memory (KB)SRAM (KB)Supply VoltageClock Freq in MHzADC (No. of Bits)ADC (No. of Channels)ComparatorsADC Gain StageDAC (No. of Bits)Temperature SensorInternal Voltage ReferenceZero Cross Detector (ZCD)8-bit PWM16-bit PWMQuadrature DecoderWaveform Extension (WeX)Real-Time Counter8-bit Timer/Counters12-bit Timer Counter16-bit Timer/CounterCustom LogicHardware MultiplierCrypto (AES/DES)CRC/SCANPORBODWDTUSARTUSBI2CSPIIRCOMSerial NumberQTouch®  TechnologyQTouch Technology with PTC (2)LCDExternal Bus InterfaceDMA ChannelsEvent SystemSleepWalkingSleep ModespicoPower® Technology
ATtiny4/5/9/1060.5–10.0321.8–5.512104(3)Y      2     1    Y Y      Y      4 
ATtiny102/1048/1410.0321.8–5.512105/8Y   Y  2     2    Y Y1            4 
ATtiny13A8–2010.0641.8–5.520104Y      2          YYY      Y      3Y
ATtiny20/4012–202/40.128/0.2561.8–5.512108/12Y  Y  22   1 1    YYY  11  Y      4 
ATtiny24A/44A/84A14–202–8Up to 0.5121.8–5.520108YY YY 22   1 1    YYY  11  Y      4Y
ATtiny48/8828–324/8Up to 0.5121.8–5.516108Y  YY 11   1 1    YYY  11         3Y
ATtiny87/16720–328/160.5121.8–5.5161011Y  YY 12   1 1    YYY1(8) 12         4 
ATtiny261A/461A/861A20–322–8Up to 0.5121.8–5.5201011YY YY      1 1    YYY  11  Y      4Y
ATtiny20x/40x/80x/160x8–242–16Up to 11.8–5.5201012Y  YY  2  Y  1YY YYYY1(1) 11 Y     YY3Y
ATtiny21x/41x/81x/161x/321x8–242–32Up to 21.8–5.5201012Y 8YY  2  Y 11YY YYYY1(1) 11 Y Y(4)   YY3Y
ATtiny441/84114–204/8Up to 0.5121.7–5.5161012YY Y  12   1 2    YYY2 11         4Y
ATtiny2313A2020.1281.8–5.520Y   Y 22   1 1    YYY1 12         3Y
ATmega8A/16A/32A28–448–321–22.7–5.516108Y     21  Y2 1 Y  YYY1 11  Y      5 
ATmega8U2/16U2/32U2328–320.5–12.7–5.516Y  YY 46  Y2 3 Y  YYY2Y22         6 
ATmega16U4/32U43216/321/22.7–5.5161012Y  YY 5    1 1 Y  YYY1Y 1         6 
ATmega48PB/88PB/168PB/328PB324–320.5–21.8–5.520108Y  YY 42/6(6)  Y2 1/3(6) Y  YYY1/2(6) 1/2(6)1/2(6)  YY(6)     6 
ATmega80x/160x/320x/480x28–488–481–61.8–5.5201016Y  YY 43  Y  5YY YYYY4 11 Y     YY3Y
ATmega64A/128A6464–12842.7–5.516108YY  Y 26   2 2 Y  YYY2 11  Y      6 
ATmega164PA/324PA/644PA/1284P4416–1281–161.8–5.520108YY  Y 42/2/4  Y2 1/1/2 Y  YYY2 11  Y      6Y
ATmega165PA/325PA/645P4416–641–41.8–5.516108Y   Y 46  Y2 3 Y  YYY3 22         6Y
ATmega169PA/329PA/649P6416–641–41.8–5.516108Y   Y 22  Y2 1 Y  YYY1 11  Y Y    5 
ATmega324PB443221.8–5.520108Y   Y 22  Y2 1 Y  YYY1 11  YY     5 
ATmega640/1280/2560/1281/256164–10064–25681.8–5.516108/16YY  Y 46/12  Y2 4 Y  YYY2/4 11  Y  Y(5)   6 
ATmega3290PA/6490P10032–642–41.8–5.520108YY  Y 22  Y2 1 Y  YYY1 11  Y Y    5 
ATmega3250PA/6450P10032–642–41.8–5.520108YY  Y 22  Y2 1 Y  YYY1 11  Y      5 
AVR-DA Family28-6432-1284–161.8–5.5241212Y 10YY1-39–173–6  Y 11–5YY YYYY3–6 1–22YY Y   YY3Y
ATxmega A1U/A3U/A4U Family44-10016–1282–81.6–3.6321212/16YY12YY  5-8YYY  5-8 YYYYYY5-8Y2-42-4Y Y  Y4Y 5Y
ATxmega B1/B3 Family64–10064–1284–81.6–3.632128YY YY  2/3YYY  2/3 YYYYYY1/2Y11YYY Y 2Y 5Y
ATxmega C3/D3/C4/D4 Family44-6416–3842–321.6–3.6321212/16YY YY  4/5YYY  4/5 Y YYYY2/3Y(7)22YYY    Y 5Y
ATxmega32E5 Family328–321–41.6–3.6321216YY12YY  3YYY  3YY YYYY2 11YYY   4Y 5Y

Crazy Engineer



Naveen · April 14, 2021 at 10:49 am

great work sir
still waiting your complete series of tutorial on Embedded

    Crazy Engineer · April 14, 2021 at 3:27 pm

    Hi Naveen,
    Thanks, and Please keep learning and sharing. More tutorials on the way.

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.