Hi,
THERE'S NO NEED TO SHOUT, WE HEAR YOU LOUD AND CLEAR!
Think about that last statement for a while.
When exactly do you expect FBV be equal to itself + 30? That's simply never going to evalute true because it will always compare itself to a larger value.
In PBP bytes and words are unsigned, they can never be less then zero. So something like IF A > 0 THEN will always evalute true.
When you do ADCIN 0, Volt the variable Volt will always be positive so FBV=FBV+Volt will keep accumulating FBV over and over and over again untill it overflows and starts over.
Finally, in the code in your first post you have DEFINE OSE 16, that's not correct and you don't seem to do any sort of setup for the ADC, manually or with DEFINEs - check the manual.
/Henrik.
Bookmarks