English
Language : 

PIC24FV16KM204 Datasheet, PDF (147/336 Pages) Microchip Technology – General Purpose, 16-Bit Flash Microcontroller with XLP Technology Data Sheet
PIC24FV16KM204 FAMILY
13.4 Input Capture Mode
Input Capture mode is used to capture a timer value
from an independent timer base upon an event on an
input pin or other internal Trigger source. The input
capture features are useful in applications requiring
frequency (time period) and pulse measurement.
Figure 13-6 depicts a simplified block diagram of Input
Capture mode.
Input Capture mode uses a dedicated 16/32-bit, synchro-
nous, up counting timer for the capture function. The timer
value is written to the FIFO when a capture event occurs.
The internal value may be read (with a synchronization
delay) using the CCPxTMRH/L register.
To use Input Capture mode, the CCSEL bit
(CCPxCON1L<4>) must be set. The T32 and the
MOD<3:0> bits are used to select the proper Capture
mode, as shown in Table 13-3.
TABLE 13-3: INPUT CAPTURE MODES
MOD<3:0>
T32
(CCP1CONL<3:0>) (CCP1CONL<5>)
0000
0
0000
1
0001
0
0001
1
0010
0
0010
1
0011
0
0011
1
0100
0
0100
1
0101
0
0101
1
Operating Mode
Edge Detect (16-bit capture)
Edge Detect (32-bit capture)
Every Rising (16-bit capture)
Every Rising (32-bit capture)
Every Falling (16-bit capture)
Every Falling (32-bit capture)
Every Rise/Fall (16-bit capture)
Every Rise/Fall (32-bit capture)
Every 4th Rising (16-bit capture)
Every 4th Rising (32-bit capture)
Every 16th Rising (16-bit capture)
Every 16th Rising (32-bit capture)
FIGURE 13-6:
INPUT CAPTURE x BLOCK DIAGRAM
IC<2:0>
MOD<3:0>
OPS<3:0>
IC Clock
Sources
Clock
Select
Edge Detect Logic
and
Clock Synchronizer
Event and
Interrupt
Logic
Set CCPxIF
Increment
Reset
16
Trigger and
Sync Sources
Trigger and
Sync Logic
CCPxTMRH/L
4-Level FIFO Buffer
16
T32
16
CCPxBUFx
System Bus
 2013 Microchip Technology Inc.
Advance Information
DS33030A-page 147