English
Language : 

PIC18F87K22 Datasheet, PDF (383/548 Pages) Microchip Technology – 64/80-Pin, High-Performance, 1-Mbit Enhanced Flash Microcontrollers with 12-Bit A/D and nanoWatt XLP Technology
PIC18F87K22 FAMILY
27.0 CHARGE TIME
MEASUREMENT UNIT (CTMU)
The Charge Time Measurement Unit (CTMU) is a
flexible analog module that provides accurate differen-
tial time measurement between pulse sources, as well
as asynchronous pulse generation. By working with
other on-chip analog modules, the CTMU can precisely
measure time, capacitance and 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 these key features:
• Up to 24 channels available for capacitive or time
measurement input
• On-chip precision current source
• Four-edge input trigger sources
• Polarity control for each edge source
• Control of edge sequence
FIGURE 27-1:
CTMU BLOCK DIAGRAM
• Control of response to edges
• Time measurement resolution of 1 nanosecond
• High-precision time measurement
• Time delay of external or internal signal
asynchronous to system clock
• Accurate current source suitable for capacitive
measurement
The CTMU works in conjunction with the A/D Converter
to provide up to 24 channels for time or charge
measurement, depending on the specific device and
the number of A/D channels available. When config-
ured for time delay, the CTMU is connected to one of
the analog comparators. The level-sensitive input edge
sources can be selected from four sources: two
external inputs or the ECCP1/ECCP2 Special Event
Triggers.
The CTMU special event can trigger the Analog-to-Digital
Converter module.
Figure 27-1 provides a block diagram of the CTMU.
CTEDG1
CTEDG2
ECCP2
ECCP1
EDGEN
EDGSEQEN
EDG1SELx
EDG1POL
EDG2SELx
EDG2POL
EDG1STAT
EDG2STAT
CTMUCON
CTMUICON
ITRIM<5:0>
IRNG<1:0>
Current Source
TGEN
IDISSEN
CTTRIG
Edge
Control
Logic
Current
Control
CTMU
Control
Logic
A/D Converter Comparator 2
Input
Pulse
Generator
Comparator 2 Output
A/D Trigger
CTPLS
 2010 Microchip Technology Inc.
Preliminary
DS39960B-page 383