SlideShare a Scribd company logo
1 of 28
The 8051 Microcontroller
7F H =127
FF=255
32 Bytes
16 Bytes
2f=4720 H=32
• The PCON or Power Control register, as the name suggests is used to
control the 8051 Microcontroller’s Power Modes and is located at
87H of the SFR .
• The addresses of the Port Registers are as follows: P0 – 80H, P1 –
90H, P2 – A0H and P2 – B0H.
• The Serial Control or SCON SFR is used to control the 8051
Microcontroller’s Serial Port.
• Timer Control or TCON Register is used to start or stop the Timers of
8051 n address of 98H.
8051 Timers
• Timer is a clock that controls the sequence of an event while counting
in fixed intervals of time.
• A Timer is used for producing precise time delay.
• Secondly, it can be used to repeat or initiate an action after/at a
known period of time.
• This feature is very commonly used in several applications. An
example could be setting up an alarm which triggers at a point of time
or after a period of time.
8051 Timers
• 8051 has two Timers designated as Timer0 and Timer1.
• Each of these timers is assigned a 16-bit register.
• The value of a Timer register increases by one every time a timer
counts.
• Timer takes a time period of one machine cycle to count one.
• Since 8051 is an 8 bit controller, the registers of 8051 Timers are
accessed as two different registers; one for lower byte and other for
higher byte. For example, register of Timer0 is accessed as TL0 for
lower byte and TH0 for higher byte. Similarly TL1 and TH1 are
registers assigned to Timer 1.
8051 Timers
• The registers of Timers are loaded with some initial value. The value
of a Timer register increases by one after every machine cycle.
• One machine cycle duration is the 1/12th of the frequency of the
crystal attached to the controller.
• If the frequency of the crystal is 12 MHz, then the frequency for Timer
will be 1MHz (1/12 of crystal frequency) and hence the time (T = 1/f)
taken by the Timer to count by one is 1Âľs (1/1MHz).
• If no value is loaded into the Timer, it starts counting from 0000H.
8051 Timers
• When the Timer reaches FFFFH, it reloads to 0000H.
• This roll over is communicated to the controller by raising a
flag corresponding to that Timer, i.e., a flag bit is raised (set high)
when the timer starts counting from 0000H again.
Program Status Word (PSW)
Flag 0 is a general-purpose flag available to the programmer.
P Even parity with the accumulator.
O V This flag is set after an addition or subtraction operation if the result in the accumulator is outside the signed 8-bit range
B register
• The B register is used together with the accumulator for multiply and
divide operations.
• The "B" register is only used by two 8051 instructions.
• The MUL AB instruction multiplies the values in A and B and stores
the low-byte of the result in A and the high-byte in B.
• The DIV AB instruction divides A by B leaving the integer result in A
and the remainder by B.
Stack Pointer
• The stack pointer (SP) is an 8-bit register at location 81H.
• The stack pointer contains the address of the item currently on top of
the stack.
• On power-up or reset the SP is set to 07H.

More Related Content

What's hot

Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - CountersJayakrishnanJ11
 
Chapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicChapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicISMT College
 
Timers
TimersTimers
TimersVima Mali
 
Register counters.readonly
Register counters.readonlyRegister counters.readonly
Register counters.readonlyVARSHAKUMARI49
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersRai University
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counterscjbas
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterKanchanPatil34
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters Deepak John
 
PIC timer programming
PIC timer programmingPIC timer programming
PIC timer programmingAkash Puri
 
Synchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic DeviceSynchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic DeviceSonya Akter Rupa
 
CSL 202, Counters using Flipflops
CSL 202, Counters using FlipflopsCSL 202, Counters using Flipflops
CSL 202, Counters using FlipflopsCKSunith1
 
Overview of Shift register and applications
Overview of Shift register and applicationsOverview of Shift register and applications
Overview of Shift register and applicationsKarthik Kumar
 

What's hot (20)

8253
82538253
8253
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - Counters
 
Chapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital LogicChapter 1 Introduction to Digital Logic
Chapter 1 Introduction to Digital Logic
 
Timers
TimersTimers
Timers
 
Ring counter
Ring counterRing counter
Ring counter
 
Register counters.readonly
Register counters.readonlyRegister counters.readonly
Register counters.readonly
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registers
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
Group 11 introduction to registers and counters
Group 11 introduction to registers and countersGroup 11 introduction to registers and counters
Group 11 introduction to registers and counters
 
Counters
CountersCounters
Counters
 
Module 4 registers and counters
Module 4 registers and counters Module 4 registers and counters
Module 4 registers and counters
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 
PIC timer programming
PIC timer programmingPIC timer programming
PIC timer programming
 
Digital Registers & Counters
Digital Registers & CountersDigital Registers & Counters
Digital Registers & Counters
 
Ch2
Ch2Ch2
Ch2
 
Timers of 8051
Timers of 8051Timers of 8051
Timers of 8051
 
Synchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic DeviceSynchronous Counter in Digital Logic Device
Synchronous Counter in Digital Logic Device
 
CSL 202, Counters using Flipflops
CSL 202, Counters using FlipflopsCSL 202, Counters using Flipflops
CSL 202, Counters using Flipflops
 
Overview of Shift register and applications
Overview of Shift register and applicationsOverview of Shift register and applications
Overview of Shift register and applications
 

Similar to Microcontroller 8051 introduction

timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptxSujalKumar73
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptxPratik Gohel
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxGowrishankar C
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptxBASKARS53
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptHebaEng
 
MICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptMICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptreemasajin1
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counterankit3991
 
module-2.pptx
module-2.pptxmodule-2.pptx
module-2.pptxAmbika Naik
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontrollerAnkit Bhatnagar
 
8051 ch9
8051 ch98051 ch9
8051 ch9860540760
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxShanDimantha1
 
TIMERS.pptx
TIMERS.pptxTIMERS.pptx
TIMERS.pptxmaheswariM7
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptxMemonaMemon1
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming vijaydeepakg
 
Microcontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxMicrocontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxAmoghR3
 

Similar to Microcontroller 8051 introduction (20)

timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
8051 timers--2
   8051 timers--2   8051 timers--2
8051 timers--2
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
UNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptxUNIT 5 Interfacing and Mixed Signal Controller.pptx
UNIT 5 Interfacing and Mixed Signal Controller.pptx
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.ppt
 
MICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.pptMICROCONTROLLER TIMERS.ppt
MICROCONTROLLER TIMERS.ppt
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
module-2.pptx
module-2.pptxmodule-2.pptx
module-2.pptx
 
Interrupt programming with 8051 microcontroller
Interrupt programming with 8051  microcontrollerInterrupt programming with 8051  microcontroller
Interrupt programming with 8051 microcontroller
 
8051 ch9
8051 ch98051 ch9
8051 ch9
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
TIMERS.pptx
TIMERS.pptxTIMERS.pptx
TIMERS.pptx
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
9 timer programming
9 timer programming9 timer programming
9 timer programming
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
Interrupt programming
Interrupt programming Interrupt programming
Interrupt programming
 
Microcontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxMicrocontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptx
 

More from Engr umar

RES Lecture 18 Hydro.pptx
RES Lecture 18 Hydro.pptxRES Lecture 18 Hydro.pptx
RES Lecture 18 Hydro.pptxEngr umar
 
renewable-energy-resources-by-john-twidell-tony-weir.pdf
renewable-energy-resources-by-john-twidell-tony-weir.pdfrenewable-energy-resources-by-john-twidell-tony-weir.pdf
renewable-energy-resources-by-john-twidell-tony-weir.pdfEngr umar
 
Chapter 06_Pdu.pptx
Chapter 06_Pdu.pptxChapter 06_Pdu.pptx
Chapter 06_Pdu.pptxEngr umar
 
Electric Welding 7.ppt
Electric Welding  7.pptElectric Welding  7.ppt
Electric Welding 7.pptEngr umar
 
Ps all examples
Ps all examplesPs all examples
Ps all examplesEngr umar
 
Probability chap 1 note.
Probability chap 1 note.Probability chap 1 note.
Probability chap 1 note.Engr umar
 
Linear algebra (summer) lec 12 (1)
Linear algebra (summer) lec 12 (1)Linear algebra (summer) lec 12 (1)
Linear algebra (summer) lec 12 (1)Engr umar
 
Linear algebra (summer) lec 11
Linear algebra (summer) lec 11Linear algebra (summer) lec 11
Linear algebra (summer) lec 11Engr umar
 
Linear algebra (summer) lec 9
Linear algebra (summer) lec 9Linear algebra (summer) lec 9
Linear algebra (summer) lec 9Engr umar
 
Linear algebra (summer) lec 7
Linear algebra (summer) lec 7Linear algebra (summer) lec 7
Linear algebra (summer) lec 7Engr umar
 
Linear algebra (summer) lec 6
Linear algebra (summer) lec 6Linear algebra (summer) lec 6
Linear algebra (summer) lec 6Engr umar
 
Linear algebra (summer) lec 5
Linear algebra (summer) lec 5Linear algebra (summer) lec 5
Linear algebra (summer) lec 5Engr umar
 
Linear algebra (summer) lec 4
Linear algebra (summer) lec 4Linear algebra (summer) lec 4
Linear algebra (summer) lec 4Engr umar
 
Linear algebra (summer) lec 3
Linear algebra (summer) lec 3Linear algebra (summer) lec 3
Linear algebra (summer) lec 3Engr umar
 
Linear algebra (summer) lec 1
Linear algebra (summer) lec 1Linear algebra (summer) lec 1
Linear algebra (summer) lec 1Engr umar
 
Signals and systems3 ppt
Signals and systems3 pptSignals and systems3 ppt
Signals and systems3 pptEngr umar
 
Ems project
Ems project Ems project
Ems project Engr umar
 
Cs project ppt
Cs project pptCs project ppt
Cs project pptEngr umar
 
Project presentation of engineering subject
Project presentation   of engineering  subjectProject presentation   of engineering  subject
Project presentation of engineering subjectEngr umar
 
Amperes law and_it_application
Amperes law and_it_applicationAmperes law and_it_application
Amperes law and_it_applicationEngr umar
 

More from Engr umar (20)

RES Lecture 18 Hydro.pptx
RES Lecture 18 Hydro.pptxRES Lecture 18 Hydro.pptx
RES Lecture 18 Hydro.pptx
 
renewable-energy-resources-by-john-twidell-tony-weir.pdf
renewable-energy-resources-by-john-twidell-tony-weir.pdfrenewable-energy-resources-by-john-twidell-tony-weir.pdf
renewable-energy-resources-by-john-twidell-tony-weir.pdf
 
Chapter 06_Pdu.pptx
Chapter 06_Pdu.pptxChapter 06_Pdu.pptx
Chapter 06_Pdu.pptx
 
Electric Welding 7.ppt
Electric Welding  7.pptElectric Welding  7.ppt
Electric Welding 7.ppt
 
Ps all examples
Ps all examplesPs all examples
Ps all examples
 
Probability chap 1 note.
Probability chap 1 note.Probability chap 1 note.
Probability chap 1 note.
 
Linear algebra (summer) lec 12 (1)
Linear algebra (summer) lec 12 (1)Linear algebra (summer) lec 12 (1)
Linear algebra (summer) lec 12 (1)
 
Linear algebra (summer) lec 11
Linear algebra (summer) lec 11Linear algebra (summer) lec 11
Linear algebra (summer) lec 11
 
Linear algebra (summer) lec 9
Linear algebra (summer) lec 9Linear algebra (summer) lec 9
Linear algebra (summer) lec 9
 
Linear algebra (summer) lec 7
Linear algebra (summer) lec 7Linear algebra (summer) lec 7
Linear algebra (summer) lec 7
 
Linear algebra (summer) lec 6
Linear algebra (summer) lec 6Linear algebra (summer) lec 6
Linear algebra (summer) lec 6
 
Linear algebra (summer) lec 5
Linear algebra (summer) lec 5Linear algebra (summer) lec 5
Linear algebra (summer) lec 5
 
Linear algebra (summer) lec 4
Linear algebra (summer) lec 4Linear algebra (summer) lec 4
Linear algebra (summer) lec 4
 
Linear algebra (summer) lec 3
Linear algebra (summer) lec 3Linear algebra (summer) lec 3
Linear algebra (summer) lec 3
 
Linear algebra (summer) lec 1
Linear algebra (summer) lec 1Linear algebra (summer) lec 1
Linear algebra (summer) lec 1
 
Signals and systems3 ppt
Signals and systems3 pptSignals and systems3 ppt
Signals and systems3 ppt
 
Ems project
Ems project Ems project
Ems project
 
Cs project ppt
Cs project pptCs project ppt
Cs project ppt
 
Project presentation of engineering subject
Project presentation   of engineering  subjectProject presentation   of engineering  subject
Project presentation of engineering subject
 
Amperes law and_it_application
Amperes law and_it_applicationAmperes law and_it_application
Amperes law and_it_application
 

Recently uploaded

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube ExchangerAnamika Sarkar
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĂŁo Esperancinha
 

Recently uploaded (20)

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ďťżTube Exchanger
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

Microcontroller 8051 introduction

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 18.
  • 19.
  • 20.
  • 21. • The PCON or Power Control register, as the name suggests is used to control the 8051 Microcontroller’s Power Modes and is located at 87H of the SFR . • The addresses of the Port Registers are as follows: P0 – 80H, P1 – 90H, P2 – A0H and P2 – B0H. • The Serial Control or SCON SFR is used to control the 8051 Microcontroller’s Serial Port. • Timer Control or TCON Register is used to start or stop the Timers of 8051 n address of 98H.
  • 22. 8051 Timers • Timer is a clock that controls the sequence of an event while counting in fixed intervals of time. • A Timer is used for producing precise time delay. • Secondly, it can be used to repeat or initiate an action after/at a known period of time. • This feature is very commonly used in several applications. An example could be setting up an alarm which triggers at a point of time or after a period of time.
  • 23. 8051 Timers • 8051 has two Timers designated as Timer0 and Timer1. • Each of these timers is assigned a 16-bit register. • The value of a Timer register increases by one every time a timer counts. • Timer takes a time period of one machine cycle to count one. • Since 8051 is an 8 bit controller, the registers of 8051 Timers are accessed as two different registers; one for lower byte and other for higher byte. For example, register of Timer0 is accessed as TL0 for lower byte and TH0 for higher byte. Similarly TL1 and TH1 are registers assigned to Timer 1.
  • 24. 8051 Timers • The registers of Timers are loaded with some initial value. The value of a Timer register increases by one after every machine cycle. • One machine cycle duration is the 1/12th of the frequency of the crystal attached to the controller. • If the frequency of the crystal is 12 MHz, then the frequency for Timer will be 1MHz (1/12 of crystal frequency) and hence the time (T = 1/f) taken by the Timer to count by one is 1Âľs (1/1MHz). • If no value is loaded into the Timer, it starts counting from 0000H.
  • 25. 8051 Timers • When the Timer reaches FFFFH, it reloads to 0000H. • This roll over is communicated to the controller by raising a flag corresponding to that Timer, i.e., a flag bit is raised (set high) when the timer starts counting from 0000H again.
  • 26. Program Status Word (PSW) Flag 0 is a general-purpose flag available to the programmer. P Even parity with the accumulator. O V This flag is set after an addition or subtraction operation if the result in the accumulator is outside the signed 8-bit range
  • 27. B register • The B register is used together with the accumulator for multiply and divide operations. • The "B" register is only used by two 8051 instructions. • The MUL AB instruction multiplies the values in A and B and stores the low-byte of the result in A and the high-byte in B. • The DIV AB instruction divides A by B leaving the integer result in A and the remainder by B.
  • 28. Stack Pointer • The stack pointer (SP) is an 8-bit register at location 81H. • The stack pointer contains the address of the item currently on top of the stack. • On power-up or reset the SP is set to 07H.