I am trying to monitor my supply rail (battery) I tried a potential divider and used an ADC input, but maybe because my two resistors were not correct values, my results were not very good (eratic low/high value.
Now trying this code
At 4.5 volts I get a figure of 44
At 4 volts, it alternates between 29 and 216?
Now trying this code
Code:
Main:
CalibAdc10 b0
B0 = 10476 / b0
SerTxd( "circuit's voltage ", #b0, CR, LF )
PAUSE 2000
Goto main
At 4 volts, it alternates between 29 and 216?