Thanks Paul. I fixed the problem considering your catch.
I make the loop value the end number so it exits the loop.
Code:
XB=303
for XA=0 to 150
XB=XB-2
if xf=XA then
xf=XB
XA=150 'once we have the match, lets exit immediately as Paul mentioned above.
endif
next XA
Also, Thanks to you Jumper. I see what you are saying about ADCON1 but I have no issue with that register. I am now getting the correct results;
I found the bug :-)
------------
Last edited by sayzer; - 11th May 2006 at 13:30.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks