English
Language : 

PIC32MX1XX Datasheet, PDF (159/320 Pages) Microchip Technology – 32-bit Microcontrollers (up to 128 KB Flash and 32 KB SRAM) with Audio and Graphics Interfaces, USB, and Advanced Analog
PIC32MX1XX/2XX
14.0 INPUT CAPTURE
Note 1: This data sheet summarizes the features
of the PIC32MX1XX/2XX family of
devices. It is not intended to be a
comprehensive reference source. To
complement the information in this data
sheet, refer to Section 15. “Input
Capture” (DS61122) of the “PIC32
Family Reference Manual”, which is
available from the Microchip web site
(www.microchip.com/PIC32).
2: Some registers and associated bits
described in this section may not be
available on all devices. Refer to
Section 4.0 “Memory Organization” in
this data sheet for device-specific register
and bit information.
The Input Capture module is useful in applications
requiring frequency (period) and pulse measurement.
The Input Capture module captures the 16-bit or 32-bit
value of the selected Time Base registers when an
event occurs at the ICx pin. The following events cause
capture events:
1. Simple capture event modes
- Capture timer value on every falling edge of
input at ICx pin
- Capture timer value on every rising edge of
input at ICx pin
2. Capture timer value on every edge (rising and
falling)
3. Capture timer value on every edge (rising and
falling), specified edge first.
4. Prescaler capture event modes
- Capture timer value on every 4th rising
edge of input at ICx pin
- Capture timer value on every 16th rising
edge of input at ICx pin
Each input capture channel can select between one of
two 16-bit timers (Timer2 or Timer3) for the time base,
or two 16-bit timers (Timer2 and Timer3) together to
form a 32-bit timer. The selected timer can use either
an internal or external clock.
Other operational features include:
• Device wake-up from capture pin during CPU
Sleep and Idle modes
• Interrupt on input capture event
• 4-word FIFO buffer for capture values
Interrupt optionally generated after 1, 2, 3 or 4
buffer locations are filled
• Input capture can also be used to provide
additional sources of external interrupts
FIGURE 14-1:
INPUT CAPTURE BLOCK DIAGRAM
FEDGE
ICM<2:0>
Specified/Every
Edge Mode
110
ICx pin
Prescaler Mode
(16th Rising Edge)
Prescaler Mode
(4th Rising Edge)
Rising Edge Mode
Falling Edge Mode
101
TMR2 TMR3
C32/ICTMR
100
CaptureEvent
FIFO CONTROL
011
To CPU
ICxBUF
010
FIFO
Edge Detection
001
Mode
Sleep/Idle
Wake-up Mode
ICI<1:0>
/N
Note: An ‘x’ in a signal, register or bit name denotes the number of the capture channel.
ICM<2:0>
Set Flag ICxIF
(In IFSx Register)
001
111
© 2011-2012 Microchip Technology Inc.
Preliminary
DS61168D-page 159