SlideShare ist ein Scribd-Unternehmen logo
1 von 9
MICROCONTROLLER BASED SYSTEM DESIGN
“TIMER 2 CONCEPT”
V. KALAIRAJAN M.E;
ASSISTANT PROFESSOR,
ELECTRICAL AND ELECTRONICS ENGINEERING,
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY.
1KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 2 CONCEPT”
VIEWS:
 TIMER.
 TYPES OF TIMER.
 TIMER2 MODULE.
 PRESCALER - FREQUENCY DIVIDER.
 POSTSCALER - FREQUENCY DIVIDER.
 THE STRUCTURE OF THE OPTION_REG REGISTER.
 BLOCK DIAGRAM OF THE TIMER2 MODULE.
 PIC TIMER2 FORMULA.
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT 2
“TIMER 2 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 TIMER2 CONCEPT
“TIMER 2 CONCEPT”
TIMER 2 MODULE:
The Timer2 module, timer/counter, has the following features:
 Two 8-bit registers (TMR2 and PR2).
 Readable and writable.
 A prescaler and a postscaler.
 Connected only to an internal clock - 4 MHz crystal.
 Interrupt on overflow.
PRESCALER - FREQUENCY DIVIDER:
 The prescaler allows Timer2 to increment at the following rates:
1:1, 1:4, 1:16.
POSTSCALER - FREQUENCY DIVIDER:
 The postscaler can be programmed from 1:1 to 1:16 (inclusive).
4KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 2 CONCEPT”
THE STRUCTURE OF THE OPTION_REG REGISTER:
 We perform all the necessary settings with T2CON Register The
structure of the T2CON register. The size of the register is 8 bits
INITIALIZING THE OPTION_REG REGISTER:
The following is an example how we can initialize the T2CON
register:
1. TMR2ON=1; // the timer is enable
2. T2CKPS0=0; // Prescaler – 1:1
3. T2CKPS1=0;
4. TOUTPS0=1; // Postscaler – 1:16
5. TOUTPS0=1;
6. TOUTPS0=1;
7. TOUTPS0=1;
Or you can set all the T2CON register at once as follows:
T2CON=0b01111100;
5
KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 2 CONCEPT”
BLOCK DIAGRAM OF THE TIMER2 MODULE:
6KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 2 CONCEPT”
 Timer2 is an 8-bit timer with a programmable prescaler and
postscaler, as well as an 8-bit period register (PR2).
 Timer2 can be used with the CCP1 module (in PWM mode) as
well as the Baud Rate Generator for the Synchronous Serial Port
(SSP).
 Timer2 is an 8-bit timer with a prescaler and a postscaler. It can be
used as the PWM time-base for PWM mode of the CCP
module(s).
 The TMR2 register is readable and writable, and is cleared on any
device reset.
7KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 2 CONCEPT”
PIC TIMER2 formula:
Fout - The output frequency after the division.
Tout - The Cycle Time after the division
4 - The division of the original clock (4 MHz) by 4, when
using internal crystal as clock (and not external oscillator).
Count - A numeric value to be placed to obtain the desired output
Frequency-fuot.
(PR2 – TMR2) - The number of times the counter will count.
8KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
“TIMER 0 CONCEPT”
CONCLUSION:
 In this above presentation we can learn about basic concept of
Timer, types of timer, timer2, features, pre and post scaler -
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.
9KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT

Weitere ähnliche Inhalte

Was ist angesagt?

Packaging of vlsi devices
Packaging of vlsi devicesPackaging of vlsi devices
Packaging of vlsi devices
Ashu0711
 

Was ist angesagt? (20)

Microwave engineering basics
Microwave engineering basicsMicrowave engineering basics
Microwave engineering basics
 
Akshay (structures)
Akshay (structures)Akshay (structures)
Akshay (structures)
 
Packaging of vlsi devices
Packaging of vlsi devicesPackaging of vlsi devices
Packaging of vlsi devices
 
Comparison of different demodulation techniques
Comparison of different demodulation techniquesComparison of different demodulation techniques
Comparison of different demodulation techniques
 
Triac and Diac
Triac and DiacTriac and Diac
Triac and Diac
 
VLSI
VLSIVLSI
VLSI
 
MULTI Threshold
MULTI ThresholdMULTI Threshold
MULTI Threshold
 
Logic families
Logic familiesLogic families
Logic families
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
Amplitude shift keying (ask).pptx
Amplitude shift keying (ask).pptxAmplitude shift keying (ask).pptx
Amplitude shift keying (ask).pptx
 
Design of a low power asynchronous SRAM in 45nM CMOS
Design of a low power asynchronous SRAM in 45nM CMOSDesign of a low power asynchronous SRAM in 45nM CMOS
Design of a low power asynchronous SRAM in 45nM CMOS
 
3D INTEGRATED CIRCUITS
3D INTEGRATED CIRCUITS3D INTEGRATED CIRCUITS
3D INTEGRATED CIRCUITS
 
Pulse modulation
Pulse modulationPulse modulation
Pulse modulation
 
Microwave cavity 1st 4
Microwave cavity 1st 4Microwave cavity 1st 4
Microwave cavity 1st 4
 
Difference Between Impatt Diode and Trapatt Diode and Baritt Diode
Difference Between Impatt Diode and Trapatt Diode and Baritt DiodeDifference Between Impatt Diode and Trapatt Diode and Baritt Diode
Difference Between Impatt Diode and Trapatt Diode and Baritt Diode
 
SRAM Design
SRAM DesignSRAM Design
SRAM Design
 
Rc delay modelling in vlsi
Rc delay modelling in vlsiRc delay modelling in vlsi
Rc delay modelling in vlsi
 
Vlsi cadence tutorial_ahmet_ilker_şin
Vlsi cadence tutorial_ahmet_ilker_şinVlsi cadence tutorial_ahmet_ilker_şin
Vlsi cadence tutorial_ahmet_ilker_şin
 
UNIT-3 : CHANNEL CODING
UNIT-3 : CHANNEL CODINGUNIT-3 : CHANNEL CODING
UNIT-3 : CHANNEL CODING
 
module1:Introduction to digital electronics
module1:Introduction to digital electronicsmodule1:Introduction to digital electronics
module1:Introduction to digital electronics
 

Ähnlich wie Timer 2 concept

Ähnlich wie Timer 2 concept (20)

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
 
Timer 0 concept
Timer 0 conceptTimer 0 concept
Timer 0 concept
 
Lecture 2 timers, pwm, state machine IN PIC
Lecture 2   timers, pwm, state machine IN PIC Lecture 2   timers, pwm, state machine IN PIC
Lecture 2 timers, pwm, state machine IN PIC
 
Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...Program, Code of Program and  Screen Shot of Output (UNIVERSAL DRIVER USING µ...
Program, Code of Program and Screen Shot of Output (UNIVERSAL DRIVER USING µ...
 
Ee6008 mcbsd notes
Ee6008 mcbsd notesEe6008 mcbsd notes
Ee6008 mcbsd notes
 
Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52Electronic voting machine using mcu 89s52
Electronic voting machine using mcu 89s52
 
Electronic voting machine presentation
Electronic voting machine  presentationElectronic voting machine  presentation
Electronic voting machine presentation
 
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCKINTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
INTERRUPT DRIVEN MULTIPLEXED 7 SEGMENT DIGITAL CLOCK
 
Advanced Embedded Automatic Car Parking System
	Advanced Embedded Automatic Car Parking System	Advanced Embedded Automatic Car Parking System
Advanced Embedded Automatic Car Parking System
 
1708015.pptx
1708015.pptx1708015.pptx
1708015.pptx
 
EE6008 MCBSD - Introduction to PIC Micro controller
EE6008 MCBSD - Introduction to PIC Micro controller EE6008 MCBSD - Introduction to PIC Micro controller
EE6008 MCBSD - Introduction to PIC Micro controller
 
EE6008 MBSD
EE6008  MBSDEE6008  MBSD
EE6008 MBSD
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
intelligent braking system report
intelligent braking system reportintelligent braking system report
intelligent braking system report
 
Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor Door control embedded system using accelerometer sensor
Door control embedded system using accelerometer sensor
 
JamesEndl
JamesEndlJamesEndl
JamesEndl
 
programmable logical controller(PLC)
programmable logical controller(PLC)programmable logical controller(PLC)
programmable logical controller(PLC)
 
Gesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docuGesture based vehicle movements control and alerting system docu
Gesture based vehicle movements control and alerting system docu
 
Arm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC MotorArm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC Motor
 

Mehr von v Kalairajan

Mehr von v Kalairajan (14)

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
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
 
Economics of Generation
Economics of GenerationEconomics of Generation
Economics of Generation
 

Kürzlich hochgeladen

Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

Timer 2 concept

  • 1. MICROCONTROLLER BASED SYSTEM DESIGN “TIMER 2 CONCEPT” V. KALAIRAJAN M.E; ASSISTANT PROFESSOR, ELECTRICAL AND ELECTRONICS ENGINEERING, KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY. 1KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 2. “TIMER 2 CONCEPT” VIEWS:  TIMER.  TYPES OF TIMER.  TIMER2 MODULE.  PRESCALER - FREQUENCY DIVIDER.  POSTSCALER - FREQUENCY DIVIDER.  THE STRUCTURE OF THE OPTION_REG REGISTER.  BLOCK DIAGRAM OF THE TIMER2 MODULE.  PIC TIMER2 FORMULA. KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT 2
  • 3. “TIMER 2 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 TIMER2 CONCEPT
  • 4. “TIMER 2 CONCEPT” TIMER 2 MODULE: The Timer2 module, timer/counter, has the following features:  Two 8-bit registers (TMR2 and PR2).  Readable and writable.  A prescaler and a postscaler.  Connected only to an internal clock - 4 MHz crystal.  Interrupt on overflow. PRESCALER - FREQUENCY DIVIDER:  The prescaler allows Timer2 to increment at the following rates: 1:1, 1:4, 1:16. POSTSCALER - FREQUENCY DIVIDER:  The postscaler can be programmed from 1:1 to 1:16 (inclusive). 4KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 5. “TIMER 2 CONCEPT” THE STRUCTURE OF THE OPTION_REG REGISTER:  We perform all the necessary settings with T2CON Register The structure of the T2CON register. The size of the register is 8 bits INITIALIZING THE OPTION_REG REGISTER: The following is an example how we can initialize the T2CON register: 1. TMR2ON=1; // the timer is enable 2. T2CKPS0=0; // Prescaler – 1:1 3. T2CKPS1=0; 4. TOUTPS0=1; // Postscaler – 1:16 5. TOUTPS0=1; 6. TOUTPS0=1; 7. TOUTPS0=1; Or you can set all the T2CON register at once as follows: T2CON=0b01111100; 5 KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 6. “TIMER 2 CONCEPT” BLOCK DIAGRAM OF THE TIMER2 MODULE: 6KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 7. “TIMER 2 CONCEPT”  Timer2 is an 8-bit timer with a programmable prescaler and postscaler, as well as an 8-bit period register (PR2).  Timer2 can be used with the CCP1 module (in PWM mode) as well as the Baud Rate Generator for the Synchronous Serial Port (SSP).  Timer2 is an 8-bit timer with a prescaler and a postscaler. It can be used as the PWM time-base for PWM mode of the CCP module(s).  The TMR2 register is readable and writable, and is cleared on any device reset. 7KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 8. “TIMER 2 CONCEPT” PIC TIMER2 formula: Fout - The output frequency after the division. Tout - The Cycle Time after the division 4 - The division of the original clock (4 MHz) by 4, when using internal crystal as clock (and not external oscillator). Count - A numeric value to be placed to obtain the desired output Frequency-fuot. (PR2 – TMR2) - The number of times the counter will count. 8KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT
  • 9. “TIMER 0 CONCEPT” CONCLUSION:  In this above presentation we can learn about basic concept of Timer, types of timer, timer2, features, pre and post scaler - 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. 9KONGUNADU COLLEGE OF ENGINERING AND TECHNOLOGY, TRICHY TIMER2 CONCEPT