tarts
Member level 2

I downloaded this code for 3310 LCD
**broken link removed**
I really don't completely unerstand the dt directive. There are some text stringss just before the main loop
this is the subroutine to write the string
The problem is, when I move the text string for example to the end of the main loop, it doesn't work. although it is on the same page, I get no stack overflow error in Proteus, but only 1-2 random characters are displayed. How can I move the strings to other place and still have a working code?
**broken link removed**
I really don't completely unerstand the dt directive. There are some text stringss just before the main loop
Code:
message dt "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 @#$%&/()*+-",0xFD
continua ;-----apunta a una posicion grafica del LCD donde empezar a escribir
movlw .0 ;Y address
call Y_address
movlw .0 ;X address
call X_address
movlw message ;<---- poner aqui la etiqueta del mensaje PCL-LSB
movwf rotulo ;direcciona al mensaje que se quiere visualizar
call lee_rotulo
Main ; main loop starts here
Code:
;############# lectura de la flash de programa en tiempo de ejecucion #######################
lee_rotulo movf rotulo,W ;carga el vector donde apunta la etiqueta del mensaje
bsf STATUS, RP1 ;
bcf STATUS, RP0 ;Banco 2
movwf EEADR
movlw 0x00 ;util si los mensajes estan en otra pagina de memoria
movwf EEADRH
bsf STATUS, RP0 ;banco 3
bsf EECON1,EEPGD ;puntero a codigo de programa
bsf EECON1,RD ;inicia la lectura
nop ;espera 2 nops para concluir la lectura
nop ;(obligatorio)
bcf STATUS, RP0 ;banco 2
movf EEDATA, W ;byte bajo
bcf STATUS, RP1 ;banco 0
movwf caracter
bsf STATUS, RP1 ;banco 2
; movf EEDATH, W ;byte alto
; movwf DATAH
bcf STATUS, RP1 ;banco 0
movlw 0xFD
subwf caracter,W
btfsc STATUS,Z
return ;finaliza la lectura
call pinta_letra
incf rotulo,f
goto lee_rotulo
The problem is, when I move the text string for example to the end of the main loop, it doesn't work. although it is on the same page, I get no stack overflow error in Proteus, but only 1-2 random characters are displayed. How can I move the strings to other place and still have a working code?