Teoria

Páginas: 3 (639 palabras) Publicado: 4 de junio de 2012
Device 16F877
XTAL 20
ALL_DIGITAL TRUE
Declare LCD_DTPIN PORTC.4
Declare LCD_ENPIN PORTC.3
Declare LCD_RSPIN PORTC.2
Declare KEYPAD_PORT PORTB
PORTB_PULLUPS On
Output PORTA.0
Output PORTA.1Dim v[4] As Byte

Dim VE[4] As Byte
Dim X As Byte
Dim A As Byte
Dim Y As Byte
Dim M As Byte
Dim g As Byte
Dim t As Byte
Dim lol As Word
Dim lo As Word
Y=3
EData 1
EData 2
EData 3EData 4

Print At 1,4,"BIENVENIDO"
DelayMS 2000
Print At 1,2,"INTRODUZCA CONTRASEÑA"

For t=0 To 3
v[t]= ERead t
Next

INICIO:
A=0
Cls
Print At 1,1,"Insertar Clave"
While A<=3X=244
While X=244
X=LookUp InKey,[1,2,3,0,4,5,6,0,7,8,9,0,"#",0,"*"]
DelayMS 30
Wend
If X != 244 Then
VE[A]=X
A=A+1
Print At 2,A,"X"
DelayMS 1000End If
Wend

For A=0 To 3
If v[A]!= VE[A] Then
Cls
Print At 1,3,"INCORRECTO"
DelayMS 1000
GoTo CONTEO
Else
g=g+1
If g=4 Then
ClsPrint At 1,1,":) CORRECTO :)"
DelayMS 2000
Cls
GoTo menu
End If
End If
Next

CONTEO:
Cls
Y=Y-1
If Y=0 Then
Cls
Print At 1,1,"UFFF abloqueado"
Print At 2,1,"el sistema"
DelayMS 1000
GoTo fin
End If
Print At 1,3,"CUIDADO...!"
Print At 2,1,"RESTAN ", Dec Y ," intento"
DelayMS 2000

GoTo INICIO

menu:
ClsPrint At 1,3,"1.- Manual"
Print At 2,3,"2.- Automatico"
X=244
While X=244
X=LookUp InKey,[1,2,3,0,4,5,6,0,7,8,9,0,"#",0,"*"]
DelayMS 30
Wend
If X=1 Then
GoSub manual
End If
If X=2Then
GoSub automatico
End If
GoTo menu
fin:
End

automatico:
Cls
Print At 1,2,"Proximamente"
DelayMS 100
Return

manual:
Cls
DelayMS 500
Print At 1,3,"1.-Mano"
Print At2,3,"2.-Antbrazo"
X=244
While X=244
X=LookUp InKey,[1,2,3,0,4,5,6,0,7,8,9,0,"#",0,"*"]
DelayMS 30
Wend
If X=1 Then
GoSub mano
End If
If X=2 Then
GoSub antebrazo
End If
Return

mano:...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Teoria
  • Las Teorias
  • Teorias
  • Teoria
  • Teoria
  • Teoria
  • Teoria
  • Teoria

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS