Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/30/03 19:28
Read: times


 
#57529 - Keep micro quiet during conversion!
Responding to: ???'s previous message
Also sometimes it is a good idea to write code that has some kind of way to get out of the tight loop polling for the A/D converter to be done. You could experience a situation where you got into this loop when the A/D was not doing its thing and you could stay there forever (or until the watchdog bit you).

There's another reason, why using such polling scheme is not wise: Introduce of additional error due to digital noise! While ADC is working, micro should not show any activity. May be there's no benefit with 8bit ADC, but when using higher resolution converters, there is!

It's the best to invoke idle mode of micro directly after activating ADC. Then, digital buses are quiet (as quiet as can be!), only oscillator keeps on running. After ADC has finished its work, a hardware interrupt will then terminate the idle. Of course, ADC must be able to produce interrupt signal at end of conversion.
This scheme should always be used, when using micro with built-in ADC, especially, when ADC shows more than 8bit resolution. Never use polling in this case!!

When there's no hardware interrupt and idle mode ability, especially when ADC is sitting outside, still noise can be reduced by some amount, when having micro running in a waiting loop for the duration of aquisition and conversion phase. This will also stop activity on digital buses and keep them as quiet as possible. But, of course, this only makes sense, when micro has its code space inside, so that no external memory accesses have to be done. And if there's no other device accessing the buses during conversion. Additionally, it's wise to disable ALE, when possible.
Using this waiting loop before accessing ADC takes a bit more time, because waiting loop must be longer than conversion time and all tolerances must be taken into account. But if it helps to resume precision of ADC, this will not hurt in most cases.

Kai

List of 7 messages in thread
TopicAuthorDate
Scaling by Division Help            01/01/70 00:00      
   RE: Scaling by Division Help            01/01/70 00:00      
   RE: Scaling by Division Help            01/01/70 00:00      
      Keep micro quiet during conversion!            01/01/70 00:00      
   RE: Scaling by Division Help            01/01/70 00:00      
   RE: Scaling by Division Help            01/01/70 00:00      
      RE: Scaling by Division Help            01/01/70 00:00      

Back to Subject List