SlideShare a Scribd company logo
1 of 21
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)
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

What's hot

What's hot (20)

embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
 
Atmega32
Atmega32Atmega32
Atmega32
 
AVR Microcontroller
AVR MicrocontrollerAVR Microcontroller
AVR Microcontroller
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
Micro-controller course lec 01
Micro-controller course lec 01Micro-controller course lec 01
Micro-controller course lec 01
 
ATMEGA 328
ATMEGA 328ATMEGA 328
ATMEGA 328
 
Introduction of microcontroller
Introduction of microcontrollerIntroduction of microcontroller
Introduction of microcontroller
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
 
Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processors
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
ankit
ankitankit
ankit
 
STM32 L4 presentation
STM32 L4 presentation STM32 L4 presentation
STM32 L4 presentation
 
Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32 Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32
 
Microcontroller presentation
Microcontroller presentationMicrocontroller presentation
Microcontroller presentation
 
Microcontroller overview 1
Microcontroller overview 1Microcontroller overview 1
Microcontroller overview 1
 
Micro controller
Micro controllerMicro controller
Micro controller
 
819 data sheet
819 data sheet819 data sheet
819 data sheet
 
Microcontroller
Microcontroller Microcontroller
Microcontroller
 

Similar to Avr microcontrollers training (sahil gupta - 9068557926)

Shashank hardware workshop final
Shashank hardware workshop finalShashank hardware workshop final
Shashank hardware workshop finaltechbed
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advancedImran Sheikh
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1SARALA T
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduinoSantosh Verma
 
Nios2 and ip core
Nios2 and ip coreNios2 and ip core
Nios2 and ip coreanishgoel
 
Overview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersOverview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersPremier Farnell
 
Electronics Microcontrollers for IoT applications
Electronics Microcontrollers for IoT applicationsElectronics Microcontrollers for IoT applications
Electronics Microcontrollers for IoT applicationsLeopoldo Armesto
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded SystemsPeter Tröger
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Harshit Srivastava
 
E scala design platform
E scala design platformE scala design platform
E scala design platformesenciatech
 
Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollersdundappabhangari
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentalsJLoknathDora
 

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

Avr introduction
Avr introductionAvr introduction
Avr introduction
 
arduino.pdf
arduino.pdfarduino.pdf
arduino.pdf
 
Shashank hardware workshop final
Shashank hardware workshop finalShashank hardware workshop final
Shashank hardware workshop final
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
Msp 430 architecture module 1
Msp 430 architecture module 1Msp 430 architecture module 1
Msp 430 architecture module 1
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
Dsp on an-avr
Dsp on an-avrDsp on an-avr
Dsp on an-avr
 
Nios2 and ip core
Nios2 and ip coreNios2 and ip core
Nios2 and ip core
 
Microcontroller
Microcontroller Microcontroller
Microcontroller
 
Overview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit MicrocontrollersOverview of ST7 8-bit Microcontrollers
Overview of ST7 8-bit Microcontrollers
 
Electronics Microcontrollers for IoT applications
Electronics Microcontrollers for IoT applicationsElectronics Microcontrollers for IoT applications
Electronics Microcontrollers for IoT applications
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded Systems
 
M&i(lec#01)
M&i(lec#01)M&i(lec#01)
M&i(lec#01)
 
lb.pptx
lb.pptxlb.pptx
lb.pptx
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2
 
E scala design platform
E scala design platformE scala design platform
E scala design platform
 
1. hardware basics
1. hardware basics1. hardware basics
1. hardware basics
 
Embedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_MicrocontrollersEmbedded_System_wireless_Technolgy_with_Microcontrollers
Embedded_System_wireless_Technolgy_with_Microcontrollers
 
Microprocessor fundamentals
Microprocessor fundamentalsMicroprocessor fundamentals
Microprocessor fundamentals
 

More from Sahil Gupta

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

More from Sahil Gupta (7)

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

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.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)
  • 9.
  • 10.
  • 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.