I doubt that a tight loop and a register polling method will work. try working around the example 2 of this one
http://www.picbasic.co.uk/forum/show...1&postcount=11
In the ISR you may set a flag to tell the main to read the ADCs. To avoid waste of time and void some interrupts, i would recommend to set/read the ADCs register instead of using ADCIN. A short asm Delay loop, or use internal timer, OR a tight PAUSEUS x loop for your acquisition time.
The use of instant interrupts OR asm, could be the best and smarter choice. Rule #1, never waste your time in ISR... this is what 'Wait' do ?.
Let us know what's happen now.
Last edited by mister_e; - 2nd November 2006 at 17:54.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks