27.4.3 Input Capture Mode

When CCSEL = 1, the module is configured for Input Capture mode. This mode is used to capture a timer value from an independent timer base on the occurrence of an event on an input pin. This mode is useful in applications requiring frequency (time period) and pulse measurement.

Input Capture mode uses the CCPxTMR registers as a dedicated 16/32-bit synchronous, up counting timer used for event capture. This value is written to the FIFO buffer when a capture event occurs. The internal value may also be read with a synchronization delay from the CCPxTMR register.

Input Capture mode is the only major mode available when CCSEL is set. The T32 and the MOD[3:0] bits determine the various Capture modes, as shown in Table 27-14.

Figure 27-5 provides a simplified block diagram of the Input Capture mode.

Table 27-14. Capture Modes
T32 (CCPxCON1[15])MOD[3:0] (CCPxCON1[3:0])Operating Mode
00000Edge Detect (16-bit capture)
10000Edge Detect (32-bit capture)
00001Every Rising (16-bit capture)
10001Every Rising (32-bit capture)
00010Every Falling (16-bit capture)
10010Every Falling (32-bit capture)
00011Every Rise/Fall (16-bit capture)
10011Every Rise/Fall (32-bit capture)
00100Every 4th Rising (16-bit capture)
10100Every 4th Rising (32-bit capture)
00101Every 16th Rising (16-bit capture)
10101Every 16th Rising (32-bit capture)
Figure 27-5. Input Capture Block Diagram