...and while testing things, here is something I just tried based on the code in my previous post using the ADCIN command:
The results are @5VDC I read 8640 and 9790 @4,2VDC (?!) but it looks to work somehow.Code:' Start program MAIN: ADCON1 = %00110000 ' I prefer to be sure to have FRC for the beginning at least VRCON = %00010000 ' Enable the VP6 reference ADCIN 13, Bat_Value ' ADCON0 = %10110100 where bits 5:2 are the 0,6V reference's channel address (1101 = 13) LCDOUT $FE,2,DEC5 Bat_Value PAUSE 1000 GOTO MAIN END




Bookmarks