Freescale Semiconductor DEMO9S08DZ60 Demo Board DEMO9S08DZ60 DEMO9S08DZ60 Hoja De Datos

Los códigos de productos
DEMO9S08DZ60
Descargar
Página de 416
Chapter 10 Analog-to-Digital Converter (S08ADC12V1)
MC9S08DZ60 Series Data Sheet, Rev. 4
Freescale Semiconductor
175
10.1.5
Temperature Sensor
To use the on-chip temperature sensor, the user must perform the following:
Configure ADC for long sample with a maximum of 1 MHz clock
Convert the bandgap voltage reference channel (AD27)
— By converting the digital value of the bandgap voltage reference channel using the value of
V
BG
the user can determine V
DD
. For value of bandgap voltage, see
”.
Convert the temperature sensor channel (AD26)
— By using the calculated value of V
DD
, convert the digital value of AD26 into a voltage,
V
TEMP
 provides an approximate transfer function of the temperature sensor.
Temp = 25
-
((V
TEMP
 -V
TEMP25
)
÷
 m)
Eqn. 10-1
where:
— V
TEMP
 is the voltage of the temperature sensor channel at the ambient temperature.
— V
TEMP25
 is the voltage of the temperature sensor channel at 25
°C.
— m is the hot or cold voltage versus temperature slope in V/
°C.
For temperature calculations, use the V
TEMP25
 and m values from the ADC Electricals table.
In application code, the user reads the temperature sensor channel, calculates V
TEMP
, and compares to
V
TEMP25
. If V
TEMP
is greater than V
TEMP25
the cold slope value is applied in
. If V
TEMP
is
less than V
TEMP25
 the hot slope value is applied in
To improve accuracy the user should
calibrate the bandgap voltage reference and temperature sensor.
Calibrating at 25
°C will improve accuracy to
±
4.5
°C.
Calibration at three points, -40
°C, 25°C, and 125°C will improve accuracy to ± 2.5°C. Once calibration
has been completed, the user will need to calculate the slope for both hot and cold. In application code, the
user would then calculate the temperature using
as detailed above and then determine if the
temperature is above or below 25
°C. Once determined if the temperature is above or below 25°C, the user
can recalculate the temperature using the hot or cold slope value obtained during calibration.