SlideShare a Scribd company logo
3.TechieNest  microcontrollers
Microcontroller
Types of microcontrollers
Based on number of bits
 They can be 4-bit, 8-bit,16-bit and 32-bit
microcontroller.
 The bit description of a microcontroller tells
us about
The size of the data bus,
The word length and
 The data bus size of the microcontroller tells
us the number of data bits that the
microcontroller can process at a time.
 The word length means the length of the
data that can be stored at a memory location
in the microcontroller’s memory.
Based on devices
 They are of two types:
Embedded microcontrollers
External microcontrollers
 Embedded microcontrollers means that the
microcontroller is buried inside the device. This is
done during the manufacturing process. They cannot
the seen from outside. They are basically one time
programmable. E.g. LCD, Fridge, Air conditioners,
Washing machines etc.
 External microcontrollers are not buried inside the
device. They can be programmed number of times.
They can be seen from outside. E.g. the
microcontroller in i3indya development board.
Complex Instruction Set Computing
Characteristics of a CISC architecture:
 Emphasis on hardware
 Includes multi-clock complex
instructions
 Small code sizes
 Complex data types in hardware;
some CISCs have byte string
instructions, or support complex
numbers
Reduce Instruction Set Computing
Characteristics of a RISC architecture:
 Emphasis on software
 Single-clock, reduced instruction only
 Uniform instruction format, using a single
word with the opcode in the same bit
positions in every instruction, demanding
less decoding
 Identical general purpose registers,
allowing any register to be used in any
context, simplifying compiler design
 Simple addressing modes. Complex
addressing performed via sequences of
arithmetic and/or load-store operations.
 Typically larger code sizes
 Few data types in hardware
Von – Neumann Architecture
 Microcontrollers based on the Von-Neumann architecture have a
single “data” bus that is used to fetch both instructions and data.
 Program instructions and data are stored in a common main memory.
 When such a controller addresses main memory, it first fetches an
instruction, and then it fetches the data to support the instruction.
Harvard Architecture
 The Harvard architecture is a computer architecture with physically
separate storage and signal pathways for instructions and data.
Different families of microcontrollers
 There are number of popular families of
microcontrollers which are used in different
applications as per their capability and
feasibility to perform the desired task.
 Most common of these are
8051 microcontroller family
AVR microcontroller family
PIC microcontrollers family
Comparison of different
Microcontroller Families
8051 PIC AVR
SPEED Slow Moderate Fast
MEMORY Small Large Large
ARCHITECTURE CISC RISC RISC
ADC Not Present Inbuilt Inbuilt
Timers Inbuilt Inbuilt Inbuilt
PWM Channels Not Present Inbuilt Inbuilt
AVR
 AVR was developed in the year 1996 by Atmel
Corporation.
 The architecture of AVR was developed by Alf-
Egil Bogen and Vegard Wollan. AVR derives its
name from its developers and stands for Alf-
Egil Bogen Vegard Wollan RISC
microcontroller.
 They are also known as Advanced Virtual
RISC.
 The AT90S8515 was the first microcontroller
which was based on AVR architecture
however the first microcontroller to hit the
commercial market was AT90S1200 in the year
1997.
AVR Family
AVR microcontrollers are available in five different
categories:
 TinyAVR – Less memory, small size, suitable only
for simpler applications.
 MegaAVR – These are the most popular ones
having good amount of memory (upto 256 KB),
higher number of inbuilt peripherals and suitable
for moderate to complex applications.
 XmegaAVR – Used commercially for complex
applications, which require large program
memory and high speed.
Continue….
 Application-specific AVR - MegaAVRs with special
features not found on the other members of the AVR
family, such as LCD controller, USB controller, advanced
PWM, CAN etc.
 FPSLIC (AVR with FPGA)
FPGA 5K to 40K gates
SRAM for the AVR program code, unlike all other AVRs
AVR core can run at up to 50 MHz
Comparison of major AVRs Series
Series Name Pins Flash Memory Special Feature
Tiny AVR 6-32 0.5-8 KB Small in size
Mega AVR 28-100 4-256KB Extended peripherals
Xmega AVR 44-100 16-384KB DMA
Microcontrollers of Mega AVR Series
Part Name ROM RAM EEPROM
I/0
Pins
Timer
Interrupt
s
Operatio
n Voltage
Operating
frequency
Packaging
ATmega8 8KB 1KB 512B 23 3 19 4.5-5.5 V 0-16 MHz 28
ATmega8L 8KB 1KB 512B 23 3 19 2.7-5.5 V 0-8 MHz 28
ATmega16 16KB 1KB 512B 32 3 21 4.5-5.5 V 0-16 MHz 40
ATmega16
L
16KB 1KB 512B 32 3 21 2.7-5.5 V 0-8 MHz 40
ATmega32 32KB 2KB 1KB 32 3 21 4.5-5.5 V 0-16 MHz 40
ATmega32
L
32KB 2KB 1KB 32 3 21 2.7-5.5 V 0-8 MHz 40
ATMEGA 16
 We will be working on Atmega16 microcontroller,
which is a 40-pin IC and belongs to the MegaAVR
category of AVR family.
 Some of the features of Atmega16 are:
 16KB of Flash memory
 1KB of SRAM
 512 Bytes of EEPROM
 Available in 40-Pin DIP
 8- Channel 10-bit ADC
 Two 8-bit Timers/Counters
 One 16-bit Timer/Counter
 4 PWM Channels
 In System Programmer (ISP)
 Serial USART
 SPI Interface
 Digital to Analog Comparator.
ATmega16 Architecture
Atmega16 Architecture Description
I/O Ports
 Atmega16 has four (PORTA, PORTB, PORTC and
PORTD) 8-bit input-output ports.
Internal Calibrated Oscillator
Atmega16 is equipped with an internal oscillator for
driving its clock.
By default Atmega16 is set to operate at internal
calibrated oscillator of 1 MHz.
The maximum frequency of internal oscillator is 8Mhz.
 Alternatively, ATmega16 can be operated using an
external crystal oscillator with a maximum frequency of
16MHz. In this case you need to modify the fuse bits.
Continue….
 ADC Interface
 Atmega16 is equipped with an 8 channel
ADC (Analog to Digital Converter) with
a resolution of 10-bits.
 ADC reads the analog input for e.g., a
sensor input and converts it into digital
information which is understandable by
the microcontroller.
 Timers/Counters
 Atmega16 consists of two 8-bit and one
16-bit timer/counter.
 Timers are useful for generating precision
actions for e.g., creating time delays
between two operations.
Continue….
 Watchdog Timer: Watchdog timer is present
with internal oscillator. Watchdog timer
continuously monitors and resets the controller
if the code gets stuck at any execution action for
more than a defined time interval.
 Interrupts: Atmega16 consists of 21 interrupt
sources out of which four are external. The
remaining are internal interrupts which support
the peripherals like USART, ADC, Timers etc.
 USART: It is available for interfacing with
external device capable of communicating
serially (data transmission bit by bit).
 General Purpose Registers: Atmega16 is
equipped with 32 general purpose registers
which are coupled directly with the Arithmetic
Logical Unit (ALU) of CPU.
Continue….
Memory: Atmega16 consist of three different memory sections:
 Flash EEPROM:
• Flash EEPROM or simple flash memory is used to store
the program dumped or burnt by the user on to the
microcontroller.
• It can be easily erased electrically as a single unit.
• Flash memory is non-volatile i.e., it retains the
program even if the power is cut-off.
• Atmega16 is available with 16KB of in system
programmable Flash EEPROM.
Continue….
 Byte Addressable EEPROM:
• This is also a nonvolatile memory used to store
data like values of certain variables.
• Atmega16 has 512 bytes of EEPROM, this memory
can be useful for storing the lock code if we are
designing an application like electronic door lock.
 SRAM:
• Static Random Access Memory, this is the volatile
memory of microcontroller i.e., data is lost as soon
as power is turned off.
• Atmega16 is equipped with 1KB of internal SRAM.
• A small portion of SRAM is set aside for general
purpose registers used by CPU and some for the
peripheral subsystems of the microcontroller.
Continue….
 ISP: AVR family of controllers have In System Programmable
Flash Memory which can be programmed without removing
the IC from the circuit, ISP allows to reprogram the
controller while it is in the application circuit.
 SPI: Serial Peripheral Interface, SPI port is used for serial
communication between two devices on a common clock
source. The data transmission rate of SPI is more than that of
USART.
Continue….
 TWI: Two Wire Interface (TWI) can be used to set
up a network of devices, many devices can be
connected over TWI interface forming a network, the
devices can simultaneously transmit and receive and
have their own unique address.
 ADC: Atmega16 is also equipped with a Analog to
Digital Converter (ADC) interface which can be
used for reverse action performed by ADC. ADC can
be used when there is a need of converting a digital
signal to analog signal.
3.TechieNest  microcontrollers

More Related Content

PPT
Avr introduction
PPTX
ATmega32-AVR microcontrollers-Part I
PPTX
ATmega 16
PPTX
Features of ATMEL microcontrollers
PPTX
Advance Microcontroller AVR
PPTX
Tutorial on avr atmega8 microcontroller, architecture and its applications
PDF
Interfacing using ِAtmega16/32
PPTX
Intro to micro controller (Atmega16)
Avr introduction
ATmega32-AVR microcontrollers-Part I
ATmega 16
Features of ATMEL microcontrollers
Advance Microcontroller AVR
Tutorial on avr atmega8 microcontroller, architecture and its applications
Interfacing using ِAtmega16/32
Intro to micro controller (Atmega16)

What's hot (20)

PPTX
Introduction of microcontroller
PPTX
Micro-controller course lec 01
PDF
AVR introduction
PPTX
Avr and arm
PDF
Introduction in microcontroller
PPTX
INTRODUCTION TO MICROCONTROLLER
PPTX
Introduction to AVR Microcontroller
PPT
microcontroller basics
PDF
AVR Microcontroller
PPTX
Microcontroller
PPTX
PDF
AVR Micro controller Interfacing
PPT
Chp4 introduction to the pic microcontroller copy
PDF
AVR_Course_Day4 introduction to microcontroller
PPTX
Microcontroller
PPTX
Microcontroller overview 1
PPTX
Microcontroller
PDF
Motorola 68hc11
PPTX
Microprocessor vs. microcontroller
PPT
Developing an avr microcontroller system
Introduction of microcontroller
Micro-controller course lec 01
AVR introduction
Avr and arm
Introduction in microcontroller
INTRODUCTION TO MICROCONTROLLER
Introduction to AVR Microcontroller
microcontroller basics
AVR Microcontroller
Microcontroller
AVR Micro controller Interfacing
Chp4 introduction to the pic microcontroller copy
AVR_Course_Day4 introduction to microcontroller
Microcontroller
Microcontroller overview 1
Microcontroller
Motorola 68hc11
Microprocessor vs. microcontroller
Developing an avr microcontroller system
Ad

Similar to 3.TechieNest microcontrollers (20)

PPTX
1. Microcontroller Basics ENTC department.pptx
PDF
introduction to embedded systems part 2
PDF
Micro controller
PDF
The document provides an overview of the Arduino platform for beginners.
PDF
Introduction to Avr Microcontrollers
PDF
Microcontroller
PDF
1.Introduction to AVR.pdf
PPTX
Overview of Microcontroller and ATMega32 microcontroller
PPTX
Msp 430 architecture module 1
PPTX
LECT 2.pptx
PPTX
Micro controller and dsp processor
DOCX
Training report on embedded sys_AVR
PPTX
Introduction to Microcontroller
PPT
Ajal mod 1
PPTX
embedded system and microcontroller
PPTX
Microcontroller1
PPTX
Features of 89c51,pic,avr & arm processors
PPTX
Unit-1.pptx
PPTX
Microcontroller presentation
1. Microcontroller Basics ENTC department.pptx
introduction to embedded systems part 2
Micro controller
The document provides an overview of the Arduino platform for beginners.
Introduction to Avr Microcontrollers
Microcontroller
1.Introduction to AVR.pdf
Overview of Microcontroller and ATMega32 microcontroller
Msp 430 architecture module 1
LECT 2.pptx
Micro controller and dsp processor
Training report on embedded sys_AVR
Introduction to Microcontroller
Ajal mod 1
embedded system and microcontroller
Microcontroller1
Features of 89c51,pic,avr & arm processors
Unit-1.pptx
Microcontroller presentation
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
master seminar digital applications in india
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Basic Mud Logging Guide for educational purpose
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Insiders guide to clinical Medicine.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Pharma ospi slides which help in ospi learning
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
master seminar digital applications in india
Final Presentation General Medicine 03-08-2024.pptx
Basic Mud Logging Guide for educational purpose
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
2.FourierTransform-ShortQuestionswithAnswers.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Renaissance Architecture: A Journey from Faith to Humanism
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial disease of the cardiovascular and lymphatic systems
Insiders guide to clinical Medicine.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Abdominal Access Techniques with Prof. Dr. R K Mishra
Anesthesia in Laparoscopic Surgery in India
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharma ospi slides which help in ospi learning

3.TechieNest microcontrollers

  • 4. Based on number of bits  They can be 4-bit, 8-bit,16-bit and 32-bit microcontroller.  The bit description of a microcontroller tells us about The size of the data bus, The word length and  The data bus size of the microcontroller tells us the number of data bits that the microcontroller can process at a time.  The word length means the length of the data that can be stored at a memory location in the microcontroller’s memory.
  • 5. Based on devices  They are of two types: Embedded microcontrollers External microcontrollers  Embedded microcontrollers means that the microcontroller is buried inside the device. This is done during the manufacturing process. They cannot the seen from outside. They are basically one time programmable. E.g. LCD, Fridge, Air conditioners, Washing machines etc.  External microcontrollers are not buried inside the device. They can be programmed number of times. They can be seen from outside. E.g. the microcontroller in i3indya development board.
  • 6. Complex Instruction Set Computing Characteristics of a CISC architecture:  Emphasis on hardware  Includes multi-clock complex instructions  Small code sizes  Complex data types in hardware; some CISCs have byte string instructions, or support complex numbers
  • 7. Reduce Instruction Set Computing Characteristics of a RISC architecture:  Emphasis on software  Single-clock, reduced instruction only  Uniform instruction format, using a single word with the opcode in the same bit positions in every instruction, demanding less decoding  Identical general purpose registers, allowing any register to be used in any context, simplifying compiler design  Simple addressing modes. Complex addressing performed via sequences of arithmetic and/or load-store operations.  Typically larger code sizes  Few data types in hardware
  • 8. Von – Neumann Architecture  Microcontrollers based on the Von-Neumann architecture have a single “data” bus that is used to fetch both instructions and data.  Program instructions and data are stored in a common main memory.  When such a controller addresses main memory, it first fetches an instruction, and then it fetches the data to support the instruction.
  • 9. Harvard Architecture  The Harvard architecture is a computer architecture with physically separate storage and signal pathways for instructions and data.
  • 10. Different families of microcontrollers  There are number of popular families of microcontrollers which are used in different applications as per their capability and feasibility to perform the desired task.  Most common of these are 8051 microcontroller family AVR microcontroller family PIC microcontrollers family
  • 11. Comparison of different Microcontroller Families 8051 PIC AVR SPEED Slow Moderate Fast MEMORY Small Large Large ARCHITECTURE CISC RISC RISC ADC Not Present Inbuilt Inbuilt Timers Inbuilt Inbuilt Inbuilt PWM Channels Not Present Inbuilt Inbuilt
  • 12. AVR  AVR was developed in the year 1996 by Atmel Corporation.  The architecture of AVR was developed by Alf- Egil Bogen and Vegard Wollan. AVR derives its name from its developers and stands for Alf- Egil Bogen Vegard Wollan RISC microcontroller.  They are also known as Advanced Virtual RISC.  The AT90S8515 was the first microcontroller which was based on AVR architecture however the first microcontroller to hit the commercial market was AT90S1200 in the year 1997.
  • 13. AVR Family AVR microcontrollers are available in five different categories:  TinyAVR – Less memory, small size, suitable only for simpler applications.  MegaAVR – These are the most popular ones having good amount of memory (upto 256 KB), higher number of inbuilt peripherals and suitable for moderate to complex applications.  XmegaAVR – Used commercially for complex applications, which require large program memory and high speed.
  • 14. Continue….  Application-specific AVR - MegaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN etc.  FPSLIC (AVR with FPGA) FPGA 5K to 40K gates SRAM for the AVR program code, unlike all other AVRs AVR core can run at up to 50 MHz
  • 15. Comparison of major AVRs Series Series Name Pins Flash Memory Special Feature Tiny AVR 6-32 0.5-8 KB Small in size Mega AVR 28-100 4-256KB Extended peripherals Xmega AVR 44-100 16-384KB DMA
  • 16. Microcontrollers of Mega AVR Series Part Name ROM RAM EEPROM I/0 Pins Timer Interrupt s Operatio n Voltage Operating frequency Packaging ATmega8 8KB 1KB 512B 23 3 19 4.5-5.5 V 0-16 MHz 28 ATmega8L 8KB 1KB 512B 23 3 19 2.7-5.5 V 0-8 MHz 28 ATmega16 16KB 1KB 512B 32 3 21 4.5-5.5 V 0-16 MHz 40 ATmega16 L 16KB 1KB 512B 32 3 21 2.7-5.5 V 0-8 MHz 40 ATmega32 32KB 2KB 1KB 32 3 21 4.5-5.5 V 0-16 MHz 40 ATmega32 L 32KB 2KB 1KB 32 3 21 2.7-5.5 V 0-8 MHz 40
  • 17. ATMEGA 16  We will be working on Atmega16 microcontroller, which is a 40-pin IC and belongs to the MegaAVR category of AVR family.  Some of the features of Atmega16 are:  16KB of Flash memory  1KB of SRAM  512 Bytes of EEPROM  Available in 40-Pin DIP  8- Channel 10-bit ADC  Two 8-bit Timers/Counters  One 16-bit Timer/Counter  4 PWM Channels  In System Programmer (ISP)  Serial USART  SPI Interface  Digital to Analog Comparator.
  • 19. Atmega16 Architecture Description I/O Ports  Atmega16 has four (PORTA, PORTB, PORTC and PORTD) 8-bit input-output ports. Internal Calibrated Oscillator Atmega16 is equipped with an internal oscillator for driving its clock. By default Atmega16 is set to operate at internal calibrated oscillator of 1 MHz. The maximum frequency of internal oscillator is 8Mhz.  Alternatively, ATmega16 can be operated using an external crystal oscillator with a maximum frequency of 16MHz. In this case you need to modify the fuse bits.
  • 20. Continue….  ADC Interface  Atmega16 is equipped with an 8 channel ADC (Analog to Digital Converter) with a resolution of 10-bits.  ADC reads the analog input for e.g., a sensor input and converts it into digital information which is understandable by the microcontroller.  Timers/Counters  Atmega16 consists of two 8-bit and one 16-bit timer/counter.  Timers are useful for generating precision actions for e.g., creating time delays between two operations.
  • 21. Continue….  Watchdog Timer: Watchdog timer is present with internal oscillator. Watchdog timer continuously monitors and resets the controller if the code gets stuck at any execution action for more than a defined time interval.  Interrupts: Atmega16 consists of 21 interrupt sources out of which four are external. The remaining are internal interrupts which support the peripherals like USART, ADC, Timers etc.  USART: It is available for interfacing with external device capable of communicating serially (data transmission bit by bit).  General Purpose Registers: Atmega16 is equipped with 32 general purpose registers which are coupled directly with the Arithmetic Logical Unit (ALU) of CPU.
  • 22. Continue…. Memory: Atmega16 consist of three different memory sections:  Flash EEPROM: • Flash EEPROM or simple flash memory is used to store the program dumped or burnt by the user on to the microcontroller. • It can be easily erased electrically as a single unit. • Flash memory is non-volatile i.e., it retains the program even if the power is cut-off. • Atmega16 is available with 16KB of in system programmable Flash EEPROM.
  • 23. Continue….  Byte Addressable EEPROM: • This is also a nonvolatile memory used to store data like values of certain variables. • Atmega16 has 512 bytes of EEPROM, this memory can be useful for storing the lock code if we are designing an application like electronic door lock.  SRAM: • Static Random Access Memory, this is the volatile memory of microcontroller i.e., data is lost as soon as power is turned off. • Atmega16 is equipped with 1KB of internal SRAM. • A small portion of SRAM is set aside for general purpose registers used by CPU and some for the peripheral subsystems of the microcontroller.
  • 24. Continue….  ISP: AVR family of controllers have In System Programmable Flash Memory which can be programmed without removing the IC from the circuit, ISP allows to reprogram the controller while it is in the application circuit.  SPI: Serial Peripheral Interface, SPI port is used for serial communication between two devices on a common clock source. The data transmission rate of SPI is more than that of USART.
  • 25. Continue….  TWI: Two Wire Interface (TWI) can be used to set up a network of devices, many devices can be connected over TWI interface forming a network, the devices can simultaneously transmit and receive and have their own unique address.  ADC: Atmega16 is also equipped with a Analog to Digital Converter (ADC) interface which can be used for reverse action performed by ADC. ADC can be used when there is a need of converting a digital signal to analog signal.