AnsweredAssumed Answered

Continuous ADC

Question asked by David Grimes on Aug 25, 2014
Latest reply on Sep 11, 2014 by David Grimes

I am using continuous conversion mode for ADC to convert one pin and the internal temperature sensor on a QD4. The PE bean is set for prescaler 8, long sample, with 10-bit right format. The code I am attempting within my Main loop is:


ReadADC(uint8_t channel)


TWREG tmpTwreg;

if(channel == 0) /* ADC Pin 3 */

{ADCSC1 = 0x03U;}

else if (channel == 1) /* Internal TempSensor */

{ADCSC1 = 0x1AU;}


if (ADCSC1_COCO == 1)

tmpTwreg.b.high = ADCRH;

tmpTwreg.b.low = ADCRL;

return (word)((tmpTwreg.w) << 5);

This gives me no results, why is continuous mode not providing data to ADCRH and ADCRL?

Thanks, D