
dsPIC33F Family Reference Manual
DS70198C-page 12-2 © 2009 Microchip Technology Inc.
12.1 INTRODUCTION
This section describes the Input Capture module and its associated operational modes. The
Input Capture module is used to capture a timer value from one of the two selectable time bases
upon an event on an input pin. The Input Capture features are quite useful in applications that
require frequency (time period) and pulse measurement. Figure 12-1 depicts a simplified block
diagram of the Input Capture module.
The Input Capture module has multiple operating modes. The operating modes are selected via
the Input Capture Control (ICxCON) register and include:
• Capture timer value on every falling edge of the input applied at the ICx pin
• Capture timer value on every rising edge of the input applied at the ICx pin
• Capture timer value on every 4th rising edge of the input applied at the ICx pin
• Capture timer value on every 16th rising edge of the input applied at the ICx pin
• Capture timer value on every rising and every falling edge of the input applied at the ICx pin
• Device wake-up from Sleep and Idle mode on the rising edge of the input applied at the ICx
pin
The Input Capture module has a four level First-In First-Out (FIFO) buffer. The user-assigned
application can select the number of capture events required to generate a CPU interrupt.
Figure 12-1: Input Capture Block Diagram
Note: Each dsPIC33F device variant has one or more Input Capture modules. An ‘x’ used
in the names of pins, control/status bits and registers denotes the particular Input
Capture module number. Refer to the specific device data sheets for more details.
FIFO CONTROL
ICxBUF
TMR2 TMR3
Capture
Event
/N
FIFO
ICI<1:0>
ICM<2:0>
ICM<2:0>
101
100
011
010
001
001
111
To CPU
Set Flag ICxIF
(in IFSx Register)
Rising Edge Mode
Prescaler Mode
(4th Rising Edge)
Falling Edge Mode
Edge Detection
Prescaler Mode
(16th Rising Edge)
Sleep/Idle
Wake-up Mode
ICTMR
ICx pin
Mode
Comentarios a estos manuales