PDA

View Full Version : Pir Control for digital clock controlling other I`Os



maxpower
11-17-2006, 12:34 AM
i am currently designing a small electronic project with a pir· ·sensor to control 2 7 segment displays as well i have a program to control a clock to be set at different time levels. I am trying to interface the 2 programs so when the clock get to a certain value it will put a halt on the 2 seven segement displays. a sample of my codes are as follows:

HIGH 9
PAUSE 30000
DO
IF (IN5 = 1) THEN
HIGH 14
PAUSE 1000
LOW 14
PAUSE 4500
ELSE
ENDIF
LOOP
the above with count when the pir is activated

PAUSE 3
counter VAR Byte
FOR counter = 1 TO 30
DEBUG ? counter
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
NEXT
DO
LOW 15
LOOP
END
the above here will count to 30
what i wish on doing is having both programs running at once on the same B.O.E and to control pin 9 from the clock if anyone has any suggestions i`ll be greatfull to here from you.
thanks