You don't have to first do a "manual conversion" (via the GO/DONE bit) and then do a ADCIN (which basically does the same thing for you).
If you're going to use ADCIN then add a DEFINE ADC_BITS 10. If you're going to use the "manual method" just do what Ioannis showed and get rid of the ADCIN command.
And once you DO have your 10-bit resuly this won't work because baty will never be >1050 since the maximum result returned by the 10 bit ADC is 1023:
Code:
if baty > 1050 then
gosub OK
endif
/Henrik.
Bookmarks