Cool, something to play with tonight.
So is the purpose of this so that the A/D conversion is performed in a quieter condition then normal non-sleeping condition? I have noticed that on the code I've posted that if I perform just one read of the bandgap voltage it has not settled down to a stable count value. Three reads is OK, within a count or two, and four has the same stable count reading that stays the same no matter how long the function continues. I recall reading in the datasheet about having to perform multiple A/D conversions before obtaining a stable reading, but I thought that was only when changing voltage references, which I'm not doing?
Again thanks for posting the code.
Lefty