4 comparator_a in applications – Texas Instruments MSP430x1xx User Manual

Page 275

Advertising
background image

Comparator_A in Applications

14-9

Comparator_A

14.4 Comparator_A in Applications

The Comparator_A can be used to:

-

Measure resistive elements

-

Detect external voltage or current levels

-

Measure external voltage and current sources

-

Measure the voltage of a battery used in the system

14.4.1 Analog Signals at Digital Inputs

Typically, Comparator_A inputs are multiplexed with digital I/O pins. When
analog signals are applied to these digital CMOS gates, parasitic current can
flow from the positive terminal (V

DD

, V

CC

) to the negative terminal (V

SS

, GND).

See Figure 14–4. This parasitic current occurs if the input voltage is around
the transition level of the input gate.

Figure 14–4. Transfer Characteristic and Power Dissipation in a CMOS Inverter/Buffer

V

CC

V

SS

I

CC

V

O

VI

0

V

CC

VI

Figure 14–5. Transfer Characteristic and Power Dissipation in a CMOS Gate

V

CC

V

SS

I

CC

V

O

VI

0

V

CC

VI

V

CC

I

CC

CAPD.x = 1

MSP430 devices with the Comparator_A module have additional circuitry on
the associated digital I/O port pins to allow the input buffers to be disabled (see
Figure 14–5). The buffers are enabled or disabled with the CAPD.x bits (see
section 14.3.3). Note that the circuitry is added to all pins of the associated I/O
port, not just the pins for the Comparator_A inputs.

Disabling the input buffer for a specific pin will disable the parasitic current flow
and therefore reduce overall current consumption. It is important to disable the
buffer for any I/O pin that is not being actively driven if current consumption is
critical (see Figure 14–6).

Advertising