Michael Gettis

ADC works once but not twice [M9S08QG8]

Discussion created by Michael Gettis on Dec 22, 2006
Latest reply on Jan 5, 2007 by Michael Gettis
Hi,
 
My problem is as follows:
 
I initialize the ADC and can read voltages off of Channel 0.  However if I try to read the measurement off of the temperature sensor channel after reading a voltage from Channel 0, the channel of the ADC doesn't change.
 
I have tried to read both the Bandgap reference and the temp sensor after setting the ADC to use channel 0, but to no avail.  If I read either of these before setting the ADC to channel 0 I have no problem.  Both readings are correct.
 
Any thoughts?  Is there something I can do before I do the reading of either the temp of bandgap reference to make sure I don't get another reading from Channel 0?  I am certain I am changed the channel correctly using the ADCSC1 register.
 
Thanks.

Outcomes