I have a device that continuously measures the value of 3 sensors connected to 3 ADC pins and working at 5V reference, so I have two options for voltage reference selection:
- Connecting AREF pin to 5V supply (REFS=00)
- Connecting AREF to a 100nF capacitor and choose AVcc as reference (REFS=01)
Till here everything works fine. I also want to measure chip temperature using the internal temperature sensor (ADC8), and as the datasheet says I must select the 1.1V internal voltage reference, so the first above options can not be used, If I choose the second option selecting the 1.1V reference while the capacitor is charged with 5V (due to other pins measurements) and again selecting back AVcc reference doesn't cause error in ADC measurement?
I decided to read the internal temperature sensor without changing the reference voltage to 1.1V. So I read 50 samples and divided the sum to 11 (because I used 5V reference instead of 1.1V), but the result is about 0x170 (~76 deg C) that is incorrect.
Anyone can solve my problem?