Hello Again Sougata,
I got it to work with the code below. Using a 10 microfarad capacitor I get a value for scale of 204 and the B0 variable shows 255. I haven't tried in my program yet and I'm not familiar with the usual values used for the POT command but 10 microfarads seems a little high and I would think it would really slow down the read. Maybe if I get a different LDR closer to the 50K maximum value I might be able to get away with using a smaller value capacitor? Anyways I'll try it in my program to see how it works, in the meantime what do you think about having to use a 10 microfarad cap for the LDR?
For scale = 1 To 255
POT PORTD.0,scale,B0
If (B0 > 253) Then calibrated
Next scale
LCDOut $fe, 1,"S = ",DEC scale," B0 = ",DEC B0
Stop
calibrated:
LCDOut $fe, $c0,"S = ",DEC scale , " B0 = ", DEC B0
Stop
Thanks
jessey




Bookmarks