Electronica

Solo disponible en BuenasTareas
  • Páginas : 3 (530 palabras )
  • Descarga(s) : 0
  • Publicado : 1 de febrero de 2011
Leer documento completo
Vista previa del texto
'****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS]*
'* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 08/12/08*
'* Version : 1.0 *
'* Notes : *
'* :*
'****************************************************************
@ device XT_OSC
trisa=0
trisc=0
define lcd_bits 4
define lcd_dreg portb ;pines del lcd b4 a b7
define lcd_dbit 4define lcd_rsreg portb
define lcd_rsbit 0 ;en b.0 el bit RS
define lcd_ereg portb
define lcd_ebit 1 ;en b1 el bit e
A var portd.3
B var portd.2
C var portd.1
D VAR portd.0
unovar portd.7
dos var portd.6
tres var portd.5
letra var portd.4
son var portb.2
x var byte
y var byte
z var byte
w var byte
m var byte
n var byte
v var byte
num var byte
k var byte
r varbyte
s var byte
t var byte
p var byte
q var byte
e var byte
f var byte
inicio:
x=0
y=0
z=0
W=0
e=0
f=0

lcdout $fe,1,"sistema listo"
pause 1000
lcdout $fe,1
gosub barrido
gosubrebote
if num!=11 then siga
if num=11 then
e=1
lcdout $fe,1,"-"
endif
gosub barrido
gosub rebote
siga:
m=num
lcdout $fe,$14
lcdout, DEC num
pause 100

gosub barrido
gosub rebote

ifnum=10 then
lcdout $fe,$14,"+"
for x=1 to 50
porta=%000001 : portc=%001000: pause 4
porta=%000010 : portc=%001000: pause 4
porta=%000100 : portc=%111110: pause 4
porta=%001000 : portc=%001000:pause 4
porta=%110000 : portc=%001000: pause 4
next
x=1
y=0
z=0
W=0
pause 10
endif

if num=11 then
lcdout $fe,$14,"-"
for x=1 to 50
porta=%000001 : portc=%1000: pause 4
porta=%000010 :...
tracking img