Display de cristal líquido grágico GLCD
-
Upload
jaime-e-velarde -
Category
Documents
-
view
1.219 -
download
3
description
Transcript of Display de cristal líquido grágico GLCD
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº1 Diciembre 2011
DISPLAY GRÁFICO DE CRISTAL LÍQUIDO
DE 128 x 64 PIXELES
Organización en el GLCD: la información para controlar los pixels
se almacena en la RAM del controlador del GLCD y está organizada para manejar la matriz de 128 columnas de 64 filas.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº2 Diciembre 2011
Manejo independientemente en dos secciones: dentro del GLCD
existen dos circuitos independientes que controlan los pixels, donde están organizados en 64 columnas de 64 filas. Para acceder a la
información se escoge por hardware mediante la entrada de selección
CS1 para los pixels de la matriz de la izquierda y CS2 para los de la matriz de la derecha.
Especificación de las columnas: la columna de pixels se especifica dentro de cada sección entre 0 y 63 mediante la “Dirección Y”, que se
almacena en un contador de seis bits; el cual, que se incrementa automáticamente cada vez que se escribe o se lee el dato de la
sección. Para inicializar el contador existe el Comando de Poner la Dirección.
Especificación de la página: las filas se agrupan de 8 en 8 denominadas páginas; por lo tanto, para las 64 filas existen 8
páginas numeradas de 0 a 7, que se escogen mediante el contenido
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº3 Diciembre 2011
del Registro X dentro de cada sección del GLCD. Para inicializar el
registro existe el Comando de Poner la Página.
Ubicación del dato: la información de los pixels no se escribe ni se
lee individualmente sino de ocho en ocho, es decir por bytes; por eso,
para acceder a un dato se debe especificar la sección por hardware, mientras la dirección y la página por software.
Organización de la RAM en el controlador del
GLCD: la memoria para controlar los pixels del
GLCD está formada por
1024 bytes, que necesitan la especificación de la
sección, de la página y de la columna para poder
acceder.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº4 Diciembre 2011
DISTRIBUCIÓN DE LOS TERMINALES
DEL GLCD Y SU FUNCIÓN
TERMINALES 1 2 3 4 5 6 7 8 9 10
GLCD
VSS VDD VO D/I R/W E DB0 DB1 DB2 DB3
11 12 13 14 15 16 17 18 19 20
DB4 DB5 BD6 BD7 CS1 CS2 RST Vout BLA BLK
POLARIZACIÓN: Vss y VDD DATOS: DB0 – DB7
CONTROL: D/I, R/W, E SELECCIÓN: CS1, CS2
RESET: RST CONTRASTE: VO
VOLTAJE NEGATIVO: Vout
LUZ POSTERIOR: BLA, BLK
COMANDOS DEL LCD GRÁFICO
Los comandos o instrucciones para las secciones del GLCD se
ejecutan colocando en los terminales los valores que se indican en la tabla que se encuentra a continuación y produciendo un pulso
completo en el terminal de E de Habilitación.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº5 Diciembre 2011
ESCRITURA DE DATOS O COMANDOS EN EL GLCD
DESCRIPCIÓN DE LOS COMANDOS
Sección del display encendida – apagada: no afecta al estado de la RAM interna, L = apagada, H = encendida.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Display On/Off L L L L H H H H H L/H
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº6 Diciembre 2011
Poner la Dirección: almacena la direcciones Y en el contador.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Set Address L L L H Dirección Y (0 - 63)
Poner la Página: almacena la página en el registro X.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Set Page L L H L H H H Page (0 - 7)
Fila de inicio del display: indica el dato de la RAM que aparece en
la parte superior de la sección.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Display Start Line L L H H Dirección Y (0 - 63)
Leer el Estado: información del estado de la sección del display.
BUSY = 1 trabajando BUSY = 0 listo ON/OFF = 1 apagado ON/OFF = 0 encendido
RESET = 1 activado RESET = 0 desactivado
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Status Read H L Busy L OnOff Reset L L L L
Escribir un Dato: escribe el dato en la RAM de la sección, luego se incrementa automáticamente el contador de direcciones.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Write Display Data L H Dato que se escribe
Leer un Dato: lee el dato desde la RAM de la sección.
COMANDO R/W D/I DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
Read Display Data H H Dato que se lee
PROGRAMA PARA COMPROBAR EL FUNCIONAMIENTO DEL GLCD
El siguiente programa dibuja líneas horizontales, una cuadrícula y un
gráfico en el GLCD, utilizando las siguientes subrutinas:
RSTGLCD: configura los pórticos para la comunicación con el GLCD,
establece a la fila 0 como la superior y enciende las secciones.
WCMDI, WCMDD: escritura de un comando en la sección izquierda
y en la sección derecha.
WDATI, WDATD: escritura de un dato en la sección izquierda y en
la sección derecha.
WSCRN: escritura de 1024 datos para dibujar toda la pantalla.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº7 Diciembre 2011
CIRCUITO DE PRUEBA DEL GLCD
Nota: la distribución de los terminales del GLCD en el Proteus no corresponde al que se consigue en los almacenes de componentes.
; PROGRAMA CON SUBRUTINAS PARA MANEJO DEL DISPLAY LCD GRÁFICO 128x64
.NOLIST
.INCLUDE "m164pdef.inc"
.LIST
; DEFINICIÓN DE ETIQUETAS PARA LOS REGISTROS
.DEF AUX1 = R16 ; REGISTRO AUXILIAR1
.DEF AUX2 = R17 ; REGISTRO AUXILIAR2
.DEF AUX3 = R18 ; REGISTRO AUXILIAR3
; SEGMENTO DE PROGRAMA o MEMORIA FLASH
.CSEG
; INICIALIZACIÓN DEL STACK Y DE LOS PÓRTICOS
PROGP: LDI AUX1,LOW(RAMEND)
OUT SPL,AUX1
LDI AUX1,HIGH(RAMEND)
OUT SPH,AUX1
; PARA INICIALIZAR EL LCD GRÁFICO
REPITA: RCALL RSTGLCD
; PARA DIBUJAR LÍNEAS HORIZONTALES
LDI AUX2,0xB8
LAZO: MOV AUX1,AUX2
RCALL WCMDI
RCALL WCMDD
;
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº8 Diciembre 2011
LDI AUX1,0x40
RCALL WCMDI
RCALL WCMDD
;
LDI AUX1,0x0F
LDI AUX3,64
LAZO1: RCALL WDATI
DEC AUX3
BRNE LAZO1
;
LDI AUX1,0xF0
LDI AUX3,64
LAZO2: RCALL WDATD
DEC AUX3
BRNE LAZO2
;
INC AUX2
CPI AUX2,0xC0
BRNE LAZO
; PARA APAGAR Y ENCENDER LAS SECCIONES DEL GLCD
RCALL DELAY
LDI AUX1,0x3E ; APAGAR GLCD SECCIÓN DERECHA
RCALL WCMDD
RCALL DELAY
LDI AUX1,0x3E ; APAGAR GLCD SECCIÓN IZQUIERDA
RCALL WCMDI
RCALL DELAY
LDI AUX1,0x3F ; ENCENDER GLCD SECCIÓN DERECHA
RCALL WCMDD
RCALL DELAY
LDI AUX1,0x3F ; ENCENDER GLCD SECCIÓN IZQUIERDA
RCALL WCMDI
; PARA DIBUJAR UNA CUADRÍCULA CON DATOS QUE ESTÁN EN ESTE MISMO ARCHIVO
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº9 Diciembre 2011
RCALL DELAY
LDI ZL,LOW(PANT1<<1) ; TABLA DE DATOS
LDI ZH,HIGH(PANT1<<1)
RCALL WSCRN
; PARA DIBUJAR UNA PANTALLA CON DATOS QUE ESTÁN EN OTRO ARCHIVO SECUNDARIO
RCALL DELAY
LDI ZL,LOW(PANT2<<1) ; TABLA DE DATOS
LDI ZH,HIGH(PANT2<<1)
RCALL WSCRN
RCALL DELAY
FINAL: RJMP REPITA
; SUBRUTINA DE INICIALIZACIÓN DEL GLCD
.EQU BUS = PORTC
.EQU CTR = PORTD
.EQU E = PD7
.EQU WR = PD6
.EQU DI = PD5
.EQU BKL = PD4
.EQU CS2 = PD3
.EQU CS1 = PD2
RSTGLCD:
LDI AUX1,0xFF
OUT BUS-1,AUX1
LDI AUX1,0xEC
OUT CTR-1,AUX1
;
LDI AUX1,0xC0 ; FILA 0 DE INICIO
RCALL WCMDI
RCALL WCMDD
;
LDI AUX1,0x3F ; PARA MOSTRAR
RCALL WCMDI
RCALL WCMDD
RET
; COMANDO PARA EL CONTROLADOR IZQUIERDO
WCMDI: SBI CTR,CS1
CBI CTR,WR
CBI CTR,DI
OUT BUS,AUX1
SBI CTR,E
CBI CTR,E
CBI CTR,CS1
RET
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº10 Diciembre 2011
; COMANDO PARA EL CONTROLADOR DERECHO
WCMDD: SBI CTR,CS2
CBI CTR,WR
CBI CTR,DI
OUT BUS,AUX1
SBI CTR,E
CBI CTR,E
CBI CTR,CS2
RET
; DATO PARA EL CONTROLADOR IZQUIERDO
WDATI: SBI CTR,CS1
CBI CTR,WR
SBI CTR,DI
OUT BUS,AUX1
SBI CTR,E
CBI CTR,E
CBI CTR,CS1
RET
; DATO PARA EL CONTROLADOR DERECHO
WDATD: SBI CTR,CS2
CBI CTR,WR
SBI CTR,DI
OUT BUS,AUX1
SBI CTR,E
CBI CTR,E
CBI CTR,CS2
RET
; ESCRITURA DE TODA UNA PANTALLA CON LOS DATOS APUNTADOS POR EL REGISTRO Z
WSCRN: LDI AUX2,0xB8
WSCRN1: MOV AUX1,AUX2
RCALL WCMDI
RCALL WCMDD
LDI AUX1,0x40
RCALL WCMDI
RCALL WCMDD
LDI AUX3,64
WSCRN2: LPM AUX1,Z+
RCALL WDATI
DEC AUX3
BRNE WSCRN2
LDI AUX3,64
WSCRN3: LPM AUX1,Z+
RCALL WDATD
DEC AUX3
BRNE WSCRN3
INC AUX2
CPI AUX2,0xC0
BRNE WSCRN1
RET
; SUBRUTINA DE ESPERA ANTES DE CONTINUAR
DELAY: LDI AUX1,5
CLR R15
CLR R14
DELAY1: DEC R15
BRNE DELAY1
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº11 Diciembre 2011
DEC R14
BRNE DELAY1
DEC AUX1
BRNE DELAY1
RET
; TABLA DE DATOS PARA DIBUJAR LA CUADRÍCULA
PANT1: .DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº12 Diciembre 2011
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
.DB 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
; TABLA PARA “ESCUELA POLITECNICA NACIONAL Junio 2011”
PANT2:
.INCLUDE "EPN.ASM"
;
.EXIT ; FIN DEL MÓDULO FUENTE
CONTENIDO DEL ARCHIVO “EPN.ASM” QUE SE OBTIENE MEDIANTE
EL SOFTWARE bitmap2LCD V1.9C, CONFIGURADO PARA GENERAR LA
TABLA DE DATOS EN FORMATO DE LENGUAJE ASSEMBLER DESDE EL
ARCHIVO “EPN.BMP”
; Data generated with bitmap2LCD V1.9C
; 15/06/2011 16:59:36
; Bitmap Source file : NewBitmap.bmp
; Byte width format is 8 bit
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x04 , 0xFC , 0xFC , 0x84 , 0xC4 , 0xCC , 0x08 , 0x00
.DB 0x00 , 0x38 , 0x7C , 0xC4 , 0x8C , 0x1C , 0x1C , 0x00
.DB 0x00 , 0x00 , 0xF0 , 0xF8 , 0x0C , 0x04 , 0x0C , 0x1C
.DB 0x10 , 0x00 , 0x04 , 0xFC , 0xFC , 0x04 , 0x04 , 0xFC
.DB 0xFC , 0x04 , 0x00 , 0x00 , 0x04 , 0xFC , 0xFC , 0x84
.DB 0xC4 , 0xCC , 0x08 , 0x00 , 0x00 , 0x04 , 0xFC , 0xFC
.DB 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xE0
.DB 0xFC , 0xFC , 0xE0 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x10 , 0x1F , 0x1F , 0x10 , 0x11 , 0x19 , 0x08 , 0x00
.DB 0x00 , 0x1C , 0x1C , 0x18 , 0x11 , 0x1F , 0x0E , 0x00
.DB 0x00 , 0x00 , 0x07 , 0x0F , 0x18 , 0x10 , 0x10 , 0x18
.DB 0x08 , 0x00 , 0x00 , 0x0F , 0x1F , 0x10 , 0x10 , 0x1F
.DB 0x0F , 0x00 , 0x00 , 0x00 , 0x10 , 0x1F , 0x1F , 0x10
.DB 0x11 , 0x19 , 0x08 , 0x00 , 0x00 , 0x10 , 0x1F , 0x1F
.DB 0x10 , 0x18 , 0x1C , 0x04 , 0x00 , 0x10 , 0x1F , 0x1F
.DB 0x12 , 0x12 , 0x1F , 0x1F , 0x10 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº13 Diciembre 2011
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x02 , 0xFE , 0xFE , 0x42 , 0x42 , 0x7E , 0x3C , 0x00
.DB 0x00 , 0xF8 , 0xFC , 0x06 , 0x02 , 0x06 , 0xFC , 0xF8
.DB 0x00 , 0x00 , 0x02 , 0xFE , 0xFE , 0x02 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0xFE , 0xFE , 0x02
.DB 0x00 , 0x00 , 0x00 , 0x08 , 0x0E , 0x06 , 0xFE , 0xFE
.DB 0x06 , 0x0E , 0x08 , 0x00 , 0x00 , 0x02 , 0xFE , 0xFE
.DB 0x42 , 0xE2 , 0xE6 , 0x04 , 0x00 , 0x00 , 0xF8 , 0xFC
.DB 0x06 , 0x02 , 0x06 , 0x0E , 0x08 , 0x00 , 0x02 , 0xFE
.DB 0xFE , 0x78 , 0xE2 , 0xFE , 0xFE , 0x02 , 0x00 , 0x00
.DB 0x00 , 0x02 , 0xFE , 0xFE , 0x02 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0xF8 , 0xFC , 0x06 , 0x02 , 0x06 , 0x0E , 0x08
.DB 0x00 , 0x00 , 0x80 , 0xF0 , 0x7E , 0x7E , 0xF0 , 0x80
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x08 , 0x0F , 0x0F , 0x08 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x03 , 0x07 , 0x0C , 0x08 , 0x0C , 0x07 , 0x03
.DB 0x00 , 0x00 , 0x08 , 0x0F , 0x0F , 0x08 , 0x0C , 0x0E
.DB 0x02 , 0x00 , 0x00 , 0x00 , 0x08 , 0x0F , 0x0F , 0x08
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x08 , 0x0F , 0x0F
.DB 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x08 , 0x0F , 0x0F
.DB 0x08 , 0x08 , 0x0C , 0x04 , 0x00 , 0x00 , 0x03 , 0x07
.DB 0x0C , 0x08 , 0x08 , 0x0C , 0x04 , 0x00 , 0x08 , 0x0F
.DB 0x0F , 0x08 , 0x01 , 0x0F , 0x0F , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x08 , 0x0F , 0x0F , 0x08 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x03 , 0x07 , 0x0C , 0x08 , 0x08 , 0x0C , 0x04
.DB 0x00 , 0x08 , 0x0F , 0x0F , 0x09 , 0x09 , 0x0F , 0x0F
.DB 0x08 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x01 , 0xFF , 0xFF , 0x3C , 0xF1 , 0xFF , 0xFF , 0x01
.DB 0x00 , 0x00 , 0xC0 , 0xF8 , 0xBF , 0xBF , 0xF8 , 0xC0
.DB 0x00 , 0x00 , 0x00 , 0xFC , 0xFE , 0x03 , 0x01 , 0x03
.DB 0x07 , 0x04 , 0x00 , 0x00 , 0x00 , 0x01 , 0xFF , 0xFF
.DB 0x01 , 0x00 , 0x00 , 0x00 , 0x00 , 0xFC , 0xFE , 0x03
.DB 0x01 , 0x03 , 0xFE , 0xFC , 0x00 , 0x01 , 0xFF , 0xFF
.DB 0x3C , 0xF1 , 0xFF , 0xFF , 0x01 , 0x00 , 0x00 , 0xC0
.DB 0xF8 , 0xBF , 0xBF , 0xF8 , 0xC0 , 0x00 , 0x00 , 0x00
.DB 0x01 , 0xFF , 0xFF , 0x01 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x84 , 0x87 , 0x87 , 0x84 , 0x80 , 0x87 , 0x87 , 0x80
.DB 0x80 , 0x84 , 0x87 , 0x87 , 0x84 , 0x84 , 0x87 , 0x87
.DB 0x84 , 0x80 , 0x80 , 0x81 , 0x83 , 0x86 , 0x84 , 0x84
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº14 Diciembre 2011
.DB 0x86 , 0x82 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x87
.DB 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0x81 , 0x83 , 0x86
.DB 0x84 , 0x86 , 0x83 , 0x81 , 0x80 , 0x84 , 0x87 , 0x87
.DB 0x84 , 0x80 , 0x87 , 0x87 , 0x80 , 0x80 , 0x84 , 0x87
.DB 0x87 , 0x84 , 0x84 , 0x87 , 0x87 , 0x84 , 0x80 , 0x80
.DB 0x84 , 0x87 , 0x87 , 0x84 , 0x86 , 0x87 , 0x81 , 0x80
.DB 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80
.DB 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80
.DB 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80
.DB 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0x03 , 0x03 , 0xFF
.DB 0xFF , 0x0F , 0x0F , 0xFF , 0xFF , 0xFF , 0x0F , 0x0F
.DB 0xFF , 0xFF , 0x0F , 0x0F , 0x9F , 0xCF , 0xCF , 0x0F
.DB 0x1F , 0xFF , 0xFF , 0x0B , 0x0B , 0xFF , 0xFF , 0x3F
.DB 0x1F , 0x8F , 0xCF , 0x8F , 0x1F , 0x3F , 0xFF , 0xFF
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0x3F , 0x1F , 0x8F , 0xCF
.DB 0x9F , 0x03 , 0x03 , 0xFF , 0xFF , 0x3F , 0x1F , 0x4F
.DB 0x4F , 0x4F , 0x1F , 0x3F , 0xFF , 0xFF , 0x03 , 0x03
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xCF , 0xC7 , 0xF3
.DB 0x73 , 0x33 , 0x83 , 0xC7 , 0xFF , 0x0F , 0x07 , 0xE3
.DB 0xF3 , 0xE3 , 0x07 , 0x0F , 0xFF , 0xFF , 0xCF , 0xE7
.DB 0x03 , 0x03 , 0xFF , 0xFF , 0xFF , 0xFF , 0xCF , 0xE7
.DB 0x03 , 0x03 , 0xFF , 0xFF , 0xFF , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
.DB 0x78 , 0x70 , 0x73 , 0x73 , 0x73 , 0x70 , 0x78 , 0x7F
.DB 0x7F , 0x78 , 0x70 , 0x73 , 0x73 , 0x79 , 0x70 , 0x70
.DB 0x7F , 0x7F , 0x70 , 0x70 , 0x7F , 0x7F , 0x7F , 0x70
.DB 0x70 , 0x7F , 0x7F , 0x70 , 0x70 , 0x7F , 0x7F , 0x7C
.DB 0x78 , 0x71 , 0x73 , 0x71 , 0x78 , 0x7C , 0x7F , 0x7F
.DB 0x7F , 0x7F , 0x7F , 0x7F , 0x7C , 0x78 , 0x71 , 0x73
.DB 0x79 , 0x70 , 0x70 , 0x7F , 0x7F , 0x7C , 0x78 , 0x72
.DB 0x72 , 0x72 , 0x72 , 0x7A , 0x7F , 0x7F , 0x70 , 0x70
.DB 0x7F , 0x7F , 0x7F , 0x7F , 0x7F , 0x73 , 0x71 , 0x70
.DB 0x72 , 0x73 , 0x73 , 0x73 , 0x7F , 0x7C , 0x78 , 0x71
.DB 0x73 , 0x71 , 0x78 , 0x7C , 0x7F , 0x7F , 0x7F , 0x7F
.DB 0x70 , 0x70 , 0x7F , 0x7F , 0x7F , 0x7F , 0x7F , 0x7F
.DB 0x70 , 0x70 , 0x7F , 0x7F , 0x7F , 0x00 , 0x00 , 0x00
.DB 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
; ******************
; 1024 Bytes
; End of LCD Pattern
; Save table and see info file C:\Users\JVelarde\Documents\NewBitmap.doc
ESCRITURA EN EL GLCD POR VENTANAS
En muchas aplicaciones no se necesita modificar toda la pantalla, lo
que significa escribir 1024 bytes en la RAM del controlador; sino, sola una parte pequeña de la pantalla que puede ser cuadrada o
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº15 Diciembre 2011
rectangular, denomina una “ventana”. Por ejemplo ventanas de
16x16 pixeles, de 8x16 pixeles, de 8x8 pixeles, etc.
La escritura de ventanas significa escribir menos número de bytes: para ventanas de 16x16 se necesitan escribir 32 bytes, para ventanas
de 8x16 se escriben 16 bytes, para 8x8 solo 8 bytes, etc. Por lo tanto, las tablas son más pequeñas; el principal problema al escribir
las ventanas es elaborar el algoritmo para establecer la ubicación en base a la numeración que se asigne a las ventanas.
VENTANAS DE 16x16
División de la pantalla: el GLCD de 128x64 pixeles se divide en 32
ventanas de 16x16.
Cada ventana está compuesta por 32 bytes, los 16 primeros ocupan
una página inferior; mientras que los otros 16 bytes ocupan la siguiente página superior. En ambos casos la dirección inicial para el
contador de las columnas es la misma. También, en la escritura de la ventana se toma en cuenta la sección en que se encuentra.
Numeración que se asigna: la numeración va de 0 a 31.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº16 Diciembre 2011
La forma que se indica en el gráfico favorece a la obtención de las
páginas que ocupa la ventana, de la dirección inicial de las columnas
y de la sección a la que pertenece, a partir del número de la ventana.
Ubicación de las ventanas: la siguiente tabla muestra la relación
entre el número de la ventana con la ubicación.
También se muestra el número binario de donde se obtiene los valores de la ubicación, de la siguiente forma:
Si B4 B3 B2 B1 B0 es el Número de la Página en binario con 5 bits
La ventana que pertenece a la SECCIÓN DERECHA tiene B2 = 1
La PÁGINA INFERIOR es igual a los bits B4 B3 multiplicados por 2
La COLUMNA INICIAL es igual a los bits B1 B0 multiplicados por 16
Subrutina para escribir ventanas de 16x16: considerando que ya
existen las subrutinas para escribir Comando y Datos en las secciones
izquierda y derecha del GLCD, la siguiente subrutina permite escribe
los 32 datos contenidos en la tabla apuntada por el Registro Puntero
Z en la ventana cuyo número está contenido en el Registro AUX5, si
este número excede el rango permitido la subrutina finaliza, sin
escribir en el GLCD.
Ventana Binario SecciónPágina Inferior
Página Superior
Columna
0 00000 Izq. 0 1 0
1 00001 Izq. 0 1 16
2 00010 Izq. 0 1 32
3 00011 Izq. 0 1 48
4 00100 Der. 0 1 0
5 00101 Der. 0 1 16
6 00110 Der. 0 1 32
7 00111 Der. 0 1 48
8 01000 Izq. 2 3 0
------ ------ ------ ------ ------ ------
15 01111 Der. 2 3 48
16 10000 Izq. 4 5 0
------ ------ ------ ------ ------ ------
23 10111 Der. 4 5 48
24 11000 Izq. 6 7 0
------ ------ ------ ------ ------ ------
31 11111 Der. 6 7 48
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº17 Diciembre 2011
; SUBRUTINA PARA ESCRIBIR VENTANAS DE 16x16
WWIN: CPI AUX5,32
BRCC WWIN7
MOV AUX2,AUX5
ANDI AUX2,0B00011000
LSR AUX2
LSR AUX2
LDI AUX1,0xB8
ADD AUX1,AUX2
RCALL WCMDI
RCALL WCMDD
MOV AUX3,AUX5
ANDI AUX3,0B00000011
SWAP AUX3
LDI AUX1,0x40
ADD AUX1,AUX3
RCALL WCMDI
RCALL WCMDD
LDI AUX4,16
WWIN1: LPM AUX1,Z+
SBRC AUX5,2
RJMP WWIN2
RCALL WDATI
RJMP WWIN3
WWIN2: RCALL WDATD
WWIN3: DEC AUX4
BRNE WWIN1
INC AUX2
LDI AUX1,0xB8
ADD AUX1,AUX2
RCALL WCMDI
RCALL WCMDD
LDI AUX1,0x40
ADD AUX1,AUX3
RCALL WCMDI
RCALL WCMDD
LDI AUX4,16
WWIN4: LPM AUX1,Z+
SBRC AUX5,2
RJMP WWIN5
RCALL WDATI
RJMP WWIN6
WWIN5: RCALL WDATD
WWIN6: DEC AUX4
BRNE WWIN4
WWIN7: RET
PROGRAMA PRINCIPAL PARA ESCRIBIR VENTANAS DE 16x16
.NOLIST
.INCLUDE "m164pdef.inc"
.LIST
; DEFINICIÓN DE ETIQUETAS PARA LOS REGISTROS
.DEF AUX1 = R16 ; REGISTRO AUXILIAR1
.DEF AUX2 = R17 ; REGISTRO AUXILIAR2
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº18 Diciembre 2011
.DEF AUX3 = R18 ; REGISTRO AUXILIAR3
.DEF AUX4 = R19 ; REGISTRO AUXILIAR4
.DEF AUX5 = R20 ; REGISTRO AUXILIAR5
; SEGMENTO DE PROGRAMA o MEMORIA FLASH
.CSEG
; INICIALIZACIÓN DEL STACK
PROGP: LDI AUX1,LOW(RAMEND)
OUT SPL,AUX1
LDI AUX1,HIGH(RAMEND)
OUT SPH,AUX1
;
RCALL RSTGLCD
;
REPITA: LDI ZL,LOW(CARAFP<<1) ; CARA FELIZ POSITIVA
LDI ZH,HIGH(CARAFP<<1)
LDI AUX5,0
RCALL WWIN
RCALL DELAY
LDI ZL,LOW(CARAFN<<1) ; CARA FELIZ NEGATIVA
LDI ZH,HIGH(CARAFN<<1)
LDI AUX5,20
RCALL WWIN
RCALL DELAY
LDI ZL,LOW(CARATP<<1) ; CARA TRISTE POSITIVA
LDI ZH,HIGH(CARATP<<1)
LDI AUX5,11
RCALL WWIN
RCALL DELAY
LDI ZL,LOW(CARATN<<1) ; CARA TRISTE NEGATIVA
LDI ZH,HIGH(CARATN<<1)
LDI AUX5,7
RCALL WWIN
RCALL DELAY
LDI ZL,LOW(NEGRO<<1) ; VENTANA EN NEGRO
LDI ZH,HIGH(NEGRO<<1)
LDI AUX5,31
RCALL WWIN
RCALL DELAY
LDI ZL,LOW(BLANCO<<1) ; VENTANA EN BLANCO
LDI ZH,HIGH(BLANCO<<1)
LDI AUX5,24
RCALL WWIN
RCALL DELAY
RCALL CSCRN
RCALL DELAY
;
FINAL: RJMP REPITA
;
; TABLA PARA VENTANA CON UNA CARA FELIZ POSITIVA
CARAFP:
.DB 0x00 , 0xC0 , 0x30 , 0x08 , 0x04 , 0x64 , 0x62 , 0x02
.DB 0x82 , 0x02 , 0x62 , 0x64 , 0x04 , 0x08 , 0x30 , 0xC0
.DB 0x00 , 0x07 , 0x18 , 0x20 , 0x40 , 0x44 , 0x88 , 0x8A
.DB 0x8B , 0x8A , 0x88 , 0x44 , 0x40 , 0x20 , 0x18 , 0x07
;
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº19 Diciembre 2011
; TABLA PARA VENTANA CON UNA CARA TRISTE POSITIVA
CARATP:
.DB 0x00 , 0xC0 , 0x30 , 0x08 , 0x04 , 0x64 , 0x62 , 0x02
.DB 0x82 , 0x02 , 0x62 , 0x64 , 0x04 , 0x08 , 0x30 , 0xC0
.DB 0x00 , 0x07 , 0x18 , 0x20 , 0x40 , 0x50 , 0x88 , 0x8A
.DB 0x8B , 0x8A , 0x88 , 0x50 , 0x40 , 0x20 , 0x18 , 0x07
;
; TABLA PARA VENTANA CON UNA CARA FELIZ NEGATIVA
CARAFN:
.DB 0xFF , 0x3F , 0xCF , 0xF7 , 0xFB , 0x9B , 0x9D , 0xFD
.DB 0x7D , 0xFD , 0x9D , 0x9B , 0xFB , 0xF7 , 0xCF , 0x3F
.DB 0xFF , 0xF8 , 0xE7 , 0xDF , 0xBF , 0xBB , 0x77 , 0x75
.DB 0x74 , 0x75 , 0x77 , 0xBB , 0xBF , 0xDF , 0xE7 , 0xF8
;
; TABLA PARA VENTANA CON UNA CARA TRISTE NEGATIVA
CARATN:
.DB 0xFF , 0x3F , 0xCF , 0xF7 , 0xFB , 0x9B , 0x9D , 0xFD
.DB 0x7D , 0xFD , 0x9D , 0x9B , 0xFB , 0xF7 , 0xCF , 0x3F
.DB 0xFF , 0xF8 , 0xE7 , 0xDF , 0xBF , 0xAF , 0x77 , 0x75
.DB 0x74 , 0x75 , 0x77 , 0xAF , 0xBF , 0xDF , 0xE7 , 0xF8
;
; TABLA PARA VENTANA EN NEGRO
NEGRO:
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
.DB 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
;
; TABLA PARA VENTANA EN BLANCO CON UN MARCO
BLANCO:
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01
.DB 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80
.DB 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
Pantallas obtenidas en la simulación del programa, en el que se ha
incluido la siguiente subrutina que borra toda pantalla, en la que se
escribe 1024 bytes con 0x00.
CSCRN: LDI AUX2,0xB8
CSCRN1: MOV AUX1,AUX2
RCALL WCMDI
RCALL WCMDD
LDI AUX1,0x40
RCALL WCMDI
RCALL WCMDD
LDI AUX3,64
CSCRN2: CLR AUX1
RCALL WDATI
DEC AUX3
BRNE CSCRN2
LDI AUX3,64
CSCRN3: CLR AUX1
RCALL WDATD
DEC AUX3
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº20 Diciembre 2011
BRNE CSCRN3
INC AUX2
CPI AUX2,0xC0
BRNE CSCRN1
RET
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº21 Diciembre 2011
ESCRITURA DE SERIE DE VENTANAS
Al tener varias ventanas que pueden ser escritas en diferentes posiciones de la pantalla, se puede escribir la serie de ventanas
mediante una sola subrutina que obtenga el orden de la serie desde una tabla que puede estar en la FLASH o en la SRAM.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº22 Diciembre 2011
El valor obtenido desde esa tabla, permite buscar en otra tabla la
dirección donde se encuentran los datos de la ventana que se va a escribir en la serie; por lo tanto, se debe generar junto con los datos
de las ventanas la tabla de direcciones.
PROGRAMA PRINCIPAL PARA ESCRIBIR SERIES DE VENTANAS
.NOLIST
.INCLUDE "m164pdef.inc"
.LIST
; DEFINICIÓN DE ETIQUETAS PARA LOS REGISTROS
.DEF AUX1 = R16 ; REGISTRO AUXILIAR1
.DEF AUX2 = R17 ; REGISTRO AUXILIAR2
.DEF AUX3 = R18 ; REGISTRO AUXILIAR3
.DEF AUX4 = R19 ; REGISTRO AUXILIAR4
.DEF AUX5 = R20 ; REGISTRO AUXILIAR5
; SEGMENTO DE PROGRAMA o MEMORIA FLASH
.CSEG
; INICIALIZACIÓN DEL STACK Y DE LOS PÓRTICOS
PROGP: LDI AUX1,LOW(RAMEND)
OUT SPL,AUX1
LDI AUX1,HIGH(RAMEND)
OUT SPH,AUX1
;
RCALL RSTGLCD
;
REPITA: LDI ZL,LOW(ORDEN1<<1)
LDI ZH,HIGH(ORDEN1<<1)
RCALL SERIE
RCALL DELAY
RCALL CSCRN
LDI ZL,LOW(ORDEN2<<1)
LDI ZH,HIGH(ORDEN2<<1)
RCALL SERIE
RCALL DELAY
RCALL CSCRN
LDI ZL,LOW(ORDEN3<<1)
LDI ZH,HIGH(ORDEN3<<1)
RCALL SERIE
RCALL DELAY
RCALL CSCRN
;
FINAL: RJMP REPITA
;
ORDEN1: .DB 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
.DB 16,17,18,19,20,21,24,23,24,25,26,27,28,29,30,31
ORDEN2: .DB 16,17,18,19,20,21,24,23,24,25,26,27,28,29,30,31
.DB 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
ORDEN3: .DB 3,3,3,6,6,6,8,9,10,23,17,11,12,21,13,14
.DB 16,18,19,0,1,2,20,24,24,25,31,27,28,29,30,15
;
.INCLUDE “CASILLAS.ASM”
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº23 Diciembre 2011
Subrutina para escribir serie de 32 ventanas
Esta subrutina considera que en la tabla DIRVEN se encuentran
ordenadas las direcciones iniciales de las tablas de datos de las 32
ventanas que conforman la serie.
SERIE: LDI AUX5,0
SERIE1: LPM AUX3,Z+
MOVW Y,Z ; SALVAR EL PUNTERO DE LA SERIE
LDI ZL,LOW(DIRVEN<<1)
LDI ZH,HIGH(DIRVEN<<1)
SERIE2: LPM AUX1,Z+
LPM AUX2,Z+
CPI AUX3,0
BREQ SERIE3
DEC AUX3
RJMP SERIE2
SERIE3: MOVW Z,AUX1
RCALL WWIN
MOVW Z,Y
INC AUX5
CPI AUX5,32
BRNE SERIE1
RET
Resultados de la simulación:
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº24 Diciembre 2011
A continuación está el listado del archivo “CASILLAS.ASM” que contiene los datos para escribir las 32 ventanas de la serie y la tabla de direcciones iniciales de estos datos.
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº25 Diciembre 2011
; VENTANAS CON LETRAS Y DÍGITOS
VEN00: ; LETRA A
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xD1
.DB 0x31 , 0xC1 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x85
.DB 0x81 , 0x85 , 0x87 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN01: ; LETRA B
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x91
.DB 0x91 , 0x91 , 0xE1 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84
.DB 0x84 , 0x84 , 0x85 , 0x82 , 0x80 , 0x80 , 0x80 , 0xFF
VEN02: ; LETRA C
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xF1 , 0x11
.DB 0x11 , 0x11 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x87 , 0x84
.DB 0x84 , 0x84 , 0x86 , 0x82 , 0x80 , 0x80 , 0x80 , 0xFF
VEN03: ; LETRA D
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x11
.DB 0x11 , 0x11 , 0xF1 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84
.DB 0x84 , 0x84 , 0x87 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN04: ; LETRA E
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x91
.DB 0xD1 , 0x11 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84
.DB 0x85 , 0x84 , 0x86 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN05: ; LETRA F
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1
.DB 0x91 , 0x11 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87
.DB 0x84 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN06: ; LETRA G
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0xE1 , 0x11 , 0x11
.DB 0x11 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x83 , 0x84 , 0x84
.DB 0x84 , 0x87 , 0x81 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN07: ; LETRA H
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x91 , 0x81
.DB 0x91 , 0xF1 , 0x11 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84 , 0x80
.DB 0x84 , 0x87 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN08: ; LETRA I
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0x11
.DB 0xF1 , 0x11 , 0x11 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x84
.DB 0x87 , 0x84 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN09: ; LETRA J
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01
.DB 0x11 , 0x11 , 0xF1 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x87 , 0x84
.DB 0x84 , 0x86 , 0x81 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN10: ; LETRA K
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x11
.DB 0x81 , 0x41 , 0x31 , 0x11 , 0x11 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x85
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº26 Diciembre 2011
.DB 0x80 , 0x81 , 0x86 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN11: ; LETRA L
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xF1
.DB 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x87
.DB 0x84 , 0x84 , 0x84 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN12: ; LETRA M
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x11
.DB 0x61 , 0x11 , 0xF1 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x80
.DB 0x80 , 0x80 , 0x87 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN13: ; LETRA N
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x61
.DB 0x81 , 0x11 , 0xF1 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84
.DB 0x80 , 0x83 , 0x87 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN14: ; LETRA O
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0xE1 , 0x11 , 0x11
.DB 0x11 , 0x11 , 0x31 , 0xE1 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x83 , 0x84 , 0x84
.DB 0x84 , 0x84 , 0x86 , 0x83 , 0x80 , 0x80 , 0x80 , 0xFF
VEN15: ; LETRA P
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x11
.DB 0x11 , 0xB1 , 0x41 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x85
.DB 0x81 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN16: ; LETRA Q
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0xE1 , 0x11 , 0x11
.DB 0x11 , 0x11 , 0x31 , 0xE1 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x83 , 0x84 , 0x84
.DB 0x84 , 0x84 , 0x86 , 0x87 , 0x84 , 0x80 , 0x80 , 0xFF
VEN17: ; LETRA R
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x91
.DB 0x91 , 0x91 , 0x61 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x87 , 0x84
.DB 0x80 , 0x81 , 0x82 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN18: ; LETRA S
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x61 , 0x91
.DB 0x91 , 0x91 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x86 , 0x84
.DB 0x84 , 0x84 , 0x83 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN19: ; LETRA T
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x71 , 0x11
.DB 0xF1 , 0x11 , 0x71 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80
.DB 0x87 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN20: ; LETRA U
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x11
.DB 0x01 , 0x11 , 0xF1 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x83 , 0x84
.DB 0x84 , 0x84 , 0x83 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN21: ; LETRA V
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0xF1 , 0x01
.DB 0x01 , 0x91 , 0x71 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x83
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº27 Diciembre 2011
.DB 0x86 , 0x81 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN22: ; LETRA W
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x31 , 0xD1 , 0x01
.DB 0xC1 , 0x01 , 0xD1 , 0x31 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x87 , 0x83
.DB 0x80 , 0x83 , 0x87 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN23: ; LETRA X
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0x31 , 0x71
.DB 0x81 , 0x51 , 0x31 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x86 , 0x85
.DB 0x80 , 0x85 , 0x86 , 0x84 , 0x80 , 0x80 , 0x80 , 0xFF
VEN24: ; LETRA Y
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x11 , 0x31 , 0x41
.DB 0x81 , 0x41 , 0x31 , 0x11 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x84
.DB 0x87 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN25: ; LETRA Z
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x71 , 0x11
.DB 0x91 , 0x71 , 0x31 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x86 , 0x85
.DB 0x84 , 0x84 , 0x87 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN26: ; DIGITO 0
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xE1 , 0x11
.DB 0x11 , 0x11 , 0xE1 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x83 , 0x84
.DB 0x84 , 0x84 , 0x83 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN27: ; DIGITO 1
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x21 , 0x31
.DB 0xF1 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x84
.DB 0x87 , 0x84 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN28: ; DIGITO 2
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x21 , 0x11
.DB 0x11 , 0x91 , 0x61 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x84 , 0x86
.DB 0x85 , 0x84 , 0x84 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN29: ; DIGITO 3
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x21 , 0x11
.DB 0x91 , 0x91 , 0x61 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x86 , 0x84
.DB 0x84 , 0x84 , 0x83 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN30: ; DIGITO 4
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xC1
.DB 0x31 , 0xF1 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x81 , 0x81
.DB 0x85 , 0x87 , 0x85 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
VEN31: ; DIGITO 5
.DB 0xFF , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0xF1 , 0xD1
.DB 0x51 , 0x51 , 0x91 , 0x01 , 0x01 , 0x01 , 0x01 , 0xFF
.DB 0xFF , 0x80 , 0x80 , 0x80 , 0x80 , 0x80 , 0x86 , 0x84
.DB 0x84 , 0x84 , 0x83 , 0x80 , 0x80 , 0x80 , 0x80 , 0xFF
; TABLA DE DIRECCIONES INICIALES DE LOS DATOS DE LAS 32 VENTANAS
DIRVEN:
.DW VEN00<<1,VEN01<<1,VEN02<<1,VEN03<<1
.DW VEN04<<1,VEN05<<1,VEN06<<1,VEN07<<1
EPN SISTEMAS MICROPROCESADOS DETRI
Ing. Jaime Velarde Página Nº28 Diciembre 2011
.DW VEN08<<1,VEN09<<1,VEN10<<1,VEN11<<1
.DW VEN12<<1,VEN13<<1,VEN14<<1,VEN15<<1
.DW VEN16<<1,VEN17<<1,VEN18<<1,VEN19<<1
.DW VEN20<<1,VEN21<<1,VEN22<<1,VEN23<<1
.DW VEN24<<1,VEN25<<1,VEN26<<1,VEN27<<1
.DW VEN28<<1,VEN29<<1,VEN30<<1,VEN31<<1