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)
ADC_MEAS = ((ADRESH << 8) + ADRESL);
Temp_in_C = (int24_t)(ADC_MEAS) * gain;
Temp_in_C = Temp_in_C / 256;
Temp_in_C = Temp_in_C + offset;
Temp_in_C = Temp_in_C / 10;
Important: If the application requires more precise temperature measurement,
additional calibrations steps will be necessary. For these applications, two-point or
three-point calibration is recommended. For additional information on two-point
calibration method, refer to the following Microchip application note, available at the
corporate website (
www.microchip.com):
- AN2798, “Using the
PIC16F/PIC18F Ground Referenced Temperature Indicator Module”