late_voyager
New Member
well here we are again. board was printed and built. 2 of my volt readings are very stable, great thanks everyone... but now one reading is wandering from 150 to 700+ on Word variable W0. this value is greatly changing even if nothing connected
when 24v conected i have stable 1.49v at pin c.3?
i am using same 1/15k divider
run the test code and wandering
when 24v conected i have stable 1.49v at pin c.3?
i am using same 1/15k divider
run the test code and wandering
Code:
#picaxe 20M2
init:
pause 200
FVRSETUP FVR2048 'Set Fixed Voltage Reference = 2.048 Volts
ADCCONFIG %011 'Set ADC to FVR
let b26 = 200 ' button pause delay
Symbol bbatt = w4 'Word variable for the calibadc10 reading
Symbol sens = w8
symbol crane = w0 ' b0-6
symbol multi = 10 'multiply
symbol div = 32 ' div
Main:
debug
readadc10 C.3, crane ' 24v input
crane = crane *39
bintoascii crane,b2,b3,b4,b5,b6
serout C.0,N2400,(254,192)
serout C.0,N2400,(" ",b4,b5,".",b6," volts ")
pause 10
goto main
[code/]
[ATTACH=full]22739[/ATTACH]
nothing connected...
[ATTACH=full]22740[/ATTACH]
Attachments
-
16.1 KB Views: 19
-
22.9 KB Views: 19