This section describes the steps involved in calculating the die
temperature, T
MEAS:
- 1.Obtain the ADC count value of the
measured analog voltage: The analog output voltage, VMEAS is
converted to a digital count value by the Analog-to-Digital Converter (ADC) and
is referred to as ADCMEAS.
- 2.Obtain the Gain value, from the
DIA table. This parameter is TSLR1 for the low range setting or TSHR1 for the
high range setting of the temperature indicator module. Refer to the DIA table
in the “Memory Organization” chapter for more details.
- 3.Obtain the Offset value, from the
DIA table. This parameter is TSLR3 for the low range setting or TSHR3 for the
high range setting of the temperature indicator module. Refer to the DIA table
in the “Memory Organization” chapter for more details.
The following equation provides an estimate for the die temperature based on
the above parameters:
Where:
ADCMEAS = ADC reading at
temperature being estimated
Gain = Gain value stored in the DIA
table
Offset = Offset Value stored in the DIA table
Note: It is recommended to take the average
of ten measurements of ADCMEAS to reduce noise and improve accuracy.
Temperature Calculation
(C)
// offset is int16_t data type
// gain is int16_t data type
// ADC_MEAS is uint16_t data type
// Temp_in_C is __int24_t data type
ADC_MEAS = ((ADRESH << 8) + ADRESL); // Store the ADC Result
Temp_in_C = ADC_MEAS * gain; // Multiply the ADC Result by Gain and
// store the result in a signed variable
Temp_in_C >>= 8; // Divide (ADC Result * Gain) by 256
Temp_in_C = Temp_in_C + (offset << 2); // Apply (Offset * 4) and store the
// calculated temperature