English
Language : 

PIC16F722A Datasheet, PDF (123/284 Pages) Microchip Technology – 28-Pin Flash Microcontrollers with nanoWatt XLP Technology
PIC16F/LF722A/723A
15.0 CAPTURE/COMPARE/PWM
(CCP) MODULE
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
Table 15-1.
Additional information on CCP modules is available in
the Application Note AN594, “Using the CCP Modules”
(DS00594).
TABLE 15-1: CCP MODE – TIMER
RESOURCES REQUIRED
CCP Mode
Timer Resource
Capture
Compare
PWM
Timer1
Timer1
Timer2
TABLE 15-2: INTERACTION OF TWO CCP MODULES
CCP1 Mode CCP2 Mode
Interaction
Capture
Capture
Compare
Capture
Compare
Compare
Same TMR1 time base
Same TMR1 time base(1, 2)
Same TMR1 time base(1, 2)
PWM
PWM
The PWMs will have the same frequency and update rate (TMR2 interrupt).
The rising edges will be aligned.
PWM
Capture
None
PWM
Compare
None
Note 1: If CCP2 is configured as a Special Event Trigger, CCP1 will clear Timer1, affecting the value captured on
the CCP2 pin.
2: 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.
 2010 Microchip Technology Inc.
DS41417A-page 123