
Rref
Rmeas
+
-
0.25 × V
CC
Capture
Input Of a Timer
Cd0
Px.x
Px.y
V
C
C
V
S
S
I
CC
V
O
V
I
0
V
CC
V
I
V
CC
I
CC
CDPD.x = 1
Comparator_D Operation
17.2.7 Comparator_D, Port Disable Register CDPD
The comparator input and output functions are multiplexed with the associated I/O port pins, which are
digital CMOS gates. When analog signals are applied to digital CMOS gates, parasitic current can flow
from V
CC
to GND. This parasitic current occurs if the input voltage is near the transition level of the gate.
Disabling the port pin buffer eliminates the parasitic current flow and therefore reduces overall current
consumption.
The CDPDx bits, when set, disable the corresponding Px.y input buffer as shown in
. When
current consumption is critical, any Px.y pin connected to analog signals should be disabled with their
associated CDPDx bits.
Selecting an input pin to the comparator multiplexer with the CDIPSEL or CDIMSEL bits automatically
disables the input buffer for that pin, regardless of the state of the associated CDPDx bit.
Figure 17-5. Transfer Characteristic and Power Dissipation in a CMOS Inverter/Buffer
17.2.8 Comparator_D Interrupts
One interrupt flag and one interrupt vector is associated with the Comparator_D.
The interrupt flag CDIFG is set on either the rising or falling edge of the comparator output, selected by
the CDIES bit. If both the CDIE and the GIE bits are set, then the CDIFG interrupt flag generates an
interrupt request.
17.2.9 Comparator_D Used to Measure Resistive Elements
The Comparator_D can be optimized to precisely measure resistive elements using single slope analog-
to-digital conversion. For example, temperature can be converted into digital data using a thermistor, by
comparing the thermistor's capacitor discharge time to that of a reference resistor as shown in
. A reference resister Rref is compared to Rmeas.
Figure 17-6. Temperature Measurement System
467
SLAU272C – May 2011 – Revised November 2013
Comparator_D
Copyright © 2011–2013, Texas Instruments Incorporated