Hi
I am running a 40x2 with the following program:
I am trying to read Volts from a battery on pin B.1.
I am getting nowhere fast. I do have an ADCSETUP in initialisation as follow:
What am I screwing up here ? Where do I make an error ?
Please help !
I am running a 40x2 with the following program:
Code:
tempw1=0
for cntb2=1 to 15
readadc10 b.1,tempw2
tempw1=tempw1+tempw2
pause 5
next cntb2
tempw2=tempw1/15
sertxd(#tempw2,cr,lf)
tempw1=tempw2*493/100 '= mV
cal3=tempw1/1000 min 0 '= whole Volts
cal4=tempw1//1000 min 0 '= decimal Volts
sertxd(#cal3,"/",#cal4,cr,lf)
I am getting nowhere fast. I do have an ADCSETUP in initialisation as follow:
Code:
let adcsetup = %0000000001111111
let adcsetup2 = %0000000000110000
Please help !