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.9.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).
The ACMP features four different inputs muxed with both positive and negative inputs to
the ACMP. One is fixed connected to built-in DAC output. ACMP0 and ACMP1 are
externally mapped on pinouts. ACMP2 is reserved.
When using the bandgap reference voltage as the reference voltage to the built-in DAC,
the user must enable the bandgap buffer by setting BGBE =1 in SPMSC1. For value of
bandgap voltage reference see
Chapter 9 Chip configurations
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
NXP Semiconductors
191
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...