PIC16F72X/PIC16LF72X
15.0
CAPTURE/COMPARE/PWM
(CCP) MODULE
TABLE 15-1:
CCP MODE – TIMER
RESOURCES REQUIRED
Timer Resource
Timer1
Timer1
Timer2
CCP Mode
Capture
Compare
PWM
The Capture/Compare/PWM module is a peripheral
which allows the user to time and control different
events. In Capture mode, the peripheral allows the
timing of the duration of an event. The Compare mode
allows the user to trigger an external event when a
predetermined amount of time has expired. The PWM
mode can generate a Pulse-Width Modulated signal of
varying frequency and duty cycle.
The timer resources used by the module are shown in
Additional information on CCP modules is available in
the Application Note AN594,
“Using the CCP Modules”
(DS00594).
TABLE 15-2:
CCP1 Mode
Capture
Capture
Compare
PWM
PWM
PWM
Note 1:
2:
INTERACTION OF TWO CCP MODULES
CCP2 Mode
Capture
Compare
Compare
PWM
Capture
Compare
Same TMR1 time base
Same TMR1 time base
(1, 2)
Same TMR1 time base
(1, 2)
The PWMs will have the same frequency and update rate (TMR2 interrupt).
The rising edges will be aligned.
None
None
Interaction
If CCP2 is configured as a Special Event Trigger, CCP1 will clear Timer1, affecting the value captured on
the CCP2 pin.
If CCP1 is in Capture mode and CCP2 is configured as a Special Event Trigger, CCP2 will clear Timer1,
affecting the value captured on the CCP1 pin.
Note:
CCPRx and CCPx throughout this
document refer to CCPR1 or CCPR2 and
CCP1 or CCP2, respectively.
©
2009 Microchip Technology Inc.
DS41341E-page 135