SlideShare a Scribd company logo
1
Contents
• Introduction
• History of AVR
• AVR microcontroller
• Types of AVR microcontrollers
• AVR architecture
• GPIO Registers
• Interfacing
• Timers
• References
• Conclusion
2
Introduction
• AVR stand for ADVANCED VIRTUAL RISC.
• AVR micro controllers is family of RISC microcontrollers from
Atmel.
• AVR was one of the first microcontroller families to use on-
chip flash memory for program storage.
• AVR microcontrollers are very popular, used in numerous
applications, particularly in project prototyping and also in
embedded devices.
3
History of AVR
• AVR is a family of microcontrollers developed by Atmel beginning in
1996.
• The Atmel AVR has 8-bit RISC microcontrollers.
• The AVR architecture was conceived by two students at the
Norwegian Institute of Technology, Alf-Egil Bogen and Vegard Wollan.
4
RISC microcontroller
• RISC stands for Reduced Introduction Set Computer.
• Till 1980 Trend was to build increasingly complex CPUs with complex
set of instructions like (CISC).
• Instruction execute in single cycle.
• RISC architecture CPUs capable of executing only a very limited
simple set of instructions.
5
AVR microcontroller
• Devices range from 1 to 256KB.
• Pin count range from 8 to 100.
• Full code compatibility.
• Pin/feature compatible families.
• One set of development tools.
6
Types of AVR microcontrollers
AVR microcontrollers are obtainable in three
categories:-
• Tiny AVR
• Mega AVR
• Xmega AVR
7
TINY AVR
This microcontroller has Less
memory, small in size, only for
simpler applications.
• 0.5–16 KB program memory.
• 6–32-pin package.
• Small in size.
8
MEGA AVR
• This microcontroller is the most popular having a good amount of
memory up to 256KB, higher no. of inbuilt peripherals and fit for
modest to difficult applications.
• 4–256 KB program memory
• 28–100-pin package
• Extended instruction set
9
ATMEGA16 PIN DIAGRAM
• Atmega16 have total of 40 pins in which 32 are I/O
pins.
• VCC (PIN10) - Digital supply voltage.
• GND (PIN11) - Ground
• Port A (PA7..PA0) - Port A serves as the analog
inputs to the A/D Converter Port A also serves as an
8-bit bi-directional I/O port, if the A/D Converter is not
used.
•
10
CONTINUE…
• Port B (PB7..PB0) - Port B is an 8-bit bi-directional I/O port with internal
pull-up resistors selected for each bit.
• Port C (PC7..PC0) - Port C is an 8-bit bi-directional I/O port with internal
pull-up resistors selected for each bit.
• Port D (PD7..PD0) - Port D is an 8-bit bi-directional I/O port with internal
pull-up resistors selected for each bit.
• RESET - Reset Input a low level on this pin for longer than the minimum
pulse length will generate a reset
• AVCC - AVCC is the supply voltage pin for Port A and the A/D Converter.
• AREF - AREF is the analog reference pin for the A/D Converter.
• XTAL 2 - Output to Inverting Oscillator Amplifier.
11
XMEGA AVR
• This microcontroller is used commercially for compound
applications, which need large program memory and also
high speed.
• 16–384 KB program memory
• 44-100 pin
• Extended performance features such as DMA, Event
System.
12
AVR ARCHITECTURE
• ALU
• 32 General Purpose Registers
• Static RAM
• EEPROM
• Flash
• Timer/Counter
• Comparator
• Watch Dog timer
• Protocols: UART, SPI, I2C
• I/O Ports
13
Table 1: Basic registers of ATmega16
GPIO Registers
14
INTERFACING OF LED
• A LED is an acronym for Light Emitting Diode and is basically an
electronic device which emits light when an electric current flows
through it.
15
16
17
Numeric
Value
Dp G F E D C B A Address
0 0 0 1 1 1 1 1 1 0x3F
1 0 0 0 0 0 1 1 0 0x06
2 0 1 0 1 1 0 1 1 0x5B
3 0 1 0 0 1 1 1 1 0x4F
4 0 1 1 0 0 1 1 0 0x66
5 0 1 1 0 1 1 0 1 0x6D
6 0 1 1 1 1 1 0 1 0x7D
7 0 0 0 0 0 1 1 1 0x07
8 0 1 1 1 1 1 1 1 0x7F
9 0 1 1 0 1 1 1 1 0x6F18
Table 2: Truth Table of a CC 7-segment display
7-SEGMENT DISPLAY INTERFACING
19
• The seven segment display is the most common display device used
in many gadgets, and electronic appliances like digital meters, digital
clocks, microwave oven and electric stove, etc.
• Types of 7-Segment Displays:
Common Anode Display
Common Cathode Display
20
21
INTERFACING OF SWITCH
• An electrical switch is any device used to interrupt the flow of
electrons in a circuit. Switches are essentially binary devices they are
either completely on (“closed”) or completely off (“open”).
22
DC MOTOR INTERFACING
• An electric motor is an electrical machine that converts electrical
energy into mechanical energy.
23
24
25
LCD INTERFACING
• LCD (Liquid Crystal Display) screen is
an electronic display module and find a
wide range of applications. A 16x2 LCD
display is very basic module and is very
commonly used in various devices and
circuits.
26
27
28
TIMERS
• Timer is totally independent of the CPU.
• In AVR timers are of two types: 8-bit and 16-bit timers.
TIMER0 – 8-bit timer
TIMER1– 16-bit timer
TIMER2 – 8-bit timer
29
INTERRUPTS
• Interrupts are basically events that require immediate attention by the
microcontroller.
• Atmega16 in total has twenty one (21) interrupts available.
• The available interrupts are categorized in two classes:
External Interrupts
Internal Interrupts
30
Conclusion
• AVR is RISC architecture.
• AVR microcontrollers are very popular, used in numerous applications,
particularly in project prototyping and also in embedded devices.
• Programming is easy.
• AVR is Pipe lined processors resulting in faster execution.
• A watchdog to handle hanging software states is added.
31
REFERENCES
• Mazidi Ali Muhammad, Mazidi Gillispie Janice, “The 8051
Microcontroller and Embedded System using Assembly and C”,
Pearson 2 𝑛𝑑 Edition.
• ATMega16 Datasheet.
32
33

More Related Content

PPTX
ARM Processors
PPT
I2C Protocol
PPTX
microcontroller vs microprocessor
PPTX
I2C Protocol
PPT
PDF
DRAM Cell - Working and Read and Write Operations
PPTX
ATMEGA 328
ARM Processors
I2C Protocol
microcontroller vs microprocessor
I2C Protocol
DRAM Cell - Working and Read and Write Operations
ATMEGA 328

What's hot (20)

PPTX
I2c protocol - Inter–Integrated Circuit Communication Protocol
PPT
Serial Peripheral Interface(SPI)
PPTX
I2C introduction
PDF
Introduction to Avr Microcontrollers
PPTX
Network on Chip
PPTX
8255 PPI
PDF
Unit II Arm 7 Introduction
PPTX
QPSK(quadrature phase shift keying) Introduction
DOCX
Hardware-Software Codesign
PPTX
I2 c protocol
PPTX
Analog to Digital converter in ARM
PPTX
Heart Beat Monitoring System
PDF
DESIGN OF TWO-STAGE OP AMPS.pdf
PDF
Communication Protocols (UART, SPI,I2C)
PPTX
Modbus protocol
PPTX
Advance Microcontroller AVR
PPT
PPTX
PPTX
Cascade and cascode amplifiers
PPTX
RTC Interfacing and Programming
I2c protocol - Inter–Integrated Circuit Communication Protocol
Serial Peripheral Interface(SPI)
I2C introduction
Introduction to Avr Microcontrollers
Network on Chip
8255 PPI
Unit II Arm 7 Introduction
QPSK(quadrature phase shift keying) Introduction
Hardware-Software Codesign
I2 c protocol
Analog to Digital converter in ARM
Heart Beat Monitoring System
DESIGN OF TWO-STAGE OP AMPS.pdf
Communication Protocols (UART, SPI,I2C)
Modbus protocol
Advance Microcontroller AVR
Cascade and cascode amplifiers
RTC Interfacing and Programming
Ad

Similar to ATmega 16 (20)

PPTX
embedded system
PPTX
Overview of Microcontroller and ATMega32 microcontroller
DOCX
digital clock atmega16
PPTX
5. Features of the LPC214X Family.pptx
PDF
Architecture and Programmingpart1_Microcontroller
PPTX
Parth xyz
PDF
PIC Microcontrollers: Powering Versatile Embedded Solutions"
PDF
Interfacing using ِAtmega16/32
DOC
Industrial training report of embedded system and robotics
PPTX
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
PDF
8 bit microcontroller
PPT
Introduction2_PIC.ppt
PPT
Avr microcontroller
PDF
introduction to embedded systems part 2
PPTX
Zigbee based trolley cart access system using rfid
PDF
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
PPTX
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PDF
picuc-151108162917-lva1-app6892 (1).pdf
PPTX
PIC Microcontrollers
PPTX
Embedded system
embedded system
Overview of Microcontroller and ATMega32 microcontroller
digital clock atmega16
5. Features of the LPC214X Family.pptx
Architecture and Programmingpart1_Microcontroller
Parth xyz
PIC Microcontrollers: Powering Versatile Embedded Solutions"
Interfacing using ِAtmega16/32
Industrial training report of embedded system and robotics
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
8 bit microcontroller
Introduction2_PIC.ppt
Avr microcontroller
introduction to embedded systems part 2
Zigbee based trolley cart access system using rfid
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
picuc-151108162917-lva1-app6892 (1).pdf
PIC Microcontrollers
Embedded system
Ad

Recently uploaded (20)

PPTX
UNIT 4 Total Quality Management .pptx
PDF
PPT on Performance Review to get promotions
PPTX
Construction Project Organization Group 2.pptx
DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Welding lecture in detail for understanding
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
additive manufacturing of ss316l using mig welding
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Well-logging-methods_new................
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT 4 Total Quality Management .pptx
PPT on Performance Review to get promotions
Construction Project Organization Group 2.pptx
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Welding lecture in detail for understanding
Lecture Notes Electrical Wiring System Components
additive manufacturing of ss316l using mig welding
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
OOP with Java - Java Introduction (Basics)
Well-logging-methods_new................
Internet of Things (IOT) - A guide to understanding
CH1 Production IntroductoryConcepts.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Lesson 3_Tessellation.pptx finite Mathematics
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

ATmega 16

  • 1. 1
  • 2. Contents • Introduction • History of AVR • AVR microcontroller • Types of AVR microcontrollers • AVR architecture • GPIO Registers • Interfacing • Timers • References • Conclusion 2
  • 3. Introduction • AVR stand for ADVANCED VIRTUAL RISC. • AVR micro controllers is family of RISC microcontrollers from Atmel. • AVR was one of the first microcontroller families to use on- chip flash memory for program storage. • AVR microcontrollers are very popular, used in numerous applications, particularly in project prototyping and also in embedded devices. 3
  • 4. History of AVR • AVR is a family of microcontrollers developed by Atmel beginning in 1996. • The Atmel AVR has 8-bit RISC microcontrollers. • The AVR architecture was conceived by two students at the Norwegian Institute of Technology, Alf-Egil Bogen and Vegard Wollan. 4
  • 5. RISC microcontroller • RISC stands for Reduced Introduction Set Computer. • Till 1980 Trend was to build increasingly complex CPUs with complex set of instructions like (CISC). • Instruction execute in single cycle. • RISC architecture CPUs capable of executing only a very limited simple set of instructions. 5
  • 6. AVR microcontroller • Devices range from 1 to 256KB. • Pin count range from 8 to 100. • Full code compatibility. • Pin/feature compatible families. • One set of development tools. 6
  • 7. Types of AVR microcontrollers AVR microcontrollers are obtainable in three categories:- • Tiny AVR • Mega AVR • Xmega AVR 7
  • 8. TINY AVR This microcontroller has Less memory, small in size, only for simpler applications. • 0.5–16 KB program memory. • 6–32-pin package. • Small in size. 8
  • 9. MEGA AVR • This microcontroller is the most popular having a good amount of memory up to 256KB, higher no. of inbuilt peripherals and fit for modest to difficult applications. • 4–256 KB program memory • 28–100-pin package • Extended instruction set 9
  • 10. ATMEGA16 PIN DIAGRAM • Atmega16 have total of 40 pins in which 32 are I/O pins. • VCC (PIN10) - Digital supply voltage. • GND (PIN11) - Ground • Port A (PA7..PA0) - Port A serves as the analog inputs to the A/D Converter Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. • 10
  • 11. CONTINUE… • Port B (PB7..PB0) - Port B is an 8-bit bi-directional I/O port with internal pull-up resistors selected for each bit. • Port C (PC7..PC0) - Port C is an 8-bit bi-directional I/O port with internal pull-up resistors selected for each bit. • Port D (PD7..PD0) - Port D is an 8-bit bi-directional I/O port with internal pull-up resistors selected for each bit. • RESET - Reset Input a low level on this pin for longer than the minimum pulse length will generate a reset • AVCC - AVCC is the supply voltage pin for Port A and the A/D Converter. • AREF - AREF is the analog reference pin for the A/D Converter. • XTAL 2 - Output to Inverting Oscillator Amplifier. 11
  • 12. XMEGA AVR • This microcontroller is used commercially for compound applications, which need large program memory and also high speed. • 16–384 KB program memory • 44-100 pin • Extended performance features such as DMA, Event System. 12
  • 13. AVR ARCHITECTURE • ALU • 32 General Purpose Registers • Static RAM • EEPROM • Flash • Timer/Counter • Comparator • Watch Dog timer • Protocols: UART, SPI, I2C • I/O Ports 13
  • 14. Table 1: Basic registers of ATmega16 GPIO Registers 14
  • 15. INTERFACING OF LED • A LED is an acronym for Light Emitting Diode and is basically an electronic device which emits light when an electric current flows through it. 15
  • 16. 16
  • 17. 17
  • 18. Numeric Value Dp G F E D C B A Address 0 0 0 1 1 1 1 1 1 0x3F 1 0 0 0 0 0 1 1 0 0x06 2 0 1 0 1 1 0 1 1 0x5B 3 0 1 0 0 1 1 1 1 0x4F 4 0 1 1 0 0 1 1 0 0x66 5 0 1 1 0 1 1 0 1 0x6D 6 0 1 1 1 1 1 0 1 0x7D 7 0 0 0 0 0 1 1 1 0x07 8 0 1 1 1 1 1 1 1 0x7F 9 0 1 1 0 1 1 1 1 0x6F18 Table 2: Truth Table of a CC 7-segment display
  • 19. 7-SEGMENT DISPLAY INTERFACING 19 • The seven segment display is the most common display device used in many gadgets, and electronic appliances like digital meters, digital clocks, microwave oven and electric stove, etc. • Types of 7-Segment Displays: Common Anode Display Common Cathode Display
  • 20. 20
  • 21. 21
  • 22. INTERFACING OF SWITCH • An electrical switch is any device used to interrupt the flow of electrons in a circuit. Switches are essentially binary devices they are either completely on (“closed”) or completely off (“open”). 22
  • 23. DC MOTOR INTERFACING • An electric motor is an electrical machine that converts electrical energy into mechanical energy. 23
  • 24. 24
  • 25. 25
  • 26. LCD INTERFACING • LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. 26
  • 27. 27
  • 28. 28
  • 29. TIMERS • Timer is totally independent of the CPU. • In AVR timers are of two types: 8-bit and 16-bit timers. TIMER0 – 8-bit timer TIMER1– 16-bit timer TIMER2 – 8-bit timer 29
  • 30. INTERRUPTS • Interrupts are basically events that require immediate attention by the microcontroller. • Atmega16 in total has twenty one (21) interrupts available. • The available interrupts are categorized in two classes: External Interrupts Internal Interrupts 30
  • 31. Conclusion • AVR is RISC architecture. • AVR microcontrollers are very popular, used in numerous applications, particularly in project prototyping and also in embedded devices. • Programming is easy. • AVR is Pipe lined processors resulting in faster execution. • A watchdog to handle hanging software states is added. 31
  • 32. REFERENCES • Mazidi Ali Muhammad, Mazidi Gillispie Janice, “The 8051 Microcontroller and Embedded System using Assembly and C”, Pearson 2 𝑛𝑑 Edition. • ATMega16 Datasheet. 32
  • 33. 33