Task: Compare the measured temperature from Internal Temperature Sensor
(ADC8) with temperature vs. sensor output voltage defined in Table Temperature vs.
Sensor Output Voltage (Typical Case) of the ATtiny88 datasheet.
This can be done either in single conversion mode, or free running mode if a
continuous temperature monitoring is required.
The steps to be followed are the same as mentioned in
Single Conversion Mode and
Free Running mode, with one exception:
- Select ADC channel 8 by writing
the Analog Channel Selection bit group in the ADC Multiplexer Selection register
(ADMUX.MUX) to '0b1000'
Test Steps- Build the project and load the
hex file into the device.
- Make the arrangements on STK600
as described in the beginning of the section.
- Compare the measured temperature
from the internal temperature sensor, with temperature vs. sensor output voltage
defined in Table 17-2 of the data sheet.
- If the measured temperature from
the internal temperature sensor is less than the temperature vs. sensor output
voltage defined in Table 17-2, the LED0 connected to PB0 will be ON, otherwise
OFF. LED1 connected to PB1 is always twinkling, indicating the project is
running.