Hi, Stu
Everything in the manual ; 5k to 50k for LDR resistance ... no less, no more
Have a look to RCTime ... wider possible range !!!
Alain
Hi, Stu
Everything in the manual ; 5k to 50k for LDR resistance ... no less, no more
Have a look to RCTime ... wider possible range !!!
Alain
in the end i connected both the cap and ldr to gnd but still was not right, so used to following code and seems to work fine
aa var word
trisd.7=0
high portd.7
pause 500
trisd.7=1
loop6:
aa=aa+1
if aa=65000 then aa=aa-1
if portd.7 = 1 then loop6
serout portb.0,n2400,[#aa,13,10]
there is probably a better way to do it, but this seems to work for me![]()
Stu,
as Alain already mentioned, it's all in the Manual.
POT is a bit of a pain, does your PIC have a spare ADC?
if yes, wire the LDR with an additional resistor as voltage divider and use ADCIN
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks