Lord_Libra
unread,Nov 2, 2009, 4:53:32 AM11/2/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ConexionElectronica
Cordiales saludos.
Aqui esta algun avance que pude realizar en mi tiempo libre, terde
mucho, pero pude hacer algo, bueno, no entiendo muy bien esto de
manejar interrupciones para las prioridades, además de una mejor forma
de saver en que piso está, yo lo hice con leds, pero de seguro hay
otra manera.
Muchas gracias por ayuda que puedan brindarme.
TRISB = %00000000
PORTB = %00000000
TRISC = %00000000
PORTC = %00000000
TRISD = %00001111
PORTD = %00000000
TRISE = %00000000
PORTE = %00000000
' CONFIGURACION PARA EL MODULO LCD
DEFINE LCD_DREG PORTB
DEFINE LCD_BITS 4
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 2
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 3
INICIO:
lcdout $fe,1
lcdout " INGRESE EL "
lcdout $fe,$c0
lcdout " NUMERO DE PISO "
pause 1000
if PORTD == 1 then
lcdout $fe,1
lcdout " PISO 1"
high PORTC.3
else
if PORTD = 2 then
gosub motor
lcdout $fe,1
lcdout " PISO 2 "
HIGH PORTC.2
else
if PORTD = 3 then
lcdout $fe,1
lcdout " PISO 3 "
HIGH PORTC.1
else
if PORTD = 4 then
lcdout $fe,1
lcdout " PISO 4 "
HIGH PORTC.0
else
GOTO INICIO
endif
endif
endif
endif
MOTOR:
HIGH PORTE.0
HIGH PORTE.1
LOW PORTE.2
PAUSE 3000
HIGH PORTE.0
HIGH PORTE.1
HIGH PORTE.2
return
END
NOTA: PONDRE EL ESQUEMATICO EN LA SECCION DE DESCARGA