the old fart
Senior Member
Hi guys,
Need a bit of help with this please.
I'm using ADC0,1,2,3
Signal into ADC 1&3 is very low, millivolts.
fvrsetup can config for 1.024v
Can I setup individually?
Rough code, testing..
TOF
Need a bit of help with this please.
I'm using ADC0,1,2,3
Signal into ADC 1&3 is very low, millivolts.
fvrsetup can config for 1.024v
Can I setup individually?
Rough code, testing..
Code:
;40x2 test
setfreq m8
;dirsa=%00001111
dirsb=255
dirsc=255
dirsd=255
adcsetup = 4 ; adc 0,1,2,3 A.0 A.1 A.2 A.3
symbol baud=n2400
symbol oled= B.7
symbol aux1=b4
symbol aux2=b5
symbol V1=W10
symbol A1=w11
symbol V2=w12
symbol A2=w13
serout oled,baud,(254,1)
pause 100
high d.4 ;
start:
main:
high b.6
if pind.2=1 or v2>73 then ; low 2 voltage 2 >7.3 volts
high d.1
high d.4
low d.5
low d.0
endif
if pind.3=1 then ; high 2
high d.0
high d.5
low d.4
low d.1
endif
;pause 100
readadc A.0,V1
readadc10 A.1,A1
readadc A.2,V2
READADC10 A.3,A2
low b.6
SEROUT OLED,BAUD,(254,128,"ADC0=",#V1," ")
SEROUT OLED,BAUD,(254,138,"ADC1=",#A1," ")
SEROUT OLED,BAUD,(254,192,"ADC2=",#V2," ")
SEROUT OLED,BAUD,(254,202,"ADC3=",#A2," ")
v2=v2*18/23
;w12=w12/43
aux1=v2/10
aux2=v2-aux1
debug
SEROUT OLED,BAUD,(254,212,"V2=",#aux1,".",#aux2,"V ")
a2=a2*80
SEROUT OLED,BAUD,(254,224,"A2=",#a2,"mA ")
goto main