Hardware Reference
In-Depth Information
delayby10us(2);
ATD0CTL3 5 0x0A; /* perform one conversion */
ATD0CTL4 5 0x25; /* four cycles sample time, prescaler set to 12 */
}
When this program is running on the demo board, you can turn the potentiometer and see
the voltage value changes on the LCD display.
12.6 Using the Temperature Sensor TC1047A
The TC1047A is a three-pin temperature sensor whose voltage output is directly propor-
tional to the measured temperature. The TC1047A can accurately measure temperatures from
240
°
C with a power supply from 2.7 to 5.5 V.
The output voltage range for these devices is typically 100 mV at 240
C to 125
°
°
C, 500 mV at
0
°
C, 750 mV at 125
°
C, and 11.75 V at 1125
°
C. As shown in Figure 12.17, the TC1047A
has a 10 mV/
°
C voltage slope output response.
V OUT
1.75
V SS
1.4
3
0.9
TC1047A
0.5
1
2
0.1
V OUT
V DD
0
40
90
125
-40
Temperature
Figure 12.17 TC1047A V OUT versus temperature characteristic
Example 12.9
Describe a circuit connection and the required program to build a digital thermometer.
Display the temperature in three integral and one fractional digits using the LCD. Measure and
display the temperature over the whole range of TC1047A, that is, 240
C. Update
the display data five times per second and assume that the HCS12 operates with a 24-MHz
E-clock.
Solution: Since the voltage output of the TC1047A is from 0.1 to 1.75 V for the temperature
range of 240
°
C to 1125
°
°
C through 125
°
C, we need to use the circuit shown in Figure 12.7c to perform the
 
Search WWH ::




Custom Search