English
Language : 

ATTINY48_1 Datasheet, PDF (170/266 Pages) ATMEL Corporation – 8-bit Microcontroller with 4/8K Bytes In-System Programmable Flash
register to “1000” enables the temperature sensor. The internal 1.1V 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 Table 17-2
The sensitivity is approximately 1 LSB / °C and the accuracy depends on the method of user cal-
ibration. 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 17-2. Temperature vs. Sensor Output Voltage (Typical Case)
Temperature
-40°C
+25°C
ADC
230 LSB
300 LSB
+85°C
370 LSB
The values described in Table 17-2 are typical values. However, due to process variation 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 soft-
ware. The sofware calibration can be done using the formula:
T = k * [(ADCH << 8) | ADCL] + TOS
where ADCH and ADCL are the ADC data registers, k is the fixed slope coefficient and TOS is the
temperature sensor offset. 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.
17.13 Register Description
17.13.1 ADMUX – ADC Multiplexer Selection Register
Bit
Read/Write
Initial Value
7
6
5
4
–
REFS0 ADLAR
–
R
R/W
R/W
R
0
0
0
0
3
MUX3
R/W
0
2
MUX2
R/W
0
1
MUX1
R/W
0
0
MUX0
R/W
0
ADMUX
• Bits 7,4 – Res: Reserved Bits
These bits are reserved and will always read zero.
• Bit 6 – REFS0: Reference Selection Bits
This bit select the voltage reference for the ADC, as shown in Table 17-3. If this bit is changed
during a conversion, the change will not go in effect until this conversion is complete (ADIF in
ADCSRA is set).
Table 17-3. Voltage Reference Selections for ADC
REFS0 Voltage Reference Selection
0
Internal 1.1V Voltage Reference
1
AVCC Reference
170 ATtiny48/88
8008C–AVR–03/09