User Manual

ChipKIT Pro MX4 Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of
their respective owners.
Page 23 of 37
The PIC32 microcontroller provides five input capture units. An input capture unit works in conjunction with a
timer and monitors the state of an associated pin. When the pin changes state, the current value of the timer is
captured. The input capture units can be used with either Timer2 or Timer3.
The input capture unit can be programmed to be sensitive to either a rising edge, a falling edge, or both edges on
the input pin. An interrupt can also be signaled when an input capture is triggered. Each input capture has a four
level deep FIFO that can buffer up to four capture events.
For detailed information on the operation and use of the input capture units, refer to the PIC32 Family Reference
Manual, Section 15, Input Capture.
The following gives the Pmod connector position, chipKIT pin number, and microcontroller port and bit number for
the input capture units input pins:
IC1 – JH-09, digital pin 54, RD08
IC2 – JD-03, digital pin 26, RD09
IC3 – JD-03, digital pin 30, RD10
IC4 – JE-09, digital pin 38, RD11
IC5 – JK-09, digital pin 70, RD12
When using the MPIDE software, the symbols PIN_IC1, PIN_IC2, PIN_IC3, PIN_IC4, and PIN_IC5 can be used to
access the capture input pins.
Use of the input capture units is not currently supported in the MPIDE software. This will be added in a future
version.
17 External Interrupts
The PIC32 microcontroller provides five external interrupt inputs. An external interrupt input can be used to
generate an interrupt to the microprocessor CPU when the pin changes state. They can be programmed to
interrupt on a rising edge or a falling edge on the pin.
Refer to the PIC32 Family Reference Manual, Section 8, Interrupts for more information on the operation of the
external interrupts.
These are accessed using the attachInterrupt() and detachInterrupt() functions when using the MPIDE software,.
The interrupt number is specified using the numbers 0-4, or preferably, the symbols EXT_INT0 through EXT_INT4.
The following gives Pmod connector position, chipKIT pin number, and microcontroller I/O port and bit number:
INT0 – JH-08, digital pin 53, RD0
INT1 – JH-07, digital pin 52, RE8
INT2 – JE-07, digital pin 36, RE9
INT3 – JF-01, digital pin 40, RA14
INT4 – JF-02, digital pin 41, RA15
18 RTCC
The PIC32 microcontroller contains a low frequency oscillator and Real Time Clock/Calendar circuit, RTCC, that can
be used to maintain time and date information. The operation of the RTCC requires a 32.768Khz frequency source.
The crystal X2 position, just above and on the right of the PIC32 microcontroller, IC1, is provided for the user to