Datasheet

By converting the digital value of the bandgap voltage reference channel using
the value of V
BG
the user can determine V
DD
.
Convert the temperature sensor channel (AD22)
By using the calculated value of V
DD
, convert the digital value of AD26 into a
voltage, V
TEMP
The following equation provides an approximate transfer function of the on-chip
temperature sensor for V
DD
= 5.0V, Temp = 25°C, using the ADC at f
ADCK
= 1.0 MHz
and configured for long sample.
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 in the data sheet.
In application code, you read the temperature sensor channel, calculate V
TEMP
, and
compare it to V
TEMP25
. If V
TEMP
is greater than V
TEMP25
, the cold slope value is applied
in the above equation. If V
TEMP
is less than V
TEMP25
the hot slope value is applied.
Calibrating at 25°C will improve accuracy to ±4.5°C.
Calibration at three points -40°C, 25°C, and 105°C will improve accuracy to ±2.5°C.
After calibration has been completed, you will need to calculate the slope for both hot
and cold. In application code, you can calculate the temperature as detailed above and
determine if it is above or below 25°C. After you have determined whether the
temperature is above or below 25 °C. you can recalculate the temperature using the hot or
cold slope value obtained during calibration.
9.10.2 Analog comparator (ACMP)
The analog comparator module (ACMP) provides a circuit for comparing two analog
input voltages or for comparing one analog input voltage to an internal reference voltage.
The comparator circuit is used to operate across the full range of the supply voltage (rail-
to-rail operation).
Analog
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
244 Freescale Semiconductor, Inc.