AVR Microcontrollers

What is a microcontroller?
− microprocessor
− Read-write memory
− Flash memory
− EEPROM
− Input/Output Control
− Peripheral Devices (AD/DA)

Billions sold per year, most processors

Emphasis is on cost. (pennies)

Alternative/paired to ASIC/DSP

Emphasis on power consumption
ATMega32 Specifications

Low-Power 8-bit AVR Microcontroller

Modified Harvard Architecture

Around $4 individual, $2.50 in Volume

32 8-bit general-purpose registers

131 Instructions, Multi-cycle Implementation
− Most are single-cycle
− 2-cycle multiply, 2-cycle memory access
− Thus up to 1MIPS/MHz

20MHz, up to 20MIPS

16KB self-programmable Flash

512 Bytes EEPROM

1KB SRAM
Uses

Consumer electronics

Appliances

Automotive

Electrical/Heating

Computers / Hard Drives

Hobbyist projects!
− Installation art
− Musical instruments
− Home automation
− Audio Distribution
− Web Server!!
− MANY MORE!!
Manufacturers

Intel, Freescale, Microchip (PIC), TI, Zilog

Atmel AVR
− Many Types, tinyAT, megaAT, automotive
− Lighting, LCD
− Share unified platform
− Different #s of I/O control
− Built-in Pull-up resistors
− Ethernet, Serial Data, Auxiliary Power, USB
− Analog I/O, Packaging, Interrupts, Math, JTAG
− Get the right amount of memory for the job
Development Platforms

Everything Needed, All-In-One

Arduino / Diecimila
− ATMega8 / ATMega168 based
− Open source, multiplatform IDE
− Cheap ($33 assembled!)
− Great Online Community
− USB, power, protoshield available, breadboard,
LEDs

Parallax (PIC)

PICAXE (PIC)

ArmExpress

Many Others
Cheaper

A Transistor Saved is a Transistor Earned

No Lack Floating Point

Non-Pipeline

No cache

Limited Math / Branching

Very Slow (1 to 32MHz)

Very Little Memory (64bytes to 256KB)

From under a dollar to $20 for advanced
− Cheaper in volume
− Important for large product runs
AVR History

Conceived by two students at Norwegian
Institute of Technology (NTH)
− Alf-Egil Bogen and Vegard Wollan

Originally Known as μRISC (Micro RISC)

Sold to Atmel, continued working under
Atmel Norway subsidiary

AVR supposedly not acronym
− May mean Advanced Virtual RISC

Beauty in simplicity
− Can wrap mind around entire CPU
ATMega32 IO

6 PWM Shared Input/Outputs (Analog)

8 digital input/outputs

SPI-serial, 2-wire serial, ISP, others
− Monitoring, debugging, programming, power

USART serial interface
− (interfaces with USB on Arduino)
Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)
Instruction Set

Mostly unified across all AVR
− With exceptions for feature differences

32 or 16 bit instructions

8-bit fields, vary depending on instructions

I/O manipulation treated in similar fashion to
registers
− Allows for clean and simple usage

Parallel Instruction Fetch

Uses Skip instead of Branches

Use software libraries for more complex
functionality (divide)
Registers

32 general purpose registers

Addressable as first 32 memory addresses

4 Different Simultaneous Access Schemes

X, Y, Z registers for indirect memory
− Dual-purpose, 16 bit
− 26/27, 28/29, 30/31

200+ I/O, settings, timers, interrupts registers

Overflow at 256 / 65K!
Registers
Memories

3 different memories
− SRAM
− Flash
− EEPROM

Direct/Indirect Addressing (5 modes total)

Flash is divided into two 8KB sections
− Independently addressable

Flash has reserved Bootloader section for
software security
Additional Functionality

Registers for serial access

Interrupts

External Interrupts

Power Management

Timers

Analog Comparators

Other Goodies

All handled via special registers
− Some settings via bit-flags
Compilers

Meant for Assembly Programming
− Many environments available

BASIC and FORTRAN compilers available

Open Source Tools and Compilers

avr-GCC for C/C++ support

AVR Studio Assembler / Simulator
− Supported, official, Windows-only IDE
Operating System?

No common operating systems available

None would work!

EEPROM Bootloader / Initializer

Real-Time Operating Systems

Commercial Systems:
− Salvo
− AVRX
− NutOS
− Proc
FreeRTOS

Free and Open Source Operating System
− Portable across many platforms
− Royalty Free

1-2KB storage

50-100Bytes Memory

Can spawn off “tasks”
− Guaranteed timings, simple

“Coroutines”
− Less memory, more complex, coexist, portable

Commercial Sister Projects
Loading

EEPROM burner / custom Programmer

ISP-interface
− Serial / Parallel Programming (AVRdude)

USB tty support

Most IDE's available will make this job easy
Future

Smaller, Better, Faster, Cheaper

Many new products become possible
− Children's toys
− Ubiquitous Computing
− Physical Computing

Becoming very popular among Hobbyists

Great introduction for CS people into EE-land
A/D CONVERTER
An Analog-to-digital
converter (abbreviated ADC, A/D or A to D) is a device 
that  converts  a  continuous  physical  quantity  (usually 
voltage) to a digital number that represents the quantity's 
amplitude.  The  conversion  involves quantization of  the 
input,  so  it  necessarily  introduces  a  small  amount  of 
error. Instead of doing a single conversion, an ADC often 
performs  the  conversions  (“samples"  the  input) 
periodically.  The  result  is  a  sequence  of  digital  values 
that  have  converted  a  continuous-time  and  continuous-
amplitude analog  signal to  a discrete  time and  discrete-
amplitude digital signal.

More Related Content

PPSX
ATmega32
PPT
Introduction to Atmel's 8-bit AVR Microcontrollers
PPTX
Introduction to AVR Microcontroller
PPTX
Advance Microcontroller AVR
PPTX
Basics of ATmega32
PPTX
Tutorial on avr atmega8 microcontroller, architecture and its applications
PPTX
Avr and arm
PPTX
AVR ATmega32
ATmega32
Introduction to Atmel's 8-bit AVR Microcontrollers
Introduction to AVR Microcontroller
Advance Microcontroller AVR
Basics of ATmega32
Tutorial on avr atmega8 microcontroller, architecture and its applications
Avr and arm
AVR ATmega32

What's hot (20)

PPTX
embedded system and AVR
PPTX
ATmega32-AVR microcontrollers-Part I
PDF
AVR Microcontroller
PPTX
Introduction to Microcontrollers
PPTX
Micro-controller course lec 01
PPTX
ATMEGA 328
PPTX
Introduction of microcontroller
PDF
AVR_Course_Day4 introduction to microcontroller
PPTX
Intro to micro controller (Atmega16)
PPTX
Features of 89c51,pic,avr & arm processors
PPTX
Embedded system
PPTX
PDF
STM32 L4 presentation
PDF
Interfacing using ِAtmega16/32
PPTX
Microcontroller presentation
PPTX
Microcontroller overview 1
PDF
Micro controller
PDF
819 data sheet
PPTX
Microcontroller
embedded system and AVR
ATmega32-AVR microcontrollers-Part I
AVR Microcontroller
Introduction to Microcontrollers
Micro-controller course lec 01
ATMEGA 328
Introduction of microcontroller
AVR_Course_Day4 introduction to microcontroller
Intro to micro controller (Atmega16)
Features of 89c51,pic,avr & arm processors
Embedded system
STM32 L4 presentation
Interfacing using ِAtmega16/32
Microcontroller presentation
Microcontroller overview 1
Micro controller
819 data sheet
Microcontroller
Ad

Similar to Avr microcontrollers training (sahil gupta - 9068557926) (20)

PPT
Avr introduction
PPTX
1. Microcontroller Basics ENTC department.pptx
PDF
Practical reverse engineering and exploit development for AVR-based Embedded ...
DOCX
Training report on embedded sys_AVR
PPTX
ATmega 16
PDF
The document provides an overview of the Arduino platform for beginners.
PDF
Microcontroller
PPT
AVR_ Microcontroller_Muhammad Ali_Mazidi_AVR_Lecture2_Fall2023
PDF
Microcontrolador AVR y Sistemas Embebidos completos.pdf
PDF
introduction to embedded systems part 2
PDF
1-AVR Introduction to Atmega32 good .pdf
PPTX
3.TechieNest microcontrollers
PPTX
Overview of Microcontroller and ATMega32 microcontroller
PPT
AVR_ Microcontroller_Muhammad Ali_Mazidi_AVR_Lecture3_Fall2023
PDF
Instruction for AVR32 proccessors atmel micro
PDF
PPTX
Presentation
PDF
AVR introduction
PPT
Arduino
PPTX
Embedded Application : An Autonomous Robot or Line Follower Bot
Avr introduction
1. Microcontroller Basics ENTC department.pptx
Practical reverse engineering and exploit development for AVR-based Embedded ...
Training report on embedded sys_AVR
ATmega 16
The document provides an overview of the Arduino platform for beginners.
Microcontroller
AVR_ Microcontroller_Muhammad Ali_Mazidi_AVR_Lecture2_Fall2023
Microcontrolador AVR y Sistemas Embebidos completos.pdf
introduction to embedded systems part 2
1-AVR Introduction to Atmega32 good .pdf
3.TechieNest microcontrollers
Overview of Microcontroller and ATMega32 microcontroller
AVR_ Microcontroller_Muhammad Ali_Mazidi_AVR_Lecture3_Fall2023
Instruction for AVR32 proccessors atmel micro
Presentation
AVR introduction
Arduino
Embedded Application : An Autonomous Robot or Line Follower Bot
Ad

More from Sahil Gupta (7)

PPTX
Training on java niit (sahil gupta 9068557926)
PPT
Cnc training (sahil gupta 9068557926)
PPTX
Cnc & java training in bhel (sahil gupta 9068557926)
PPT
8051 microcontroller training (sahil gupta 9068557926)
PPT
8051 microcontroller training (2) (sahil gupta 9068557926)
PPTX
8051 microcontroller and embedded training (sahil gupta 9068557926)
PPT
Plc training (sahil gupta 9068557926)
Training on java niit (sahil gupta 9068557926)
Cnc training (sahil gupta 9068557926)
Cnc & java training in bhel (sahil gupta 9068557926)
8051 microcontroller training (sahil gupta 9068557926)
8051 microcontroller training (2) (sahil gupta 9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
Plc training (sahil gupta 9068557926)

Recently uploaded (20)

PPTX
4. Diagnosis and treatment planning in RPD.pptx
PPTX
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
PDF
Health aspects of bilberry: A review on its general benefits
PPT
hsl powerpoint resource goyloveh feb 07.ppt
PDF
Unleashing the Potential of the Cultural and creative industries
PDF
Review of Related Literature & Studies.pdf
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PDF
African Communication Research: A review
PPTX
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
PDF
FYJC - Chemistry textbook - standard 11.
PDF
POM_Unit1_Notes.pdf Introduction to Management #mba #bba #bcom #bballb #class...
PDF
anganwadi services for the b.sc nursing and GNM
PPTX
Neurology of Systemic disease all systems
PDF
Diabetes Mellitus , types , clinical picture, investigation and managment
DOCX
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
PPTX
Diploma pharmaceutics notes..helps diploma students
PDF
Chevening Scholarship Application and Interview Preparation Guide
PPTX
Neurological complocations of systemic disease
PDF
faiz-khans about Radiotherapy Physics-02.pdf
PPTX
Power Point PR B.Inggris 12 Ed. 2019.pptx
4. Diagnosis and treatment planning in RPD.pptx
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
Health aspects of bilberry: A review on its general benefits
hsl powerpoint resource goyloveh feb 07.ppt
Unleashing the Potential of the Cultural and creative industries
Review of Related Literature & Studies.pdf
2025 High Blood Pressure Guideline Slide Set.pptx
African Communication Research: A review
pharmaceutics-1unit-1-221214121936-550b56aa.pptx
FYJC - Chemistry textbook - standard 11.
POM_Unit1_Notes.pdf Introduction to Management #mba #bba #bcom #bballb #class...
anganwadi services for the b.sc nursing and GNM
Neurology of Systemic disease all systems
Diabetes Mellitus , types , clinical picture, investigation and managment
THEORY AND PRACTICE ASSIGNMENT SEMESTER MAY 2025.docx
Diploma pharmaceutics notes..helps diploma students
Chevening Scholarship Application and Interview Preparation Guide
Neurological complocations of systemic disease
faiz-khans about Radiotherapy Physics-02.pdf
Power Point PR B.Inggris 12 Ed. 2019.pptx

Avr microcontrollers training (sahil gupta - 9068557926)

  • 1. AVR Microcontrollers  What is a microcontroller? − microprocessor − Read-write memory − Flash memory − EEPROM − Input/Output Control − Peripheral Devices (AD/DA)  Billions sold per year, most processors  Emphasis is on cost. (pennies)  Alternative/paired to ASIC/DSP  Emphasis on power consumption
  • 2. ATMega32 Specifications  Low-Power 8-bit AVR Microcontroller  Modified Harvard Architecture  Around $4 individual, $2.50 in Volume  32 8-bit general-purpose registers  131 Instructions, Multi-cycle Implementation − Most are single-cycle − 2-cycle multiply, 2-cycle memory access − Thus up to 1MIPS/MHz  20MHz, up to 20MIPS  16KB self-programmable Flash  512 Bytes EEPROM  1KB SRAM
  • 3. Uses  Consumer electronics  Appliances  Automotive  Electrical/Heating  Computers / Hard Drives  Hobbyist projects! − Installation art − Musical instruments − Home automation − Audio Distribution − Web Server!! − MANY MORE!!
  • 4. Manufacturers  Intel, Freescale, Microchip (PIC), TI, Zilog  Atmel AVR − Many Types, tinyAT, megaAT, automotive − Lighting, LCD − Share unified platform − Different #s of I/O control − Built-in Pull-up resistors − Ethernet, Serial Data, Auxiliary Power, USB − Analog I/O, Packaging, Interrupts, Math, JTAG − Get the right amount of memory for the job
  • 5. Development Platforms  Everything Needed, All-In-One  Arduino / Diecimila − ATMega8 / ATMega168 based − Open source, multiplatform IDE − Cheap ($33 assembled!) − Great Online Community − USB, power, protoshield available, breadboard, LEDs  Parallax (PIC)  PICAXE (PIC)  ArmExpress  Many Others
  • 6. Cheaper  A Transistor Saved is a Transistor Earned  No Lack Floating Point  Non-Pipeline  No cache  Limited Math / Branching  Very Slow (1 to 32MHz)  Very Little Memory (64bytes to 256KB)  From under a dollar to $20 for advanced − Cheaper in volume − Important for large product runs
  • 7. AVR History  Conceived by two students at Norwegian Institute of Technology (NTH) − Alf-Egil Bogen and Vegard Wollan  Originally Known as μRISC (Micro RISC)  Sold to Atmel, continued working under Atmel Norway subsidiary  AVR supposedly not acronym − May mean Advanced Virtual RISC  Beauty in simplicity − Can wrap mind around entire CPU
  • 8. ATMega32 IO  6 PWM Shared Input/Outputs (Analog)  8 digital input/outputs  SPI-serial, 2-wire serial, ISP, others − Monitoring, debugging, programming, power  USART serial interface − (interfaces with USB on Arduino)
  • 11. Instruction Set  Mostly unified across all AVR − With exceptions for feature differences  32 or 16 bit instructions  8-bit fields, vary depending on instructions  I/O manipulation treated in similar fashion to registers − Allows for clean and simple usage  Parallel Instruction Fetch  Uses Skip instead of Branches  Use software libraries for more complex functionality (divide)
  • 12. Registers  32 general purpose registers  Addressable as first 32 memory addresses  4 Different Simultaneous Access Schemes  X, Y, Z registers for indirect memory − Dual-purpose, 16 bit − 26/27, 28/29, 30/31  200+ I/O, settings, timers, interrupts registers  Overflow at 256 / 65K!
  • 14. Memories  3 different memories − SRAM − Flash − EEPROM  Direct/Indirect Addressing (5 modes total)  Flash is divided into two 8KB sections − Independently addressable  Flash has reserved Bootloader section for software security
  • 15. Additional Functionality  Registers for serial access  Interrupts  External Interrupts  Power Management  Timers  Analog Comparators  Other Goodies  All handled via special registers − Some settings via bit-flags
  • 16. Compilers  Meant for Assembly Programming − Many environments available  BASIC and FORTRAN compilers available  Open Source Tools and Compilers  avr-GCC for C/C++ support  AVR Studio Assembler / Simulator − Supported, official, Windows-only IDE
  • 17. Operating System?  No common operating systems available  None would work!  EEPROM Bootloader / Initializer  Real-Time Operating Systems  Commercial Systems: − Salvo − AVRX − NutOS − Proc
  • 18. FreeRTOS  Free and Open Source Operating System − Portable across many platforms − Royalty Free  1-2KB storage  50-100Bytes Memory  Can spawn off “tasks” − Guaranteed timings, simple  “Coroutines” − Less memory, more complex, coexist, portable  Commercial Sister Projects
  • 19. Loading  EEPROM burner / custom Programmer  ISP-interface − Serial / Parallel Programming (AVRdude)  USB tty support  Most IDE's available will make this job easy
  • 20. Future  Smaller, Better, Faster, Cheaper  Many new products become possible − Children's toys − Ubiquitous Computing − Physical Computing  Becoming very popular among Hobbyists  Great introduction for CS people into EE-land
  • 21. A/D CONVERTER An Analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device  that  converts  a  continuous  physical  quantity  (usually  voltage) to a digital number that represents the quantity's  amplitude.  The  conversion  involves quantization of  the  input,  so  it  necessarily  introduces  a  small  amount  of  error. Instead of doing a single conversion, an ADC often  performs  the  conversions  (“samples"  the  input)  periodically.  The  result  is  a  sequence  of  digital  values  that  have  converted  a  continuous-time  and  continuous- amplitude analog  signal to  a discrete  time and  discrete- amplitude digital signal.