Datasheet
300
7766F–AVR–11/10
ATmega16/32U4
The temperature sensor and its internal driver are enabled when ADMUX value selects the tem-
perature sensor as ADC input. The propagation delay of this driver is approximatively 2µS.
Therefore two successive conversions are required. The correct temperature measurement will
be the second one.
One can also reduce this timing to one conversion by setting the ADMUX during the previous
conversion. Indeed the ADMUX can be programmed to select the temperature sensor just after
the beginning of the previous conversion start event and then the driver will be enabled 2 µS
before sampling and hold phase of temperature sensor measurement.
24.6.1 Sensor Calibration
The sensor initial tolerance is large (+/-10°C), but its characteristic is linear. Thus, if the applica-
tion requires accuracy, the firmware must include a calibration stage to use the sensor for direct
temperature measurement.
Another application of this sensor may concern the Internal Calibrated RC Oscillator, whose the
frequency can be adjusted by the user through the OSCCAL register (see Section 6.5.1 ”Oscilla-
tor Calibration Register – OSCCAL” on page 32). During the production, a calibration is done at
two temperatures (+25°C and +85°C, with a tolerance of +/-10°C
(1)
). At each temperature, the
temperature sensor value T
i
is measured and stored in EEPROM memory
(2)
, and the OSCCAL
calibration value O
i
(i.e. the value that should be set in OSCCAL register at this temperature to
have an accurate 8MHz output) is stored in another memory zone.
Thanks to these four values and the linear characteristics of the temperature sensor and Internal
RC Oscillator, firmware can easily recalibrate the RC Oscillator on-the-go in function of the tem-
perature sensor measure
(3)
(an application note describes the operation):
Figure 24-8. Linear Characterization of OSCCAL in function of T° measurement from ADC
Notes: 1. The temperature sensor calibration values cannot be used to do accurate temperature mea-
surements since the calibration temperature during production is not accurate (+/- 10°C)
2. Be aware that if EESAVE fuse is left unprogrammed, any chip erase operation will
clear the temperature sensor calibration values contained in EEPROM memory.
3. Accuracy results after a software recalibration of OSCCAL in function of T° will be
given when device will be fully characterized.
OSCCAL
T(ADC
O1
O2
T1
T2