Datasheet
Writing zero to ADLAR right adjusts the result: ADCL = 0x70, ADCH = 0x02.
22.9. Temperature Measurement
The temperature measurement is based on an on-chip temperature sensor that is coupled to a single
ended Temperature sensor channel. Selecting the Temperature sensor channel by writing
ADMUX.MUX[4:0] to '10000' enables the temperature sensor. The internal 2.56V voltage reference must
also be selected for the ADC voltage reference source in the temperature sensor measurement. When
the temperature sensor is enabled, the ADC converter can be used in single conversion mode to
measure the voltage over the temperature sensor.
The measured voltage has a linear relationship to the temperature as described in the following table.
The voltage sensitivity is approximately 2.5mV/°C and the accuracy depends on the method of user
calibration. Typically, the measurement accuracy after a single temperature calibration is ±10°C,
assuming calibration at room temperature. Better accuracies are achieved by using two temperature
points for calibration.
Table 22-3. Temperature vs. Sensor Output Voltage (Typical Case)
Temperature -40°C +25°C +85°C
Voltage 600mV 762mV 912mV
The values described in the table above are typical values. However, due to process variations the
temperature sensor output voltage varies from one chip to another. To be capable of achieving more
accurate results the temperature measurement can be calibrated in the application software. The
software calibration requires that a calibration value is measured and stored in a register or EEPROM for
each chip, as a part of the production test. The software calibration can be done utilizing the formula:
T = k x [(ADCH << 8) | ADCL] - T
OS
where ADCH and ADCL are the ADC data registers, T is temperature in Kelvin, k is a fixed coefficient and
T
OS
is the temperature sensor offset value determined and stored into EEPROM as a part of the
production test. Typically, k is very close to 1.0 and in single-point calibration the coefficient may be
omitted. Where higher accuracy is required the slope coefficient should be evaluated based on
measurements at two temperatures.
22.9.1. User Calibration
The software calibration requires that a calibration value is measured and stored in a register or
EEPROM for each chip. The software calibration can be done utilizing the formula:
T = {[(ADCH << 8) | ADCL] - T
OS
}/k
where ADCH and ADCL are the ADC data registers, k is a fixed coefficient and T
OS
is the temperature
sensor offset value determined and stored into EEPROM.
22.9.2. Manufacturing Calibration
One can also use the calibration values available in the signature row.
The calibration values are determined from values measured during test at hot temperature which is
approximately +85°C.
The temperature in Celsius degrees can be calculated utilizing the formula:
T = {[(ADCH << 8) | ADCL] × TSGAIN} + TSOFFSET - 273
Atmel ATmega16M1/32M1/64M1 [DATASHEET]
Atmel-8209F-ATmega16M1/32M1/64M1_Datasheet_Complete-10/2016
316