30.5.1 CCPxCON

CCP Control Register
Note:
  1. The set and clear operations of the Compare mode are reset by setting MODE = ‘b0000 or EN = 0.
  2. When MODE = ‘b0001 or ‘b1011, then the timer associated with the CCP module is cleared. TMR1 is the default selection for the CCP module, so it is used for indication purposes only.
Name: CCPxCON
Address: 0x342,0x346

Bit 76543210 
 EN OUTFMTMODE[3:0] 
Access R/WRR/WR/WR/WR/WR/W 
Reset 0x00000 

Bit 7 – EN CCP Module Enable

ValueDescription
1CCP is enabled
0CCP is disabled

Bit 5 – OUT CCP Output Data (read-only)

Bit 4 – FMT CCPxRH:L Value Alignment (PWM mode)

ValueNameDescription
xCapture modeNot used
xCompare modeNot used
1PWM modeLeft aligned format
0PWM modeRight aligned format

Bits 3:0 – MODE[3:0] CCP Mode Select

Table 30-5. CCPx Mode Select
ValueDescriptionSet CCPxIF
11xxPWM mode, PWM operationYes
1011Compare mode, Pulse output; clear TMR1(2)Yes
1010Compare mode, Pulse outputYes
1001Compare mode,Clear output(1)Yes
1000Compare mode, Set output(1)Yes
0111Capture mode, Every 16th rising edge of CCPx inputYes
0110Capture mode, Every 4th rising edge of CCPx inputYes
0101Capture mode, Every rising edge of CCPx inputYes
0100Capture mode, Every falling edge of CCPx inputYes
0011Capture mode, Every edge of CCPx inputYes
0010Compare mode,Toggle outputYes
0001Compare mode,Toggle output; clear TMR1(2)Yes
0000Disabled
The set and clear operations of the Compare mode are reset by setting MODE = ‘b0000 or EN = 0.When MODE = ‘b0001 or ‘b1011, then the timer associated with the CCP module is cleared. TMR1 is the default selection for the CCP module, so it is used for indication purposes only.