CCP Module
CCP Module
CCP1 Module:
Capture/Compare/PWM Register1 (CCPR1) is comprised of two 8-bit registers:
CCPR1L (low byte) and CCPR1H (high byte). The CCP1CON register controls the operation
of CCP1. The special event trigger is generated by a compare match and will reset Timer1.
CCP2 Module:
Capture/Compare/PWM Register2 (CCPR2) is comprised of two 8-bit registers:
CCPR2L (low byte) and CCPR2H (high byte). The CCP2CON register controls the operation
of CCP2. The special event trigger is generated by a compare match and will reset Timer1 and
start an A/D conversion (if the A/D module is enabled).
Figure 7-3 shows a simplified block diagram of the CCP module in PWM mode.
After the A/D module has been configured as desired, the selected channel must be acquired
before the conversion is started. The analog input channels must have their corresponding TRIS
bits selected as inputs.