
2011-2012 Microchip Technology Inc.
Preliminary
DS61168D-page 217
PIC32MX1XX/2XX
24.0 CHARGE TIME
MEASUREMENT UNIT (CTMU)
The Charge Time Measurement Unit (CTMU) is a flex-
ible analog module that has a configurable current
source with a digital configuration circuit built around it.
The CTMU can be used for differential time measure-
ment between pulse sources and can be used for gen-
erating an asynchronous pulse. By working with other
on-chip analog modules, the CTMU can be used for
high resolution time measurement, measure capaci-
tance, measure relative changes in capacitance or
generate output pulses with a specific time delay. The
CTMU is ideal for interfacing with capacitive-based
sensors.
The module includes the following key features:
Up to 13 channels available for capacitive or time
measurement input
On-chip precision current source
16-edge input trigger sources
Selection of edge or level-sensitive inputs
Polarity control for each edge source
Control of edge sequence
Control of response to edges
High precision time measurement
Time delay of external or internal signal asynchro-
nous to system clock
Integrated temperature sensing diode
Control of current source during auto-sampling
Four current source ranges
Time measurement resolution of one nanosecond
FIGURE 24-1:
CTMU BLOCK DIAGRAM
Note 1: This data sheet summarizes the fea-
tures 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 37. “Charge
Time Measurement Unit (CTMU)”
(DS61167)
in
the
“PIC32
Family
Reference Manual”, which is availabl
e 2: Some registers and associated bits
described in this section may not be
available on all devices. Refer to
this data sheet for device-specific register
and bit information.
CTED1
CTED13
Current Source
Edge
Control
Logic
CTMUCON1 or CTMUCON2
Pulse
Generator
CTMUI
Comparator 2
Timer1
OC1
Current
Control
ITRIM<5:0>
IRNG<1:0>
CTMUICON
CTMU
Control
Logic
EDG1STAT
EDG2STAT
ADC
CTPLS
IC1-IC3
CMP1-CMP3
C2INB
CDelay
CTMUT
Temperature
Sensor
Current Control Selection
TGEN
EDG1STAT, EDG2STAT
CTMUT
0
EDG1STAT = EDG2STAT
CTMUI
0
EDG1STAT
≠ EDG2STAT
CTMUP
1
EDG1STAT
≠ EDG2STAT
No Connect
1
EDG1STAT = EDG2STAT
Trigger
TGEN
CTMUP
External capacitor
for pulse generation
(To ADC S&H capacitor)
(To ADC)
PBCLK