Code:
CLEAR
LED VAR GPIO.0
Delay VAR WORD
CMCON = 7
ANSEL = 0
Include "Elapsed.bas"
Gosub ResetTime ' Reset Time to 0d-00:00:00.00
Gosub StartTimer ' Start the Elapsed Timer
HIGH LED ; Start with LED on
SecondsChanged = 0
Delay = 90
Loop:
if Delay > 0 then
if SecondsChanged then
SecondsChanged = 0
Delay = Delay - 1
if Delay = 0 then LOW LED ; Turn off LED
endif
endif
Goto Loop
Bookmarks