Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20748

BASCOM-AVR : Fast ADC in free mode : REPLY

$
0
0
Thanks for answer but it is not what I want. "adc.bas" works in single mode (slow), "adc_int.bas" works in free mode but using interrupt. What I need is ADC in free mode without interrupts and without waiting for end of conversion. I think here [url]http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9374&highlight=adc+free[/url] is what I need: [quote:543a2449ef]the big advantage of free mode is, that the ADC samples in the background instead having you waiting for end of conversion. Nobody tells you have to use free running with ADC interrupt :) You can have it free running and simply read out the least current result., whenever you like. It only costs the time then to read out ADCH, which will be less than 1µs. However all depends on your requirements, whether for example the least current result is good enough, or if the result has to be read at an exact specified time in your code. If you use a prescaler of 16, then it takes 16 * 13 cycles for each conversion, that's 208 cycles, and that's 11.3µs which corresponds pretty well with your 12.5µs. If you wait for it, it blocks your code for that time. In case you do a series of samples, you won't get any faster either, as that's simply the ADC limits. Only if at some time in your code you need a result as fast as possible, then simply reading out ADCH in free running mode could do. [/quote:543a2449ef] But I cannot reach this :(

Viewing all articles
Browse latest Browse all 20748

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>