SlideShare a Scribd company logo
1 of 29
Microcontrollers
• The microcontroller may be considered as a specialized
computer-on-a-chip or a single-chip computer whereas
the microprocessor has the chips separate as shown in
figure 1.
• It is this feature of the processor and peripheral
components available on a single chip that distinguishes
it from a microprocessor-based system as shown in
figure 2.
• It is also called an embedded controller as
microcontrollers are often embedded in the device or
system that they control.
• The microcontroller contains a simplified processor,
some memory (RAM and ROM), I/O ports and
peripheral devices such as counters/timers, analogue-to-
digital converters, etc., all integrated on a single chip.
Fig. 1: Microprocessor-based system
Fig. 2: Microcontroller-based system
• microcontrollers are dedicated to one task and run
one specific program. This program is stored in
ROM and generally does not change.
APPLICATIONS
Microcontrollers are embedded inside a surprisingly
large number of product categories including
automobiles, entertainment and consumer products,
test and measurement equipment and desktop
computers, to mention a few.
• Any device or system that measures, stores,
controls, calculates or displays information is sure to
have an embedded microcontroller as a part of the
device or system.
• In automobiles, one or more microcontrollers may
be used for engine control, car cruise control,
antilock brakes and so on.
• Test and measurement equipment such as signal
generators, multimeters, frequency counters,
oscilloscopes, etc., make use of microcontrollers to
add features such as the ability to store
measurements, to display messages and waveforms
and to create and store user routines.
• Consumer and entertainment products such as TVs,
video recorders, camcorders, microwave ovens,
washing machines, telephones with caller ID
facility, cellular phones, air conditioners,
refrigerators and many more products make
extensive use of microcontrollers to add new control
and functional features.
Features
Central Processing Unit (CPU)
• The central processing unit processes the program.
It executes the instructions stored in the program
memory pointed to by the program counter in
synchronization with the clock signal.
• The processor complexity could vary from simple
eight-bit processors to sophisticated 32-bit or even
64-bit processors.
• Random Access Memory (RAM)
• RAM is used to hold intermediate results and other
temporary data during the execution of the program.
Typically, microcontrollers have a few hundreds of
bytes of RAM.
• Read Only Memory (ROM)
• ROM holds the program instructions and the
constant data. (ROM, EPROM or EEPROM)
Special-Function Registers
• Special-function registers control various functions
of a microcontroller.
• There are two categories of these registers.
(i) The first type includes those registers that are
wired into the CPU and do not necessarily form part
of addressable memory.
– These registers are used to control program flow and
arithmetic functions.
• Examples include status register, program counter, stack
pointer, etc.
• These registers are, however, taken care of by compilers
(ii) The other category of registers is the one that is
required by peripheral components.
− The contents of these registers could, for instance, set a
timer or enable serial communication
− include a program counter, stack pointer, RAM address
register, program address register and PC incrementer.
Peripheral Components
• Peripheral components such as analogue-to-digital
converters, I/O ports, timers and counters
• In addition to these, microcontrollers intended for
some specific or relatively more complex functions
come with many more on-chip peripherals.
• Some of the common ones include the pulse width
modulator, serial communication interface (SCI),
serial peripheral interface (SPI), integrated circuit
(I2
C) two-wire communication interface, RS 232
(UART) port, infrared port (IrDA), USB port,
controller area network (CAN) and local
interconnect network (LIN).
(a) Counters/Timers
– Counters/timers usually perform the following three
functions.
– They are used to keep time and/or measure the time
interval between events,
– Count the number of events and,
– Generate baud rates for the serial ports.
The clock signal controls all timing activities of the
microcontroller. The counter is used both to capture external
timing events (accomplished by the timer input block) and to
generate timing events for external devices (accomplished by
the timer output block).
Fig. 3: Timing system
Input / Output Timer Operations
• counter captures the input time event in the form of
its contents at the time of occurrence of the event.
• In fact, the counter captures the relative time of the
event as the counter is free running
• A microcontroller with a 10 MHz clock and a 16-bit
counter/timer subsystem. This counter will take
6.5536 ms to count from 0000 to FFFF (hex ).
• To find the frequency of a periodic signal whose
successive rising or falling edges are observed to
occur at 0010 and 0150. Time interval between two
successive edges equals 320×0.1=32 µs.
Fig. 4 : Input timer subsystem
• the microcontroller needs to set up some special
registers.
INPUT
– registers are required to program the event
– configure the physical I/O pin as an input pin
– Configure parameters for the related interrupt
– Another register is used to capture the counter value at
the time of occurrence of the event.
OUTPUT
– physical I/O pin is to be configured
– event is to be programmed and the timing value is to be
set in the special register to tell when the programmed
event should appear on the output pin.
– The output timer system also has an associated interrupt
that can be utilized if needed.
(b) Serial communication
• There are two types of communication namely
asynchronous and synchronous interface (serial
peripheral interface (SPI)
(c) Inter - integrated Circuit (I2
C) Bus
• The inter - integrated circuit (I2
C) bus is a two-wire,
low- to-medium-speed serial communication
interface developed for chip-to-chip
communications.
• The two wires in the I2
C bus are called clock (SCL)
and data (SDA). The SDA wire carries data, while
the SCL wire synchronizes the transmitter and
receiver during data transfer.
• It is a proven industry-standard communication
protocol used in a variety of electronic products,
which is particularly facilitated by its low cost and
powerful features.
• I2
C devices are briefly described below. I2
C devices
offer master–slave hierarchy. These are classified as
either master (the device that initiates the message)
or slave (the device that responds to the message).
• One possible master–slave configuration is the one
where one master (e.g. a microcontroller) is
connected to many chips configured as slaves as
shown in figure 5.
• Each of the I2
C slave devices is identifiable by a
unique address. When the master device sends a
message, it includes the address of the intended
slave device at the beginning of the message.
• Each of the I2
C slave devices is identifiable by a
unique address.
• When the master device sends a message, it
includes the address of the intended slave device at
the beginning of the message.
• The I2
C interface also supports multiple master
devices at the same time as illustrated in figure 6.
• The bus has a special feature that allows it to
resolve signal conflicts should two or more master
devices try to talk on the bus at the same time.
Fig. 5: I2
C Master-Slave configuration
• A master I2
C device that detects the conflict, called
arbitration loss, terminates its use of the bus, thus
allowing the message sent by another master to
cross the bus unharmed.
Fig. 6: I2
C Multiple master support configuration
• Controller Area Network (CAN) Bus
• The controller area network (CAN) bus is a rugged
serial communication interface used in a broad
range of embedded as well as automation control
applications. It was introduced by Bosch
• The protocol provides two communication services,
namely data frame transmission (sending of a
message) and remote transmission request
(requesting of a message).
• All other services such as error signaling, automatic
retransmission of erroneous frames, etc., are
performed by CAN chips.
• It provides a multi - master hierarchy: This allows
the user to build intelligent and redundant systems.
• It uses the broadcast communication method.
• The sender of a message transmits to all devices
connected to the bus. All devices read the message
and decode it if it is intended for them.
• Data integrity is also ensured by error detection
mechanisms and automatic retransmission of faulty
messages.
(e)Local Interconnect Network (LIN) Bus
• The local interconnect network (LIN) bus is a
broadcast serial network that is used as a low-cost sub
network of a CAN bus to integrate intelligent sensors
or actuators in modern automobiles.
• It comprises one master (moderately powerful
microcontroller) and up to 16 slaves (less powerful,
cheaper microcontrollers or ASICs).
• It does not offer a collision detection feature and
therefore all messages are initiated by the master
with at the most one slave replying to a given
message identifier. Multiple LIN networks may all be
linked to a CAN upper layer network through their
respective masters.
Fig.7:Architectureofthe80C51
microcontroller
Fig. 8: Atmega32 microcontroller

More Related Content

What's hot

Control Unit Design
Control Unit DesignControl Unit Design
Control Unit DesignVinit Raut
 
Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuitRajan Shah
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unitMazin Alwaaly
 
Computer architecture
Computer architectureComputer architecture
Computer architectureneclinux
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control UnitKamal Acharya
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unitAnuj Modi
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COAJay Patel
 
MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .Muhammad Umar
 
Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing newMahesh Kumar Attri
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed controlRai University
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecturemeashi
 

What's hot (20)

Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuit
 
Computer architecture control unit
Computer architecture control unitComputer architecture control unit
Computer architecture control unit
 
Hardwired control
Hardwired controlHardwired control
Hardwired control
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
2.computer org.
2.computer org.2.computer org.
2.computer org.
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unit
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA
 
MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .
 
Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing new
 
micro controller
micro controllermicro controller
micro controller
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
Control Memory
Control MemoryControl Memory
Control Memory
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
 
CO By Rakesh Roshan
CO By Rakesh RoshanCO By Rakesh Roshan
CO By Rakesh Roshan
 
Mod3
Mod3Mod3
Mod3
 
Ch7 official
Ch7 officialCh7 official
Ch7 official
 
Control unit
Control unitControl unit
Control unit
 

Similar to Introduction to microcontrollers

micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.pptsiminkhan
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxDrVaibhavMeshram
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontrollersnehapvs
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded Systemrmkceteee
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 finalKhalid Elmeadawy
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
Introduction_to_Mechatronics_Chapter67.pdf
Introduction_to_Mechatronics_Chapter67.pdfIntroduction_to_Mechatronics_Chapter67.pdf
Introduction_to_Mechatronics_Chapter67.pdfBereket Walle
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1AJAL A J
 
Microcontroller based speedo meter cum odometer
Microcontroller based speedo meter cum odometerMicrocontroller based speedo meter cum odometer
Microcontroller based speedo meter cum odometerNexus
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptHAriesOa1
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Micro controller
Micro controllerMicro controller
Micro controllerDevi Prasad
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptxPratik Gohel
 
Unit 1. introduction
Unit 1. introductionUnit 1. introduction
Unit 1. introductionKiran Bagale
 

Similar to Introduction to microcontrollers (20)

Micro controller
Micro controllerMicro controller
Micro controller
 
micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.ppt
 
Module -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptxModule -4_microprocessor (1).pptx
Module -4_microprocessor (1).pptx
 
8051 microcontroller
8051 microcontroller8051 microcontroller
8051 microcontroller
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
EE6602 Embedded System
EE6602 Embedded SystemEE6602 Embedded System
EE6602 Embedded System
 
Embedded systems 101 final
Embedded systems 101 finalEmbedded systems 101 final
Embedded systems 101 final
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Introduction_to_Mechatronics_Chapter67.pdf
Introduction_to_Mechatronics_Chapter67.pdfIntroduction_to_Mechatronics_Chapter67.pdf
Introduction_to_Mechatronics_Chapter67.pdf
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
 
Cao u1
Cao u1Cao u1
Cao u1
 
Microcontroller based speedo meter cum odometer
Microcontroller based speedo meter cum odometerMicrocontroller based speedo meter cum odometer
Microcontroller based speedo meter cum odometer
 
I. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.pptI. Introduction to Microprocessor System.ppt
I. Introduction to Microprocessor System.ppt
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Arjit intro
Arjit introArjit intro
Arjit intro
 
Micro controller
Micro controllerMicro controller
Micro controller
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
ESD unit 1.pptx
ESD unit 1.pptxESD unit 1.pptx
ESD unit 1.pptx
 
Unit 1. introduction
Unit 1. introductionUnit 1. introduction
Unit 1. introduction
 

Recently uploaded

Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsappssapnasaifi408
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝soniya singh
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一zul5vf0pq
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknowmakika9823
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...srsj9000
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Pooja Nehwal
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 

Recently uploaded (20)

Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
Call Girls in Dwarka Sub City 💯Call Us 🔝8264348440🔝
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service LucknowAlambagh Call Girl 9548273370 , Call Girls Service Lucknow
Alambagh Call Girl 9548273370 , Call Girls Service Lucknow
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
 
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
Kalyan callg Girls, { 07738631006 } || Call Girl In Kalyan Women Seeking Men ...
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 

Introduction to microcontrollers

  • 2. • The microcontroller may be considered as a specialized computer-on-a-chip or a single-chip computer whereas the microprocessor has the chips separate as shown in figure 1. • It is this feature of the processor and peripheral components available on a single chip that distinguishes it from a microprocessor-based system as shown in figure 2. • It is also called an embedded controller as microcontrollers are often embedded in the device or system that they control. • The microcontroller contains a simplified processor, some memory (RAM and ROM), I/O ports and peripheral devices such as counters/timers, analogue-to- digital converters, etc., all integrated on a single chip.
  • 5. • microcontrollers are dedicated to one task and run one specific program. This program is stored in ROM and generally does not change. APPLICATIONS Microcontrollers are embedded inside a surprisingly large number of product categories including automobiles, entertainment and consumer products, test and measurement equipment and desktop computers, to mention a few.
  • 6. • Any device or system that measures, stores, controls, calculates or displays information is sure to have an embedded microcontroller as a part of the device or system. • In automobiles, one or more microcontrollers may be used for engine control, car cruise control, antilock brakes and so on.
  • 7. • Test and measurement equipment such as signal generators, multimeters, frequency counters, oscilloscopes, etc., make use of microcontrollers to add features such as the ability to store measurements, to display messages and waveforms and to create and store user routines. • Consumer and entertainment products such as TVs, video recorders, camcorders, microwave ovens, washing machines, telephones with caller ID facility, cellular phones, air conditioners, refrigerators and many more products make extensive use of microcontrollers to add new control and functional features.
  • 8. Features Central Processing Unit (CPU) • The central processing unit processes the program. It executes the instructions stored in the program memory pointed to by the program counter in synchronization with the clock signal. • The processor complexity could vary from simple eight-bit processors to sophisticated 32-bit or even 64-bit processors.
  • 9. • Random Access Memory (RAM) • RAM is used to hold intermediate results and other temporary data during the execution of the program. Typically, microcontrollers have a few hundreds of bytes of RAM. • Read Only Memory (ROM) • ROM holds the program instructions and the constant data. (ROM, EPROM or EEPROM)
  • 10. Special-Function Registers • Special-function registers control various functions of a microcontroller. • There are two categories of these registers. (i) The first type includes those registers that are wired into the CPU and do not necessarily form part of addressable memory. – These registers are used to control program flow and arithmetic functions. • Examples include status register, program counter, stack pointer, etc. • These registers are, however, taken care of by compilers
  • 11. (ii) The other category of registers is the one that is required by peripheral components. − The contents of these registers could, for instance, set a timer or enable serial communication − include a program counter, stack pointer, RAM address register, program address register and PC incrementer.
  • 12. Peripheral Components • Peripheral components such as analogue-to-digital converters, I/O ports, timers and counters • In addition to these, microcontrollers intended for some specific or relatively more complex functions come with many more on-chip peripherals. • Some of the common ones include the pulse width modulator, serial communication interface (SCI), serial peripheral interface (SPI), integrated circuit (I2 C) two-wire communication interface, RS 232 (UART) port, infrared port (IrDA), USB port, controller area network (CAN) and local interconnect network (LIN).
  • 13. (a) Counters/Timers – Counters/timers usually perform the following three functions. – They are used to keep time and/or measure the time interval between events, – Count the number of events and, – Generate baud rates for the serial ports.
  • 14. The clock signal controls all timing activities of the microcontroller. The counter is used both to capture external timing events (accomplished by the timer input block) and to generate timing events for external devices (accomplished by the timer output block). Fig. 3: Timing system
  • 15. Input / Output Timer Operations • counter captures the input time event in the form of its contents at the time of occurrence of the event. • In fact, the counter captures the relative time of the event as the counter is free running • A microcontroller with a 10 MHz clock and a 16-bit counter/timer subsystem. This counter will take 6.5536 ms to count from 0000 to FFFF (hex ). • To find the frequency of a periodic signal whose successive rising or falling edges are observed to occur at 0010 and 0150. Time interval between two successive edges equals 320×0.1=32 µs.
  • 16. Fig. 4 : Input timer subsystem
  • 17. • the microcontroller needs to set up some special registers. INPUT – registers are required to program the event – configure the physical I/O pin as an input pin – Configure parameters for the related interrupt – Another register is used to capture the counter value at the time of occurrence of the event.
  • 18. OUTPUT – physical I/O pin is to be configured – event is to be programmed and the timing value is to be set in the special register to tell when the programmed event should appear on the output pin. – The output timer system also has an associated interrupt that can be utilized if needed. (b) Serial communication • There are two types of communication namely asynchronous and synchronous interface (serial peripheral interface (SPI)
  • 19. (c) Inter - integrated Circuit (I2 C) Bus • The inter - integrated circuit (I2 C) bus is a two-wire, low- to-medium-speed serial communication interface developed for chip-to-chip communications. • The two wires in the I2 C bus are called clock (SCL) and data (SDA). The SDA wire carries data, while the SCL wire synchronizes the transmitter and receiver during data transfer. • It is a proven industry-standard communication protocol used in a variety of electronic products, which is particularly facilitated by its low cost and powerful features.
  • 20. • I2 C devices are briefly described below. I2 C devices offer master–slave hierarchy. These are classified as either master (the device that initiates the message) or slave (the device that responds to the message). • One possible master–slave configuration is the one where one master (e.g. a microcontroller) is connected to many chips configured as slaves as shown in figure 5. • Each of the I2 C slave devices is identifiable by a unique address. When the master device sends a message, it includes the address of the intended slave device at the beginning of the message.
  • 21. • Each of the I2 C slave devices is identifiable by a unique address. • When the master device sends a message, it includes the address of the intended slave device at the beginning of the message. • The I2 C interface also supports multiple master devices at the same time as illustrated in figure 6. • The bus has a special feature that allows it to resolve signal conflicts should two or more master devices try to talk on the bus at the same time.
  • 22. Fig. 5: I2 C Master-Slave configuration
  • 23. • A master I2 C device that detects the conflict, called arbitration loss, terminates its use of the bus, thus allowing the message sent by another master to cross the bus unharmed.
  • 24. Fig. 6: I2 C Multiple master support configuration
  • 25. • Controller Area Network (CAN) Bus • The controller area network (CAN) bus is a rugged serial communication interface used in a broad range of embedded as well as automation control applications. It was introduced by Bosch • The protocol provides two communication services, namely data frame transmission (sending of a message) and remote transmission request (requesting of a message). • All other services such as error signaling, automatic retransmission of erroneous frames, etc., are performed by CAN chips.
  • 26. • It provides a multi - master hierarchy: This allows the user to build intelligent and redundant systems. • It uses the broadcast communication method. • The sender of a message transmits to all devices connected to the bus. All devices read the message and decode it if it is intended for them. • Data integrity is also ensured by error detection mechanisms and automatic retransmission of faulty messages.
  • 27. (e)Local Interconnect Network (LIN) Bus • The local interconnect network (LIN) bus is a broadcast serial network that is used as a low-cost sub network of a CAN bus to integrate intelligent sensors or actuators in modern automobiles. • It comprises one master (moderately powerful microcontroller) and up to 16 slaves (less powerful, cheaper microcontrollers or ASICs). • It does not offer a collision detection feature and therefore all messages are initiated by the master with at the most one slave replying to a given message identifier. Multiple LIN networks may all be linked to a CAN upper layer network through their respective masters.
  • 29. Fig. 8: Atmega32 microcontroller