Hello Sougata,

Thanks for your reply. How do I set up the code you gave me to work using the lcdout command? I managed to find an LDR that has dark resistance of 5K to 5.5K and it shows approximately 30 ohms with a very bright light shinning on it, that's an acceptable range?

When I run the code you sent as modified below, I get weird charters on the Lcd for the 10,13 and it never makes it to the calibrated subroutine. I tried it initially using a 0.1 microfarad then tried a 0.01, 0.022, 0.047, 0.47 and even a 1 microfarad but no go, what other values would you suggest using? Or could it be the code is locking up due to 10,13 screwing it up? I don't understand what the 10,13 is all about, can you explain what it's for? I'm using a 2 X 16 character Lcd, can you tell me what I need to add to get it working with the Lcdout commands?

For scale = 1 To 255
POT PORTD.0,scale,B0
If (B0 > 253) Then calibrated
Next scale
LCDOut $fe, 1,"Inc R or C.",10,13
Stop
calibrated:
LCDOut $fe, $c0,"Scale= ",DEC scale,10,13

Thanks
jessey