22.6.1 CCPxCON

CCP Control Register
Note:
  1. The set and clear operations of the Compare mode are reset by setting MODE = ‘0000’.
  2. When MODE = ‘0001’ or ‘1011’, 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 purpose only.
Name: CCPxCON
Offset: 0xFAC,0xFA8

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

Bit 7 – EN CCP Module Enable bit

ValueDescription
1CCP is enabled
0CCP is disabled

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

Bit 4 – FMT CCPW (Pulse-Width) Value Alignment bit

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

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

Table 22-6. CCPx Mode Select Bits
MODEOperating ModeOperationSet CCPxIF
11xxPWMPWM OperationYes
1011ComparePulse output; clear TMR1(2)Yes
1010Pulse outputYes
1001Clear output(1)Yes
1000Set output(1)Yes
0111CaptureEvery 16th rising edge of CCPx inputYes
0110Every 4th rising edge of CCPx inputYes
0101Every rising edge of CCPx inputYes
0100Every falling edge of CCPx inputYes
0011Every edge of CCPx inputYes
0010CompareToggle outputYes
0001Toggle output; clear TMR1(2)Yes
0000Disabled
The set and clear operations of the Compare mode are reset by setting MODE = ‘0000’.When MODE = ‘0001’ or ‘1011’, 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 purpose only.