TMR1: 16-bit timer/counter and capture/compare module
TMR1/CCP module simplified
TMR1 description
CCP module - capture mode
CCP module - compare mode
CCP module - PWM mode
How to choose/select mode of operation
T1CON register
CCP1CON register
Interrupts
Reading and writing TMR1
Long time intervals
Controlling the CCP1 pin in compare mode
More than one way to do timing stuff
Timing and counting experiments
Free running output (via TMR1 interrupt)
Event counting (via TMR1)
Count events, read TMR1 contents
Capture TMR1 count when external event occurs
Count events up to predetermined number and generate an output (compare)
Single time interval output (via TMR1 and CCP, compare
mode)
Start TMR1, auto end
500 milliseconds
128 microseconds
Free running output (via TMR1 and CCP, compare mode)
Clear TMR1 each cycle
Free running TMR1, add interval value to compare register each cycle
Time measurement (period/interval/time between events)
(via TMR1 read)(interval input via port pin)
(via TMR1 and CCP, capture mode)(interval input via CCP1 pin,
two captures,subtract)
Frequency measurement (via TMR1, gate via TMR0)
External 32,768 Hz watch crystal-based clock for TMR1
Pulse width modulation (PWM) using TMR2 and the CCP module
Analog output - increase/decrease buttons - PWM -
8-bit mode
Duty cycle - 10-bit mode
Analog output - increase/decrease buttons - PWM - 10-bit mode
-