Bien.. aqui tienes, a ver que hacemos:
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
DEFINE LCD_LINES 4
TRISA = %00000000
TRISB = %11110000
TRISC = %00000000
TRISD = %00000000
TRISE = %01000000
B1 VAR WORD
DATO VAR BYTE
PASSW VAR BYTE
TIEMPO VAR BYTE
ZONA1 VAR BYTE
ZONA2 VAR BYTE
ZONA3 VAR BYTE
ZONA4 VAR BYTE
ZONA5 VAR BYTE
ZONA6 VAR BYTE
ZONA7 VAR BYTE
ZONA8 VAR BYTE
DIG1 VAR BYTE
DIG2 VAR BYTE
DIG3 VAR BYTE
DIG4 VAR BYTE
DIG5 VAR BYTE
DIG6 VAR BYTE
RESET VAR WORD
CLV1 VAR BYTE
CLV2 VAR BYTE
CLV3 VAR BYTE
CLV4 VAR BYTE
CLV5 VAR BYTE
CLV6 VAR BYTE
DATW VAR BYTE " REGISTRO DE TRABAJO PARA MOVER DATOS GENERALES
CONT1 VAR BYTE " PARA CONTAR CUANTAS VECES SE COMETE UNA EQUIVOCACION AL METER LA CLAVE
BEEP VAR BYTE " GRABA SI EL BEEP ESTA ON O OFF
beep1 VAR BYTE " GRABA SI EL BEEP ESTA ON O OFF
B1 = 0
CONT1 = 3 " cantidad de intentos - 1 para introducir la clave
ADCON1 = %00000110
TIEMPO = 15
PORTA.0 = 0
PAUSE 3000
LCDOut $fe, 1 " Limpia la LCD
DATO = 1
SEROUT PORTC.6 , 9600 , [DATO, 0]
PAUSE 200
SEROUT PORTC.6 , 9600 , [DATO, 0]
PAUSE 200
read 00,RESET
IF RESET = $FF then bienve " si el sistema esta de fabrica invita a configurarlo
GOTO inicio
bienve:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "* Bienvenido *" " escrebe
LCDOut $fe,$C0, "* Por Favor *"
LCDOut $fe,$90, "* Configure su *"
LCDOut $fe,$D0, "* Sistema *"
PAUSE 3000
write 00,1 " indica que el sistema se inicia la segunda vez o mas...
PAUSE 100
WRITE 01,1 " GRABA EL ESTADO DEL BUZZER, ON O OFF
PAUSE 100
WRITE 02,0 " PARA SABER QUIEN VA A UTILIZAR LA RUTINA DE PASSWORD
PAUSE 100
WRITE 03,15 " PARA GUARDAR EL TIEMPO DE RETARDO DE ACTIVACION DE LA CENTRAL
PAUSE 100
WRITE 10,1 " PRIMER DIGITO DE LA CLAVE "el numero indica la posicion de la tecla"
PAUSE 100
WRITE 11,2
PAUSE 100
WRITE 12,3
PAUSE 100
WRITE 13,5
PAUSE 100
WRITE 14,6
PAUSE 100
WRITE 15,7 " ULTIMO DIGITO DE LA CLAVE "el numero indica la posicion de la tecla"
PAUSE 100
LCDOut $fe, 1 " Limpia la LCD
password:
read 10, CLV1
pause 100
read 11, CLV2
pause 100
read 12, CLV3
pause 100
read 13, CLV4
pause 100
read 14, CLV5
pause 100
read 15, CLV6
pause 100
LCDOut $fe, 1 " Limpia la LCD
passconf:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
pause 400
READ 01,beep1
consult1:
CALL teclado
IF B1 = 0 THEN consult1
IF B1 = 13 THEN inicio
DIG1 = B1
if beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG1 = CLV1 then consult2
if DIG1 <> CLV1 then error
consult2:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * "
pause 400
READ 01,beep1
consul2:
CALL teclado
IF B1 = 0 THEN consul2
DIG2 = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG2 = CLV2 then consult3
if DIG2 <> CLV2 then error
goto consult2
consult3:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * * "
pause 400
READ 01,beep1
consul3:
CALL teclado
IF B1 = 0 THEN consul3
DIG3 = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG3 = CLV3 then consult4
if DIG3 <> CLV3 then error
goto consult3
consult4:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * * * "
pause 400
READ 01,beep1
consul4:
CALL teclado
IF B1 = 0 THEN consul4
DIG4 = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG4 = CLV4 then consult5
if DIG4 <> CLV4 then error
goto consult4
consult5:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * * * * "
pause 400
READ 01,BEEP
consul5:
CALL teclado
IF B1 = 0 THEN consul5
DIG5 = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG5 = CLV5 then consult6
if DIG5 <> CLV5 then error
goto consult5
consult6:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * * * * * "
pause 400
READ 01,beep1
consul6:
CALL teclado
IF B1 = 0 THEN consul6
DIG6 = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DIG6 = CLV6 then config
if DIG6 <> CLV6 then error
goto consult6
config:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Introduzca su " " escrebe
LCDOut $fe,$C0, "Clave de Acceso:"
LCDOut $fe,$90, " * * * * * * "
LCDOut $fe,$D0, " OK "
pause 1500
LCDOut $fe, 1 " Limpia la LCD
READ 02,PASSW
if PASSW = 0 then config2
if PASSW = 1 then armar_r
if PASSW = 2 then desarmar_r
config2:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Menu de Config. " " escrebe
LCDOut $fe,$C0, "1.Reiniciar Sis."
LCDOut $fe,$90, "2.Cambiar Clave."
LCDOut $fe,$D0, "3.Beep On/Off. "
PAUSE 200
READ 01,beep1
WAIT0:
call teclado
IF B1 = 0 THEN WAIT0
DATW = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF DATW = 1 THEN reiniciar
IF DATW = 2 THEN clave_new
IF DATW = 3 THEN beep_on_off
IF DATW = 8 THEN prox_pant
goto config2
prox_pant:
LCDOut $fe, 1 " Limpia la LCD
prox_pant1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Menu de Config. " " escrebe
LCDOut $fe,$C0, "4.Numeros Telef."
LCDOut $fe,$90, "5.Tiempos/Retar."
LCDOut $fe,$D0, "6.Salir. "
PAUSE 200
READ 01,beep1
WAIT3:
call teclado
IF B1 = 0 THEN WAIT3
DATW = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF B1 = 4 then config2
IF B1 = 6 then tiempo_arm
IF DATW = 7 then inicio
goto prox_pant1
tiempo_arm:
READ 03,TIEMPO
PAUSE 100
tiempo_ar1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Use las Flechas " " escrebe
LCDOut $fe,$C0, "para cambiar el "
LCDOut $fe,$90, "retardo: "
LCDOut $fe,$D0, "Tiempo: ",#TIEMPO," Seg."
WAIT5:
call teclado
if B1 = 0 then WAIT5
IF B1 = 4 THEN aumenta
IF B1 = 8 THEN disminuye
IF B1 = 16 THEN grava_tie
goto WAIT5
aumenta:
TIEMPO = TIEMPO + 1
CALL buzzer
IF TIEMPO = 241 then TIEMPO = 240
GOTO tiempo_ar1
disminuye:
TIEMPO = TIEMPO - 1
CALL buzzer
IF TIEMPO = 0 then TIEMPO = 1
GOTO tiempo_ar1
grava_tie:
DATO = 40
SEROUT PORTC.6 , 9600 , [DATO, 0]
PAUSE 500
SEROUT PORTC.6 , 9600 , [TIEMPO, 0]
PAUSE 100
WRITE 03,TIEMPO
PAUSE 100
GOTO prox_pant
error:
LCDOut $fe, 1 " Limpia la LCD
CONT1 = CONT1 - 1
error1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut " Error! " " escrebe
LCDOut $fe,$C0, "Dispone de ",#CONT1
LCDOut $fe,$90, "intentos para"
LCDOut $fe,$D0, "evitar Alarma"
pause 3000
if CONT1 = 0 then bloqueo
goto password
bloqueo:
LCDOut $fe, 1 " Limpia la LCD
bloqueo1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut " Sistema Armado " " escrebe
LCDOut $fe,$C0, " "
LCDOut $fe,$90, " "
LCDOut $fe,$D0, " "
goto bloqueo1
reiniciar:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Esta seguro que " " escrebe
LCDOut $fe,$C0, "desea Reiniciar "
LCDOut $fe,$90, "el Sistema? "
LCDOut $fe,$D0, "1.SI 2.No"
pause 700
READ 01,beep1
espera0:
call teclado
if B1 = 0 then espera0
DATW = B1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if DATW = 1 then reini_sys
if DATW = 2 then config2
goto reiniciar
clave_new:
LCDOut $fe, 1 " Limpia la LCD
clave_new1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Por Favor " " escrebe
LCDOut $fe,$C0, "Introduzca la "
LCDOut $fe,$90, "Nueva Clave: "
LCDOut $fe,$D0, "Clave: "
PAUSE 200
READ 01,beep1
esper1:
call teclado
if B1 = 0 then esper1
DIG1 = B1
WRITE 10,DIG1
if B1 = 5 then DIG1 = 4
if B1 = 6 then DIG1 = 5
if B1 = 7 then DIG1 = 6
if B1 = 9 then DIG1 = 7
if B1 = 10 then DIG1 = 8
if B1 = 11 then DIG1 = 9
if B1 = 14 then DIG1 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1
READ 01,beep1
esper2:
call teclado
if B1 = 0 then esper2
DIG2 = B1
WRITE 11,DIG2
if B1 = 5 then DIG2 = 4
if B1 = 6 then DIG2 = 5
if B1 = 7 then DIG2 = 6
if B1 = 9 then DIG2 = 7
if B1 = 10 then DIG2 = 8
if B1 = 11 then DIG2 = 9
if B1 = 14 then DIG2 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1,#DIG2
READ 01,beep1
esper3:
call teclado
if B1 = 0 then esper3
DIG3 = B1
WRITE 12,DIG3
if B1 = 5 then DIG3 = 4
if B1 = 6 then DIG3 = 5
if B1 = 7 then DIG3 = 6
if B1 = 9 then DIG3 = 7
if B1 = 10 then DIG3 = 8
if B1 = 11 then DIG3 = 9
if B1 = 14 then DIG3 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1,#DIG2,#DIG3
READ 01,beep1
esper4:
call teclado
if B1 = 0 then esper4
DIG4 = B1
WRITE 13,DIG4
if B1 = 5 then DIG4 = 4
if B1 = 6 then DIG4 = 5
if B1 = 7 then DIG4 = 6
if B1 = 9 then DIG4 = 7
if B1 = 10 then DIG4 = 8
if B1 = 11 then DIG4 = 9
if B1 = 14 then DIG4 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1,#DIG2,#DIG3,#DIG4
READ 01,beep1
esper5:
call teclado
if B1 = 0 then esper5
DIG5 = B1
WRITE 14,DIG5
if B1 = 5 then DIG5 = 4
if B1 = 6 then DIG5 = 5
if B1 = 7 then DIG5 = 6
if B1 = 9 then DIG5 = 7
if B1 = 10 then DIG5 = 8
if B1 = 11 then DIG5 = 9
if B1 = 14 then DIG5 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1,#DIG2,#DIG3,#DIG4,#DIG5
READ 01,beep1
esper6:
call teclado
if B1 = 0 then esper6
DIG6 = B1
WRITE 15,DIG6
if B1 = 5 then DIG6 = 4
if B1 = 6 then DIG6 = 5
if B1 = 7 then DIG6 = 6
if B1 = 9 then DIG6 = 7
if B1 = 10 then DIG6 = 8
if B1 = 11 then DIG6 = 9
if B1 = 14 then DIG6 = 0
pause 400
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
LCDOut $fe,$D0, "Clave: ",#DIG1,#DIG2,#DIG3,#DIG4,#DIG5,#DIG6
pause 1000
enter:
read 01,beep1
enterw:
call teclado
if B1 = 0 then enterw
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if B1 = 16 then config2
if B1 = 13 then clave_new
goto enter
beep_on_off:
READ 01,BEEP
PAUSE 100
IF BEEP = 0 THEN enciende
IF BEEP = 1 THEN apaga
enciende:
write 01,1
pause 100
LCDOut $fe, 1 " Limpia la LCD
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "****************" " escrebe
LCDOut $fe,$C0, "* BUZZER ON *"
LCDOut $fe,$90, "****************"
PAUSE 3000
goto config2
apaga:
write 01,0
pause 100
LCDOut $fe, 1 " Limpia la LCD
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "****************" " escrebe
LCDOut $fe,$C0, "* BUZZER OFF *"
LCDOut $fe,$90, "****************"
PAUSE 3000
goto config2
reini_sys:
LCDOut $fe, 1 " Limpia la LCD
write 00,01 " indica que el sistema se inicia la segunda vez o mas...
PAUSE 100
WRITE 01,00 " GRABA EL ESTADO DEL BUZZER, ON O OFF
PAUSE 100
WRITE 10,1 " PRIMER DIGITO DE LA CLAVE "el numero indica la posicion de la tecla"
PAUSE 100
WRITE 11,2
PAUSE 100
WRITE 12,3
PAUSE 100
WRITE 13,5
PAUSE 100
WRITE 14,6
PAUSE 100
WRITE 15,7 " ULTIMO DIGITO DE LA CLAVE "el numero indica la posicion de la tecla"
PAUSE 100
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Sist. Reiniciado" " escrebe
LCDOut $fe,$C0, " Ingresando "
LCDOut $fe,$90, " valores de "
LCDOut $fe,$D0, " fabrica. "
Pause 3000
goto bienve
inicio:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "*.Seleccione: " " escrebe
LCDOut $fe,$C0, "1.Activar Alarma"
LCDOut $fe,$90, "2.Serv. Nocturno"
LCDOut $fe,$D0, "3.Configuracion "
read 01,beep1
goto WAIT1
inicio1:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "*.Seleccione: " " escrebe
LCDOut $fe,$C0, " "
LCDOut $fe,$90, "2.Desarmar Alarm"
LCDOut $fe,$D0, " "
read 01,beep1
goto WAIT2
WAIT1:
call teclado
if B1 = 0 then WAIT1
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if B1 = 1 then armar
if B1 = 2 then nocturno
if B1 = 3 then configurar
goto WAIT1
WAIT2:
call teclado
if B1 = 0 then WAIT2
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if B1 = 2 then desarmar
goto WAIT2
armar:
write 02,1
pause 100
GOTO password
armar_r:
DATO = 50
SEROUT PORTC.6 , 9600 , [DATO, 0]
PAUSE 200
goto inicio1
desarmar:
write 02,2
pause 100
GOTO password
desarmar_r:
DATO = 60
SEROUT PORTC.6 , 9600 , [DATO, 0]
PAUSE 200
goto inicio
configurar:
write 02,3
pause 200
goto password
nocturno:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "*.Seleccione: " " escrebe
LCDOut $fe,$C0, "1.Activar Zonas."
LCDOut $fe,$90, "2.Elegir Zonas. "
LCDOut $fe,$D0, "3.Volver. "
read 01,beep1
WAIT4:
call teclado
if B1 = 0 then WAIT4
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
if B1 = 1 then zonas
if B1 = 2 then elegir_z
if B1 = 3 then inicio
goto WAIT4
zonas:
GOTO inicio
elegir_z:
LCDOut $fe, 2 " Posiciona el cursor en el inicio
LCDOut "Ingrese zonas " " escrebe
LCDOut $fe,$C0, "a ser activadas"
LCDOut $fe,$90, "y pulse enter: "
LCDOut $fe,$D0, " "
read 01,beep1
WAIT6:
call teclado
IF B1 = 13 THEN nocturno
if B1 = 0 then WAIT6
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF B1 = 1 THEN ZONA1 = 1
IF B1 = 2 THEN ZONA1 = 2
IF B1 = 3 THEN ZONA1 = 3
IF B1 = 5 THEN ZONA1 = 4
IF B1 = 6 THEN ZONA1 = 5
IF B1 = 7 THEN ZONA1 = 6
IF B1 = 9 THEN ZONA1 = 7
IF B1 = 10 THEN ZONA1 = 8
LCDOut $fe,$D0, #ZONA1
WAIT7:
call teclado
IF B1 = 13 THEN nocturno
if B1 = 16 then nocturno
if B1 = 0 then WAIT7
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF B1 = 1 THEN ZONA2 = 1
IF B1 = 2 THEN ZONA2 = 2
IF B1 = 3 THEN ZONA2 = 3
IF B1 = 5 THEN ZONA2 = 4
IF B1 = 6 THEN ZONA2 = 5
IF B1 = 7 THEN ZONA2 = 6
IF B1 = 9 THEN ZONA2 = 7
IF B1 = 10 THEN ZONA2 = 8
LCDOut $fe,$D0, " ",#ZONA1," ",#ZONA2
WAIT8:
call teclado
IF B1 = 13 THEN nocturno
if B1 = 16 then nocturno
if B1 = 0 then WAIT8
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF B1 = 1 THEN ZONA3 = 1
IF B1 = 2 THEN ZONA3 = 2
IF B1 = 3 THEN ZONA3 = 3
IF B1 = 5 THEN ZONA3 = 4
IF B1 = 6 THEN ZONA3 = 5
IF B1 = 7 THEN ZONA3 = 6
IF B1 = 9 THEN ZONA3 = 7
IF B1 = 10 THEN ZONA3 = 8
LCDOut $fe,$D0, " ",#ZONA1," ",#ZONA2," ",#ZONA3
WAIT9:
call teclado
IF B1 = 13 THEN nocturno
if B1 = 16 then nocturno
if B1 = 0 then WAIT9
IF beep1 = 1 THEN CALL buzzer " PREGUNTA SI EL BUZZER SONARA O NO SONARA
IF B1 = 1 THEN ZONA4 = 1
IF B1 = 2 THEN ZONA4 = 2
IF B1 = 3 THEN ZONA4 = 3
IF B1 = 5 THEN ZONA4 = 4
IF B1 = 6 THEN ZONA4 = 5
IF B1 = 7 THEN ZONA4 = 6
IF B1 = 9 THEN ZONA4 = 7
IF B1 = 10 THEN ZONA4 = 8
LCDOut $fe,$D0, " ",#ZONA1," ",#ZONA2," ",#ZONA3," ",#ZONA4
pause 2000
GOTO inicio
teclado:
B1 = 0
portb.0 = 1
portb.1 = 0
portb.2 = 0
portb.3 = 0
if portb.4 = 1 then B1 = 1 " tecla "1"
if portb.5 = 1 then B1 = 5 " tecla "4"
if portb.6 = 1 then B1 = 9 " tecla "7"
if portb.7 = 1 then B1 = 13 " tecla "clear"
portb.0 = 0
portb.1 = 1
portb.2 = 0
portb.3 = 0
if portb.4 = 1 then B1 = 2 " tecla "2"
if portb.5 = 1 then B1 = 6 " tecla "5"
if portb.6 = 1 then B1 = 10 " tecla "8"
if portb.7 = 1 then B1 = 14 " tecla "0"
portb.0 = 0
portb.1 = 0
portb.2 = 1
portb.3 = 0
if portb.4 = 1 then B1 = 3 " tecla "3"
if portb.5 = 1 then B1 = 7 " tecla "6"
if portb.6 = 1 then B1 = 11 " tecla "9"
if portb.7 = 1 then B1 = 15 " TECLA "HELP"
portb.0 = 0
portb.1 = 0
portb.2 = 0
portb.3 = 1
if portb.4 = 1 then B1 = 4 " tecla "flecha arriba"
if portb.5 = 1 then B1 = 8 " tecla "flecha abajo"
if portb.6 = 1 then B1 = 12 " tecla "2ND"
if portb.7 = 1 then B1 = 16 " tecla "enter"
RETURN
buzzer:
porta.0 = 1
pause 150
porta.0 = 0
return
End
Saludos... y Gracias!