If I remeber right, your PIC has comparators and ADC. So, read for me the DS and find the appropriate registers to setup.
Alternatively use the include file from Darrel and get over with.
http://www.picbasic.co.uk/forum/show...ht=all_digital
Ioannis
Bookmarks