Electronico

Solo disponible en BuenasTareas
  • Páginas : 4 (907 palabras )
  • Descarga(s) : 0
  • Publicado : 19 de octubre de 2010
Leer documento completo
Vista previa del texto
;--------------------------------------------------------------------
;* MANEJO DEL MODULO DISPLAY LCD
;--------------------------------------------------------------------
;*
;* ESCUELA DEINGENIERIA SENATI
;*
;* 22 MAYO 2010
;*
;--------------------------------------------------------------------

LIST P=16F84A

INCLUDE <P16F84A.INC>

__CONFIG 0x3FF1;--------------------------------------------------------------------
;* SE DEFINEN PINES DEL PORTB
;--------------------------------------------------------------------

dat0 EQU 0 ; D4 LCD
dat1 EQU 1 ;D5 LCD
dat2 EQU 2 ; D6 LCD
dat3 EQU 3 ; D7 LCD

e EQU 4 ; ENABLE LCD
rs EQU 5 ; COMANDO/CARACTER

;--------------------------------------------------------------------
;* REGISTROSGENERALES DE LA MEMORIA RAM
;--------------------------------------------------------------------

CBLOCK 0x20

TEMP
CNTSEG
OVFLW
CNT_LCD
CHAR
CNT
GEN1

ENDC;--------------------------------------------------------------------
;* INICIALIZA VECTOR DE RESET
;--------------------------------------------------------------------

ORG 0x000

goto inicio;--------------------------------------------------------------------
;* RUTINAS
;--------------------------------------------------------------------
;* RUTINA DE TIT 1;--------------------------------------------------------------------

tit1 movfw CNT_LCD ; (CNT_LCD)->(W)
addwf PCL,F ; (PCL)+(w)->(PCL)

retlw 'I' ; (CNT_LCD) = (W)=0
retlw 'N' ; (CNT_LCD) = (W)=1
retlw'G' ; (CNT_LCD) = (W)=2
retlw '.' ; (CNT_LCD) = (W)=3
retlw ' ' ; (CNT_LCD) = (W)=4
retlw 'E' ; (CNT_LCD) = (W)=5
retlw 'L' ; (CNT_LCD) = (W)=6
retlw 'E' ; (CNT_LCD) = (W)=7
retlw 'C'; (CNT_LCD) = (W)=8
retlw 'T' ; (CNT_LCD) = (W)=9
retlw 'R' ; (CNT_LCD) = (W)=10
retlw 'O' ; (CNT_LCD) = (W)=11
retlw 'N' ; (CNT_LCD) = (W)=12
retlw 'I' ; (CNT_LCD) = (W)=13
retlw...
tracking img