Code: Select all
'****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 12/22/2009 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
symbol sijalica=GPIO.0
symbol taster=GPIO.1
Symbol led=GPIO.2
output sijalica
input taster
output led
define osc 4
starostanje var byte
novostanje var byte
starostanje=taster
i var byte
CMCON = 7
pocetak:
toggle led
pause 200
novostanje=taster
if novostanje<starostanje then
for i=0 to 4
high sijalica
pause 30000
low sijalica
pause 1
next i
pause 1000
high sijalica
pause 1000
low sijalica
pause 500
high sijalica
pause 1000
low sijalica
pause 500
high sijalica
pause 1000
low sijalica
pause 500
high sijalica
pause 8000
low sijalica
endif
starostanje=novostanje
goto pocetak
end