ah! the gosubs seems to be the problem! but now I have the problem that the a/d conversion some times fluctuates(value's are not the same every querying + 1000 some times). Where can I begin to debug? Thx !
ah! the gosubs seems to be the problem! but now I have the problem that the a/d conversion some times fluctuates(value's are not the same every querying + 1000 some times). Where can I begin to debug? Thx !
A/D readings will pretty much always fluctuate. A small RC filter on each A/D input may help. If not, you might consider putting the PIC to sleep prior to A/D readings to reduce in-circuit noise from the oscillator & internal switching.
If you think "code" may be causing the fluctuations, then simply strip down the program to nothing but reading & displaying A/D values. If it works smoothly, then take a hard look at the rest of your code.
Bookmarks