7 comparator_a used to measure resistive elements – Texas Instruments MSP430x4xx User Manual

Page 327

Advertising
background image

Comparator_A Operation

17-7

Comparator_A

17.2.7 Comparator_A Used to Measure Resistive Elements

The Comparator_A 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
Figure 17−5. A reference resister Rref is compared to Rmeas.

Figure 17−5. Temperature Measurement System

+

CA0

CCI1B
Capture
Input
Of Timer_A

+

Rmeas

Rref

Px.x

Px.y

0.25xV

CC

The MSP430 resources used to calculate the temperature sensed by Rmeas
are:

-

Two digital I/O pins to charge and discharge the capacitor.

-

I/O set to output high (V

CC

) to charge capacitor, reset to discharge.

-

I/O switched to high-impedance input with CAPDx set when not in use.

-

One output charges and discharges the capacitor via Rref.

-

One output discharges capacitor via Rmeas.

-

The + terminal is connected to the positive terminal of the capacitor.

-

The – terminal is connected to a reference level, for example 0.25 x V

CC

.

-

The output filter should be used to minimize switching noise.

-

CAOUT used to gate Timer_A CCI1B, capturing capacitor discharge time.

More than one resistive element can be measured. Additional elements are
connected to CA0 with available I/O pins and switched to high impedance
when not being measured.

Advertising