Skip to main content
jpublic123
Associate
April 15, 2008
Question

ADC questions

  • April 15, 2008
  • 1 reply
  • 589 views
Posted on April 15, 2008 at 21:47

ADC questions

This topic has been closed for replies.

1 reply

jpublic123
Associate
May 17, 2011
Posted on May 17, 2011 at 11:52

I'm seeing some anomalies with the ADC readings on this part. The ADC is working. After reset, I turn on the ADC clock and wait 20mS before using the ADC. After that, every 17mS I perform conversions on all 6 ADC channels. These are done one after the other, with the ADC completion interrupt causing the current conversion result to be read and a conversion started on the next channel. I've run tests sampling the channels in both ascending (0-5) and descending (5-0) order.

The first channel converted gives ''noisier'' data than the other channels. This is true whether I measure channel 0 first, or channel 5 first. With the same input applied to channels 0 and 1, if I read channel 0 first its standard deviation is 1.27 (calculated from 10,000 samples), while for channel 1 it's 0.78. If I read channel 5 first, then the stdev for channel 0 falls to 0.78. Why is this happening?

My workaround is to do a ''throwaway'' conversion on the first channel at the start of every conversion cycle, then start the sequence of reading all 6 channels for real results. With this method the noise is consistent for all 6 channels, even if I'm reading channel 0 first.

I read some messages on the forum about improving ADC accuracy by putting the CPU in idle mode during conversions. I tried that but it didn't make any difference.

Another issue is that with the same input applied to channels 0 and 1, the ADC values from channel 1 are consistently 14-15 greater than the readings for channel 0. Is this a problem, or is it inherent to the ADC?

Thanks in advance