'****************************************************************
'* Name : UNTITLED.BAS *
'* Author : Max. E. Reyes Vera Juarez *
'* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 21/09/2005 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
include "modedefs.bas"
trisb=1
boton var PORTA.0
C VAR BYTE
PAUSE 300
loop:
if boton=0 then
HIGH PORTA.2
LOW PORTA.3
gosub led_on
else
LOW PORTA.2
HIGH PORTA.3
gosub led_off
endif
goto loop
led_on:
FOR C=0 TO 16
serout porta.1,T300,[6,6,"OK",3]
IF BOTON=1 THEN
GOTO LOOP
ENDIF
PAUSE 3000
NEXT C
goto loop
led_off:
FOR C=0 TO 16
serout porta.1,T300,[6,6,"OK",8]
IF BOTON=0 THEN
GOTO LOOP
ENDIF
PAUSE 3000
NEXT C
goto loop
end