2 comparator_a used to measure resistive elements, Figure 14–7. temperature measurement systems – Texas Instruments MSP430x1xx User Manual

Page 277

Advertising
background image

Comparator_A in Applications

14-11

Comparator_A

14.4.2 Comparator_A Used to Measure Resistive Elements

The Comparator_A can be used to measure resistive elements. For example,
temperature can be converted into digital data via a thermistor, by comparing
the thermistor’s discharge time to that of a reference resistor. See Figure 14–7.

Figure 14–7. Temperature Measurement Systems

_

+

0

1

CAF

e.g.
Capture
Input of
Timer_A

CAOUT to
External Pin

Set
CAIFG

τ

2

µ

s

0

1

0

1

0

1

0

1

CA0

CA1

0

1

VCC

VCC

R(ref)

R(meas)

P2CA0

P2CA1

VCAREF

CARSEL

0
2

1

3

3

2

1 0

CAREF

0.5

×

VCC

0.25

×

VCC

CAON

C

1

0

VCC

0 V

1

0

CAON

VCC

0 V

1

0

The resistive elements are compared using a capacitor charge-discharge
cycle, as shown in Figure 14–8. This is based on a ratiometric conversion
principle, as the ratio of two capacitor-discharge times is compared. Absolute
V

CC

and the actual capacitor value are not critical, as the ratiometric principle

cancels these values out. V

CC

and the capacitor value should simply remain

constant during the conversion.

N

meas

N

ref

+

–R

meas

C

ln

V

ref

V

CC

–R

ref

C

ln

V

ref

V

CC

N

meas

N

ref

+

R

meas

R

ref

R

meas

+

R

ref

N

meas

N

ref

Advertising