Texas Instruments MSP430x4xx Computer Hardware User Manual


 
Comparator_A Operation
17-7Comparator_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 thermistors
capacitor discharge time to that of a reference resistor as shown in
Figure 175. A reference resister Rref is compared to Rmeas.
Figure 175. 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.