SlideShare a Scribd company logo
1 of 15
Timers, CCP Module, ADC
and Serial Communication
Done by,
Ms.K.R.Priyanga
Assistant Professor,
Department of ECE,
Avinashilingam Institute
• To measure the time or generate the accurate
time delay
• To count clock pulses(Internal/External)
TIMERS
Different Timers
• PIC Timer 0
• PIC Timer 1
• PIC Timer 2
Timer Size
Control
Register
Count
Register
Min Delay Max Delay
TIMER0 8-bit
OPTION_RE
G
TMR0 0.2usec 13.107ms
TIMER1 16-bit T1CON
TMR1H,TMR
1L
0.2usec 104.857ms
TIMER2 8-bit T2CON TMR2 0.2usec 819usec
Timer 0
• OPTION_REG - configure the TIMER0
Prescalar, Clock Source
• TMR0 - holds the timer count value which will
be incremented depending on prescalar
configuration
• INTCON - contains the Timer0 overflow
flag(TMR0IF) and corresponding Inetrrupt
Enable flag(TMR0IE).
Option_ Register
RBPU: PORT B Pull up enable Bit
1 - Disabled
0 - connected to pull-resistors
INTEDG: Interrupt Edge Select Bit
1 – Interrupt on rising edge of the INT pin (0-1)
0 - Interrupt on falling edge of the INT pin (1-0)
T0CS: TMR0 Clock Source Select bit
1-Transition on T0CKI pin
0-Internal instruction cycle clock (CLKO)
T0SE: TMR0 Source Edge Select bit
1-Increment on high-to-low transition on T0CKI pin
0-Increment on low-to-high transition on T0CKI pin
PSA: Prescaler Assignment bit
1-Prescaler is assigned to the WDT
0-Prescaler is assigned to the Timer0
PS2:PS0: Prescaler Rate Select bits
Timer 1
• T1CON: Configure the TIMER1 Prescalar, Clock
Source
• TMRIH: Holds the higher 8-bits of timer value
• TMRIL: Holds the lower 8-bits of timer value
• PIR1: Contains the Timer1 overflow
flag(TMR1IF)
• PIE1: Contains the Timer1 Interrupt Enable
flag(TMR1IE)
T1CON
• T1CKPS1:T1CKPS0:Timer1 Input Clock Prescale Select bits
11 = 1:8 prescale value
10 = 1:4 prescale value
01 = 1:2 prescale value
00 = 1:1 prescale value
• T1OSCEN: Timer1 Oscillator Enable Control bit
1-Oscillator is enabled
0-Oscillator is shut-off
• T1SYNC: Timer1 External Clock Input Synchronization Control bit
1-Do not synchronize external clock input
0-Synchronize external clock input
• TMR1CS: Timer1 Clock Source Select bit
1-External clock from pin RC0/T1OSO/T1CKI (on the rising edge)
0-Internal clock (FOSC/4)
• TMR1ON: Timer1 On bit
1-Enables Timer1
0-Stops Timer1
Timer 2
• T2CON: Configure the TIMER2 Prescalar, Clock
Source
• TMR2: holds the timer count value which will
be incremented depending on prescalar
configuration
• PIR1: contains the Timer2 overflow
flag(TMR2IF)
• PIE1: contains the Timer2 Interrupt Enable
flag(TMR2IE)
T2CON
• TOUTPS3:TOUTPS0: Timer2 Output Postscale Select bits
0000 = 1:1 postscale
0001 = 1:2 postscale
0010 = 1:3 postscale
•
•
•
1111 = 1:16 postscale
• TMR2ON: Timer2 On bit
1-Timer2 is on
0-Timer2 is off
• T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits
00 = Prescaler is 1
01 = Prescaler is 4
1x = Prescaler is 16
CCP Module
• 16 bit Capture, Compare and 10 bit PWM
ADC
• 8 input ADC pins
• 10 bit digital number
• Registers
• ADCON0 – ADC Control Register 0
• ADCON1 – ADC Control Register 1
• ADRESH – ADC result High Register
• ADRESL – ADC result Low Register
Serial Communication
• TXSTA: Transmit status and control register
• RCSTA: Receive status and control register
• SPBRG: USART Baud rate generator
• TXREG: USART Transmit register.(transmitted
on UART)
• RCREG: USART Transmit register.(received
from UART)
TXSTA – 8 bits
• CSRC: Clock Source select bit
• TX9: 9-bit transmit enable bit
• TXEN: transmit enable bit (1-enabled; 0-disabled)
• SYNC: USART Mode select bit (1 – Syn; 0 - ASyn)
• BRGH: High Baud rate select bit (1- high speed; 0-low speed)
• TRMT: Transmit shift register status bit
• TX9D: 9th bit transmit data
RCSTA – 8 bits
• SPEN: Serial port enable bit (1-enable; 0-disable)
• RX9: 9 bit Receive Enable Bit
• SREN: Single receive enable bit
• CREN: Continuous receive enable bit
• ADDEN: Address detect enable bit
• FERR: Framing error bit
• OERR: Overrun error bit
• RX9D: 9th bit of received data

More Related Content

What's hot

8051 Microcontroller Timer
8051 Microcontroller Timer8051 Microcontroller Timer
8051 Microcontroller Timeranishgoel
 
Using Timer2 in Microchip MCUs
Using Timer2 in Microchip MCUsUsing Timer2 in Microchip MCUs
Using Timer2 in Microchip MCUsCorrado Santoro
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / CountersPatricio Lima
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerJay Makwana
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programmingMohamed Ali
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and countersforgotteniman
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded cVikas Dongre
 
Microprocessor Week 9: Timer and Counter
Microprocessor Week 9: Timer and CounterMicroprocessor Week 9: Timer and Counter
Microprocessor Week 9: Timer and CounterArkhom Jodtang
 
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
 
Handling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsHandling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsCorrado Santoro
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 

What's hot (20)

8051 ch9
8051 ch98051 ch9
8051 ch9
 
8051 Microcontroller Timer
8051 Microcontroller Timer8051 Microcontroller Timer
8051 Microcontroller Timer
 
8051 timers
8051 timers8051 timers
8051 timers
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
 
Using Timer2 in Microchip MCUs
Using Timer2 in Microchip MCUsUsing Timer2 in Microchip MCUs
Using Timer2 in Microchip MCUs
 
Timers
TimersTimers
Timers
 
8051 Timers / Counters
8051 Timers / Counters8051 Timers / Counters
8051 Timers / Counters
 
Timer And Counter in 8051 Microcontroller
Timer And Counter in 8051 MicrocontrollerTimer And Counter in 8051 Microcontroller
Timer And Counter in 8051 Microcontroller
 
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and  interrupt programmingAVR_Course_Day7 timers counters and  interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
 
Chapter 16 timers and counters
Chapter 16 timers and countersChapter 16 timers and counters
Chapter 16 timers and counters
 
8051e
8051e8051e
8051e
 
Timers
TimersTimers
Timers
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
 
Microprocessor Week 9: Timer and Counter
Microprocessor Week 9: Timer and CounterMicroprocessor Week 9: Timer and Counter
Microprocessor Week 9: Timer and Counter
 
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
 
Avr timers
Avr timersAvr timers
Avr timers
 
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,
 
9 timer programming
9 timer programming9 timer programming
9 timer programming
 
Handling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUsHandling Interrupts in Microchip MCUs
Handling Interrupts in Microchip MCUs
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 

Similar to Timers done by Priyanga KR

Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptxSujalKumar73
 
Using Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersUsing Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersCorrado Santoro
 
5-Timer Mode 2 Programming-18-03-2024.pptx
5-Timer Mode 2 Programming-18-03-2024.pptx5-Timer Mode 2 Programming-18-03-2024.pptx
5-Timer Mode 2 Programming-18-03-2024.pptxRahultater4
 
Microcontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxMicrocontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxAmoghR3
 
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
 
6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptxRahultater4
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptHebaEng
 
moving message display of lcd
 moving message display of lcd moving message display of lcd
moving message display of lcdabhishek upadhyay
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18raosandy11
 
Microchip NANOWatt Technology
Microchip NANOWatt TechnologyMicrochip NANOWatt Technology
Microchip NANOWatt TechnologyEmanuele Bonanni
 

Similar to Timers done by Priyanga KR (20)

UNIT-5.ppt
UNIT-5.pptUNIT-5.ppt
UNIT-5.ppt
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
Using Timers in PIC18F Microcontrollers
Using Timers in PIC18F MicrocontrollersUsing Timers in PIC18F Microcontrollers
Using Timers in PIC18F Microcontrollers
 
5-Timer Mode 2 Programming-18-03-2024.pptx
5-Timer Mode 2 Programming-18-03-2024.pptx5-Timer Mode 2 Programming-18-03-2024.pptx
5-Timer Mode 2 Programming-18-03-2024.pptx
 
Microcontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptxMicrocontrollers-MODULE4.pptx
Microcontrollers-MODULE4.pptx
 
12 mt06ped007
12 mt06ped007 12 mt06ped007
12 mt06ped007
 
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...
 
6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx6-Interrupts Programming-27-03-2024.pptx
6-Interrupts Programming-27-03-2024.pptx
 
lecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.pptlecture 12 counter_microcontroller2.ppt
lecture 12 counter_microcontroller2.ppt
 
moving message display of lcd
 moving message display of lcd moving message display of lcd
moving message display of lcd
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Timer 2 concept
Timer 2 conceptTimer 2 concept
Timer 2 concept
 
Interrupts for PIC18
Interrupts for PIC18Interrupts for PIC18
Interrupts for PIC18
 
Timing & Control.pptx
Timing & Control.pptxTiming & Control.pptx
Timing & Control.pptx
 
Microchip NANOWatt Technology
Microchip NANOWatt TechnologyMicrochip NANOWatt Technology
Microchip NANOWatt Technology
 
Timers in Arduino
Timers in ArduinoTimers in Arduino
Timers in Arduino
 

More from PriyangaKR1

Air conditioners
Air conditionersAir conditioners
Air conditionersPriyangaKR1
 
Ups and burglar alarm
Ups and burglar alarmUps and burglar alarm
Ups and burglar alarmPriyangaKR1
 
Supervisor call and pendable service call
Supervisor call and pendable service callSupervisor call and pendable service call
Supervisor call and pendable service callPriyangaKR1
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development ToolsPriyangaKR1
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction setPriyangaKR1
 
Multimedia compression networks
Multimedia compression networksMultimedia compression networks
Multimedia compression networksPriyangaKR1
 
Trends and satellite
Trends and satelliteTrends and satellite
Trends and satellitePriyangaKR1
 
Mobile around the world and wireless communication examples
Mobile around the world and wireless communication examplesMobile around the world and wireless communication examples
Mobile around the world and wireless communication examplesPriyangaKR1
 
Mobile communication - Introduction
Mobile communication - IntroductionMobile communication - Introduction
Mobile communication - IntroductionPriyangaKR1
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systemsPriyangaKR1
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KRPriyangaKR1
 
Pic architecture done by Priyanga KR
Pic architecture done by Priyanga KRPic architecture done by Priyanga KR
Pic architecture done by Priyanga KRPriyangaKR1
 

More from PriyangaKR1 (20)

Lpc 17xx adc
Lpc 17xx adcLpc 17xx adc
Lpc 17xx adc
 
Lpc 1768 timers
Lpc 1768 timersLpc 1768 timers
Lpc 1768 timers
 
CCTV
CCTVCCTV
CCTV
 
Washing machine
Washing machineWashing machine
Washing machine
 
Rice cooker
Rice cookerRice cooker
Rice cooker
 
Refrigerators
RefrigeratorsRefrigerators
Refrigerators
 
Air conditioners
Air conditionersAir conditioners
Air conditioners
 
Microwave oven
Microwave ovenMicrowave oven
Microwave oven
 
Ups and burglar alarm
Ups and burglar alarmUps and burglar alarm
Ups and burglar alarm
 
Supervisor call and pendable service call
Supervisor call and pendable service callSupervisor call and pendable service call
Supervisor call and pendable service call
 
Arm Development Tools
Arm Development ToolsArm Development Tools
Arm Development Tools
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Multimedia compression networks
Multimedia compression networksMultimedia compression networks
Multimedia compression networks
 
Trends and satellite
Trends and satelliteTrends and satellite
Trends and satellite
 
Mobile around the world and wireless communication examples
Mobile around the world and wireless communication examplesMobile around the world and wireless communication examples
Mobile around the world and wireless communication examples
 
Mobile communication - Introduction
Mobile communication - IntroductionMobile communication - Introduction
Mobile communication - Introduction
 
Root locus tech
Root locus techRoot locus tech
Root locus tech
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KR
 
Pic architecture done by Priyanga KR
Pic architecture done by Priyanga KRPic architecture done by Priyanga KR
Pic architecture done by Priyanga KR
 

Recently uploaded

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 

Recently uploaded (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 

Timers done by Priyanga KR

  • 1. Timers, CCP Module, ADC and Serial Communication Done by, Ms.K.R.Priyanga Assistant Professor, Department of ECE, Avinashilingam Institute
  • 2. • To measure the time or generate the accurate time delay • To count clock pulses(Internal/External) TIMERS
  • 3. Different Timers • PIC Timer 0 • PIC Timer 1 • PIC Timer 2 Timer Size Control Register Count Register Min Delay Max Delay TIMER0 8-bit OPTION_RE G TMR0 0.2usec 13.107ms TIMER1 16-bit T1CON TMR1H,TMR 1L 0.2usec 104.857ms TIMER2 8-bit T2CON TMR2 0.2usec 819usec
  • 4. Timer 0 • OPTION_REG - configure the TIMER0 Prescalar, Clock Source • TMR0 - holds the timer count value which will be incremented depending on prescalar configuration • INTCON - contains the Timer0 overflow flag(TMR0IF) and corresponding Inetrrupt Enable flag(TMR0IE).
  • 5. Option_ Register RBPU: PORT B Pull up enable Bit 1 - Disabled 0 - connected to pull-resistors INTEDG: Interrupt Edge Select Bit 1 – Interrupt on rising edge of the INT pin (0-1) 0 - Interrupt on falling edge of the INT pin (1-0) T0CS: TMR0 Clock Source Select bit 1-Transition on T0CKI pin 0-Internal instruction cycle clock (CLKO) T0SE: TMR0 Source Edge Select bit 1-Increment on high-to-low transition on T0CKI pin 0-Increment on low-to-high transition on T0CKI pin PSA: Prescaler Assignment bit 1-Prescaler is assigned to the WDT 0-Prescaler is assigned to the Timer0 PS2:PS0: Prescaler Rate Select bits
  • 6.
  • 7. Timer 1 • T1CON: Configure the TIMER1 Prescalar, Clock Source • TMRIH: Holds the higher 8-bits of timer value • TMRIL: Holds the lower 8-bits of timer value • PIR1: Contains the Timer1 overflow flag(TMR1IF) • PIE1: Contains the Timer1 Interrupt Enable flag(TMR1IE)
  • 8. T1CON • T1CKPS1:T1CKPS0:Timer1 Input Clock Prescale Select bits 11 = 1:8 prescale value 10 = 1:4 prescale value 01 = 1:2 prescale value 00 = 1:1 prescale value • T1OSCEN: Timer1 Oscillator Enable Control bit 1-Oscillator is enabled 0-Oscillator is shut-off • T1SYNC: Timer1 External Clock Input Synchronization Control bit 1-Do not synchronize external clock input 0-Synchronize external clock input • TMR1CS: Timer1 Clock Source Select bit 1-External clock from pin RC0/T1OSO/T1CKI (on the rising edge) 0-Internal clock (FOSC/4) • TMR1ON: Timer1 On bit 1-Enables Timer1 0-Stops Timer1
  • 9. Timer 2 • T2CON: Configure the TIMER2 Prescalar, Clock Source • TMR2: holds the timer count value which will be incremented depending on prescalar configuration • PIR1: contains the Timer2 overflow flag(TMR2IF) • PIE1: contains the Timer2 Interrupt Enable flag(TMR2IE)
  • 10. T2CON • TOUTPS3:TOUTPS0: Timer2 Output Postscale Select bits 0000 = 1:1 postscale 0001 = 1:2 postscale 0010 = 1:3 postscale • • • 1111 = 1:16 postscale • TMR2ON: Timer2 On bit 1-Timer2 is on 0-Timer2 is off • T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits 00 = Prescaler is 1 01 = Prescaler is 4 1x = Prescaler is 16
  • 11. CCP Module • 16 bit Capture, Compare and 10 bit PWM
  • 12. ADC • 8 input ADC pins • 10 bit digital number • Registers • ADCON0 – ADC Control Register 0 • ADCON1 – ADC Control Register 1 • ADRESH – ADC result High Register • ADRESL – ADC result Low Register
  • 13. Serial Communication • TXSTA: Transmit status and control register • RCSTA: Receive status and control register • SPBRG: USART Baud rate generator • TXREG: USART Transmit register.(transmitted on UART) • RCREG: USART Transmit register.(received from UART)
  • 14. TXSTA – 8 bits • CSRC: Clock Source select bit • TX9: 9-bit transmit enable bit • TXEN: transmit enable bit (1-enabled; 0-disabled) • SYNC: USART Mode select bit (1 – Syn; 0 - ASyn) • BRGH: High Baud rate select bit (1- high speed; 0-low speed) • TRMT: Transmit shift register status bit • TX9D: 9th bit transmit data
  • 15. RCSTA – 8 bits • SPEN: Serial port enable bit (1-enable; 0-disable) • RX9: 9 bit Receive Enable Bit • SREN: Single receive enable bit • CREN: Continuous receive enable bit • ADDEN: Address detect enable bit • FERR: Framing error bit • OERR: Overrun error bit • RX9D: 9th bit of received data