SlideShare a Scribd company logo
1 of 10
MICROCONTROLLER BASED SYSTEM DESIGN
“TIMER 0 CONCEPT”
V.KALAIRAJAN M.E;
ASSISTANT PROFESSOR,
ELECTRICALAND ELECTRONICS ENGINEERING
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY,TRICHY
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT 1
“TIMER 0 CONCEPT”
VIEWS:
 TIMER.
 TYPES OF TIMER.
 TIMER0 MODULE.
 PRESCALER - FREQUENCY DIVIDER.
 THE STRUCTURE OF THE OPTION_REG REGISTER.
 BLOCK DIAGRAM OF THE TIMER0 MODULE.
 PIC TIMER0 FORMULA FOR INTERNAL CLOCK.
 PIC TIMER0 FORMULA FOR EXTERNAL CLOCK.
 PROGRAM FOR DELAY OF 1 SEC USING TIMER0.
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT 2
“TIMER 0 CONCEPT”
TIMER:
 Now a days, we plan and build systems that perform various
processes that depend on time.
 Simple example of this process is the digital wristwatch. The role
of this electronic system is to display time in a very precise
manner and change the display every second (for seconds), every
minute (for minutes) and so on.
 To perform the steps we've listed, the system must use a timer,
which needs to be very accurate in order to take necessary actions.
The clock is actually a core of any electronic system.
 Each module can generate an interrupt to indicate that an event has
occurred (i.e. timer overflow). The timer modules are:
 Timer0 Module
 Timer1 Module
 Timer2 Module
3KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
TIMER0 MODULE:
 The Timer0 module timer/counter has the following features:
 8-bit timer/counter
 Readable and writable
 8-bit software programmable prescaler
 Internal or external clock select
 Interrupt on overflow from FFh to 00h
 Edge select for external clock
PRESCALER - FREQUENCY DIVIDER:
 We can use Prescaler for further division of the system clock. The
options are:
1:2, 4, 8, 16, 32, 64, 128, 256
4KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
THE STRUCTURE OF THE OPTION_REG REGISTER:
 We perform all the necessary settings with OPTION_REG Register. The
size of the register is 8 bits.
INITIALIZING THE OPTION_REG REGISTER:
The following is an example how we can initialize the OPTION_REG:
PSA=0; // Prescaler is assigned to the Timer0 module
PS0=1; // Prescaler rate bits
PS1=1; // are set to “111”
PS2=1; // which means divide by 256
TOSE=0; // rising edge
TOCS=0; // Internal instruction cycle clock
5KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
PIC16CXX PIPELINING
BLOCK DIAGRAM OF THE TIMER0 MODULE.
6KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
 Timer mode is selected by clearing bit T0CS (OPTION<5>).
In timer mode, the Timer0 module will increment every
instruction cycle (without prescaler).
 If the TMR0 register is written, the increment is inhibited for
the following two instruction cycles.
 The user can work around this by writing an adjusted value
to the TMR0 register. Counter mode is selected by setting bit
T0CS (OPTION<5>).
 In counter mode, Timer0 will increment either on every
rising or falling edge of pin RA4/T0CKI.
 The incrementing edge is determined by the Timer0 Source
Edge Select bit T0SE (OPTION<4>). Clearing bit T0SE
selects the rising edge. Restrictions on the external clock
input
7KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
PIC TIMER0 formula for internal clock:
PIC TIMER0 formula for external clock:
8KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
Program for Delay of 1 sec using Timer0:
9KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
“TIMER 0 CONCEPT”
CONCLUSION:
 In this above presentation we can learn about basic concept of
Timer, types of timer, timer0, features, prescaler - frequency
divider clearly.
REFERENCES:
 Mazidi, M.A.,“PIC Microcontroller” Rollin Mckinlay, Danny
causey Printice Hall of India, 2007.
 Ravichandran,C., and Arulaalan,M., “Microcontroller Based
System Design”, Suchitra Publications, Ist edition,2016.
 Dr.Balamurugan.C.R., Periyaazhagar., “Microcontroller Based
System Design”, Megnus Publications, Ist edition,2016.
 Online wikipedia search.
10KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT

More Related Content

What's hot

Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller Raghav Shetty
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems Suhani Singh
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontrollerAshish Ranjan
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using VerilogUtkarsh De
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controllerNirbhay Singh
 
Clap Switch Using Arduino
Clap Switch Using ArduinoClap Switch Using Arduino
Clap Switch Using ArduinoHome
 
Automatic railway gate controller AUP
Automatic railway gate controller AUPAutomatic railway gate controller AUP
Automatic railway gate controller AUPMasoom Khan
 
wireless E notice board
wireless E notice boardwireless E notice board
wireless E notice boardGanesh Gani
 
Report of Battery Level Indicator Circuit
Report of Battery Level Indicator CircuitReport of Battery Level Indicator Circuit
Report of Battery Level Indicator CircuitUzair Ahmad
 
Automatic light control using PIR sensor
Automatic light control using PIR sensorAutomatic light control using PIR sensor
Automatic light control using PIR sensorKrishna Prajapati
 
traffic light control using 4017 ic counter & timer 555
traffic light control using 4017 ic counter & timer 555traffic light control using 4017 ic counter & timer 555
traffic light control using 4017 ic counter & timer 555Naveen Rao
 
Rain Alarm Using 555 Timer IC with Report
Rain Alarm Using 555 Timer IC with ReportRain Alarm Using 555 Timer IC with Report
Rain Alarm Using 555 Timer IC with ReportUzair Ahmad
 
Programming ARM Cortex-M4 STM32 Nucleo
Programming ARM Cortex-M4  STM32 NucleoProgramming ARM Cortex-M4  STM32 Nucleo
Programming ARM Cortex-M4 STM32 NucleoSanjay Adhikari
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6Xv Kalairajan
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security systempraful borad
 

What's hot (20)

Programming with PIC microcontroller
Programming with PIC microcontroller Programming with PIC microcontroller
Programming with PIC microcontroller
 
Vlsi design process
Vlsi design processVlsi design process
Vlsi design process
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
 
register file structure of PIC controller
register file structure of PIC controllerregister file structure of PIC controller
register file structure of PIC controller
 
Clap Switch Using Arduino
Clap Switch Using ArduinoClap Switch Using Arduino
Clap Switch Using Arduino
 
alarm clock
alarm clock alarm clock
alarm clock
 
Automatic railway gate controller AUP
Automatic railway gate controller AUPAutomatic railway gate controller AUP
Automatic railway gate controller AUP
 
wireless E notice board
wireless E notice boardwireless E notice board
wireless E notice board
 
Report of Battery Level Indicator Circuit
Report of Battery Level Indicator CircuitReport of Battery Level Indicator Circuit
Report of Battery Level Indicator Circuit
 
Automatic light control using PIR sensor
Automatic light control using PIR sensorAutomatic light control using PIR sensor
Automatic light control using PIR sensor
 
traffic light control using 4017 ic counter & timer 555
traffic light control using 4017 ic counter & timer 555traffic light control using 4017 ic counter & timer 555
traffic light control using 4017 ic counter & timer 555
 
Firealarm System
Firealarm SystemFirealarm System
Firealarm System
 
Rain Alarm Using 555 Timer IC with Report
Rain Alarm Using 555 Timer IC with ReportRain Alarm Using 555 Timer IC with Report
Rain Alarm Using 555 Timer IC with Report
 
Programming ARM Cortex-M4 STM32 Nucleo
Programming ARM Cortex-M4  STM32 NucleoProgramming ARM Cortex-M4  STM32 Nucleo
Programming ARM Cortex-M4 STM32 Nucleo
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
 
Fingerprint base security system
Fingerprint base security systemFingerprint base security system
Fingerprint base security system
 
LED MATRIX SCROLLING
LED MATRIX SCROLLING LED MATRIX SCROLLING
LED MATRIX SCROLLING
 

Similar to Timer 0 concept

Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Technogroovy
 
Teach-In : Ladder Logic for PIC Micro
Teach-In : Ladder Logic for PIC MicroTeach-In : Ladder Logic for PIC Micro
Teach-In : Ladder Logic for PIC Microhandson28
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptxgodfrey35
 
Advanced Embedded Automatic Car Parking System
	Advanced Embedded Automatic Car Parking System	Advanced Embedded Automatic Car Parking System
Advanced Embedded Automatic Car Parking Systemtheijes
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptxSujalKumar73
 
5.programmable interval timer 8253
5.programmable interval timer 82535.programmable interval timer 8253
5.programmable interval timer 8253MdFazleRabbi18
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineeSAT Journals
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Ramadan Ramadan
 
Using Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersUsing Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersCorrado Santoro
 
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Waqas Afzal
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)Sahil Gupta
 

Similar to Timer 0 concept (20)

Timer 2 concept
Timer 2 conceptTimer 2 concept
Timer 2 concept
 
Timers
TimersTimers
Timers
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,
 
PLC.pdf
PLC.pdfPLC.pdf
PLC.pdf
 
Teach-In : Ladder Logic for PIC Micro
Teach-In : Ladder Logic for PIC MicroTeach-In : Ladder Logic for PIC Micro
Teach-In : Ladder Logic for PIC Micro
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptx
 
Advanced Embedded Automatic Car Parking System
	Advanced Embedded Automatic Car Parking System	Advanced Embedded Automatic Car Parking System
Advanced Embedded Automatic Car Parking System
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
5.programmable interval timer 8253
5.programmable interval timer 82535.programmable interval timer 8253
5.programmable interval timer 8253
 
Design and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machineDesign and development of programmable controller for air sampling machine
Design and development of programmable controller for air sampling machine
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
Ee6008 mcbsd notes
Ee6008 mcbsd notesEe6008 mcbsd notes
Ee6008 mcbsd notes
 
EE6008 MBSD
EE6008  MBSDEE6008  MBSD
EE6008 MBSD
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
 
Using Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersUsing Timers in PIC18F Microcontrollers
Using Timers in PIC18F Microcontrollers
 
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
Programmable Logic Controller | Ladder Logic diagrams| Block diagram | I/O Mo...
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
S emb t7-arch_bus
S emb t7-arch_busS emb t7-arch_bus
S emb t7-arch_bus
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
 

More from v Kalairajan

Speed governig system derivation
Speed governig system derivationSpeed governig system derivation
Speed governig system derivationv Kalairajan
 
Protection schemes
Protection schemesProtection schemes
Protection schemesv Kalairajan
 
Methods of voltage control
Methods of voltage controlMethods of voltage control
Methods of voltage controlv Kalairajan
 
Load on power system
Load on power systemLoad on power system
Load on power systemv Kalairajan
 
Electric power system operation.
Electric power system operation.Electric power system operation.
Electric power system operation.v Kalairajan
 
Pipeline concepts of 16 c6x
Pipeline concepts of 16 c6xPipeline concepts of 16 c6x
Pipeline concepts of 16 c6xv Kalairajan
 
Pic16cxx instruction set
Pic16cxx instruction setPic16cxx instruction set
Pic16cxx instruction setv Kalairajan
 
I2 c bus communication
I2 c bus communicationI2 c bus communication
I2 c bus communicationv Kalairajan
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
Arm assembly language programming
Arm assembly language programmingArm assembly language programming
Arm assembly language programmingv Kalairajan
 
Economics of Generation
Economics of GenerationEconomics of Generation
Economics of Generationv Kalairajan
 

More from v Kalairajan (13)

Speed governig system derivation
Speed governig system derivationSpeed governig system derivation
Speed governig system derivation
 
Protection schemes
Protection schemesProtection schemes
Protection schemes
 
Methods of voltage control
Methods of voltage controlMethods of voltage control
Methods of voltage control
 
Load on power system
Load on power systemLoad on power system
Load on power system
 
Electric power system operation.
Electric power system operation.Electric power system operation.
Electric power system operation.
 
Pipeline concepts of 16 c6x
Pipeline concepts of 16 c6xPipeline concepts of 16 c6x
Pipeline concepts of 16 c6x
 
Pic16cxx instruction set
Pic16cxx instruction setPic16cxx instruction set
Pic16cxx instruction set
 
Interrupts in pic
Interrupts in picInterrupts in pic
Interrupts in pic
 
I2 c bus communication
I2 c bus communicationI2 c bus communication
I2 c bus communication
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Arm assembly language programming
Arm assembly language programmingArm assembly language programming
Arm assembly language programming
 
Arm architechture
Arm architechtureArm architechture
Arm architechture
 
Economics of Generation
Economics of GenerationEconomics of Generation
Economics of Generation
 

Recently uploaded

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
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
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
(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
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
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
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
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
 
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
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 

Recently uploaded (20)

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
🔝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...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
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
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
(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
 
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
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
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 )
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
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
 
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
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 

Timer 0 concept

  • 1. MICROCONTROLLER BASED SYSTEM DESIGN “TIMER 0 CONCEPT” V.KALAIRAJAN M.E; ASSISTANT PROFESSOR, ELECTRICALAND ELECTRONICS ENGINEERING KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY,TRICHY KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT 1
  • 2. “TIMER 0 CONCEPT” VIEWS:  TIMER.  TYPES OF TIMER.  TIMER0 MODULE.  PRESCALER - FREQUENCY DIVIDER.  THE STRUCTURE OF THE OPTION_REG REGISTER.  BLOCK DIAGRAM OF THE TIMER0 MODULE.  PIC TIMER0 FORMULA FOR INTERNAL CLOCK.  PIC TIMER0 FORMULA FOR EXTERNAL CLOCK.  PROGRAM FOR DELAY OF 1 SEC USING TIMER0. KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT 2
  • 3. “TIMER 0 CONCEPT” TIMER:  Now a days, we plan and build systems that perform various processes that depend on time.  Simple example of this process is the digital wristwatch. The role of this electronic system is to display time in a very precise manner and change the display every second (for seconds), every minute (for minutes) and so on.  To perform the steps we've listed, the system must use a timer, which needs to be very accurate in order to take necessary actions. The clock is actually a core of any electronic system.  Each module can generate an interrupt to indicate that an event has occurred (i.e. timer overflow). The timer modules are:  Timer0 Module  Timer1 Module  Timer2 Module 3KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 4. “TIMER 0 CONCEPT” TIMER0 MODULE:  The Timer0 module timer/counter has the following features:  8-bit timer/counter  Readable and writable  8-bit software programmable prescaler  Internal or external clock select  Interrupt on overflow from FFh to 00h  Edge select for external clock PRESCALER - FREQUENCY DIVIDER:  We can use Prescaler for further division of the system clock. The options are: 1:2, 4, 8, 16, 32, 64, 128, 256 4KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 5. “TIMER 0 CONCEPT” THE STRUCTURE OF THE OPTION_REG REGISTER:  We perform all the necessary settings with OPTION_REG Register. The size of the register is 8 bits. INITIALIZING THE OPTION_REG REGISTER: The following is an example how we can initialize the OPTION_REG: PSA=0; // Prescaler is assigned to the Timer0 module PS0=1; // Prescaler rate bits PS1=1; // are set to “111” PS2=1; // which means divide by 256 TOSE=0; // rising edge TOCS=0; // Internal instruction cycle clock 5KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 6. PIC16CXX PIPELINING BLOCK DIAGRAM OF THE TIMER0 MODULE. 6KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 7. “TIMER 0 CONCEPT”  Timer mode is selected by clearing bit T0CS (OPTION<5>). In timer mode, the Timer0 module will increment every instruction cycle (without prescaler).  If the TMR0 register is written, the increment is inhibited for the following two instruction cycles.  The user can work around this by writing an adjusted value to the TMR0 register. Counter mode is selected by setting bit T0CS (OPTION<5>).  In counter mode, Timer0 will increment either on every rising or falling edge of pin RA4/T0CKI.  The incrementing edge is determined by the Timer0 Source Edge Select bit T0SE (OPTION<4>). Clearing bit T0SE selects the rising edge. Restrictions on the external clock input 7KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 8. “TIMER 0 CONCEPT” PIC TIMER0 formula for internal clock: PIC TIMER0 formula for external clock: 8KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 9. “TIMER 0 CONCEPT” Program for Delay of 1 sec using Timer0: 9KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT
  • 10. “TIMER 0 CONCEPT” CONCLUSION:  In this above presentation we can learn about basic concept of Timer, types of timer, timer0, features, prescaler - frequency divider clearly. REFERENCES:  Mazidi, M.A.,“PIC Microcontroller” Rollin Mckinlay, Danny causey Printice Hall of India, 2007.  Ravichandran,C., and Arulaalan,M., “Microcontroller Based System Design”, Suchitra Publications, Ist edition,2016.  Dr.Balamurugan.C.R., Periyaazhagar., “Microcontroller Based System Design”, Megnus Publications, Ist edition,2016.  Online wikipedia search. 10KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER 0 CONCEPT