V
CC
V
SS
I
CC
V
O
V
I
0
V
CC
V
I
V
CC
I
CC
CEPD.x = 1
COMP_E Operation
920
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
Comparator E (COMP_E) Module
The voltage reference generator is used to generate VREF, which can be applied to either comparator
input terminal. The CEREF1x (VREF1) and CEREF0x (VREF0) bits control the output of the voltage
generator. The CERSEL bit selects the comparator terminal to which VREF is applied. If external signals
are applied to both comparator input terminals, the internal reference generator should be turned off to
reduce current consumption. The voltage reference generator can generate a fraction of the device V
CC
or
of the voltage reference of the integrated precision voltage reference source. Vref1 is used while CEOUT
is 1, and Vref0 is used while CEOUT is 0. This allows the generation of a hysteresis without using external
components.
35.2.7 Port Disable Register (CEPD)
The comparator input and output functions are multiplexed with 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 CEPDx bits, when set, disable the corresponding Px.y input buffer (see
). When current
consumption is critical, any Px.y pin connected to analog signals should be disabled with the associated
CEPDx bits.
Selecting an input pin to the comparator multiplexer with the CEIPSEL or CEIMSEL bits automatically
disables the input buffer for that pin, regardless of the state of the associated CEPDx bit.
Figure 35-5. Transfer Characteristic and Power Dissipation in a CMOS Inverter and Buffer
35.2.8 Comparator_E Interrupts
One interrupt flag and one interrupt vector are associated with the Comparator_E.
The interrupt flag CEIFG is set on either the rising or falling edge of the comparator output, selected by
the CEIES bit. If both the CEIE and the GIE bits are set, then the CEIFG interrupt flag generates an
interrupt request.
35.2.9 Comparator_E Used to Measure Resistive Elements
The Comparator_E 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 resistor Rref is compared to Rmeas.