actually im trying to used pic to switch led at a different light falling to the ldr.
now im connecting portb1 with an ldr(other end of the ldr leg to the portb1 and the other to the ground), portb6 and 7 will be the output led.
v1 var byte
main:
pot portb.1,255,v1
if v1 < 100 then lmp1
if v1 > 100 then lmp2
goto main
lmp1:
high 6
pause 500
low 6
pause 500
return
lmp2:
high 7
pause 500
low 7
pause 500
return
is this the way to programm? or i got a wrong connection on the circuit..
need help..thanks..
Bookmarks