Friday, 30 April 2010

Code

main:
high 5 ; for LEDS
high 6
readadc 1, b1
readadc 2, b2

select case b1
case 82 to 255 ;LDR doesn't detect light
low 2
high 1
case 0 to 81 ;LDR detects light
high 2
low 1
end select

select case b2
case 56 to 255 ;LDR doesn't detect light
low 4
high 3
case 0 to 55 ;LDR detects light
high 4
low 3
end select

debug b1
debug b2

goto main

No comments:

Post a Comment