I have a design using the ATtiny461. Currently I have ADC conversions running on 4 pins using the internal 1.1v reference. This seems to work fine. I am putting the CPU to sleep using set_sleep_mode( SLEEP_MODE_ADC ), then for each conversion, setting ADMUX and kicking off the conversion using sleep_mode(). The interrupt fires when it is complete, I have an EMPTY_INTERRUPT( ADC_vect ); handler, the CPU wakes up, and I return the value in ADC.
For the hardware design we are wondering if we can use the 1.1V reference for 3 of the 4 pins I'm sampling, and our VCC as the reference for the 4th pin. This 4th pin would be a battery voltage monitor.
Given that I can't set the voltage reference per channel, but can switch it on the fly, what do I need to worry about here? Has anyone done this? Specifically I'm wondering about:
The 4th pin will generally have a higher voltage, like 3.6V, on it all the time, even while the ADC voltage reference is set to 1.1V.
The other three pins will have voltages under the 1.1V reference at all times.
Is this combination possibly damaging to the chip?
I'd plan to switch references on the fly when I want to read the 4th pin -- should I insert fixed delay times to allow the hardware to settle after changing references?
The datasheet seems to suggest that the voltage reference is on when the ADC is enabled and with startup time of typically 40 microseconds. It doesn't seem to give much guidance on what to do when changing reference, except to say that "The first ADC conversion result after switching reference voltage source may be inaccurate, and the user is advised to discard this result."
Any experiences or thoughts to share?