weird happenings
Still plodding on with this.....
something strange is happening when I readADC10 2,w0......
I am "reading" an LDR, when it gets dark the reading falls (as expected) but if I restart the PIC it rises...and rises...but it is still getting dark so it should be falling !
Have also noted this SOMETIMES after any other event in the listing has ocurred
The supply voltage remains steady at 4.9V +/- 0.002 so I don't think it's that !
any ideas please, here is the command I am using (lines 165 to 169), full listing attached for reference only as is the cct diagram - with a few alterations from previously
readldr: sertxd(" readldr.... line 165 ",13,10)
readadc10 2,w0
sertxd("LDR = ",#w0,13,10)
pause 2000
return
Still plodding on with this.....
something strange is happening when I readADC10 2,w0......
I am "reading" an LDR, when it gets dark the reading falls (as expected) but if I restart the PIC it rises...and rises...but it is still getting dark so it should be falling !
Have also noted this SOMETIMES after any other event in the listing has ocurred
The supply voltage remains steady at 4.9V +/- 0.002 so I don't think it's that !
any ideas please, here is the command I am using (lines 165 to 169), full listing attached for reference only as is the cct diagram - with a few alterations from previously
readldr: sertxd(" readldr.... line 165 ",13,10)
readadc10 2,w0
sertxd("LDR = ",#w0,13,10)
pause 2000
return
Attachments
-
7 KB Views: 4
-
125.6 KB Views: 24
Last edited: