Professional Documents
Culture Documents
forever loop
If direccion = 128 Then ; se acabo el mensaje? despliega espacios
direccion = 0 ; pendiente a reiniciar desde el principio
End If ; no more data On EEPROM? start over
EEPROM get character from(direccion) ; lee dato / Read the character from the ee
pom
If caracter = 10 Then ; si caracter = 10, inicia de nuevo
caracter = " " ; If character = 10, start over
direccion = 255
End If
ancho = 4 ; Define el ancho de la letra si es diferente
; startdard character is 4 bits wide
If caracter = 1 Then ; si caracter = 1, una pausa de 4 secs
pausa = 50 ; If character = 1, pause the display
; scroll procedure
; procedimiento del desplegado
For 9 loop ; scroll delay / desplegado >= lento
indice = 0x40 ; direccion donde comienza memoria display
; display memory address
pin a6 = On ; activa la columna a desplazar
; activate column To display
assembler nop ; little delay
While indice < ultima_c loop ; hace el barrido del display(cambiar al ancho del
display)
; loop While EEPROM have more chars
FSR = indice ; FSR & INDF are pic registers
caracter = INDF ; frs & INDF son registros del pic
pin a7 = off
port b = all Input ; turn off port b And scroll display
pin a7 = On ; desplaza la col.
port b = caracter ; despliega valor de la columna
port b = all Output ; turn On port b
pin a6 = off ; signal To clock On shift register
indice = indice + 1 ; siguiente columna / Next column
delay 200usec
End loop
End loop ; termina loop del scroll / End of scroll
; If no pause, scroll all display
; si no hay pausa, realiza es corrimiento del display
; scrolls the display memory
If pausa = 0 Then
c0 = c1
c1 = c2
c2 = c3
c3 = c4
c4 = c5
c5 = c6
c6 = c7
c7 = c8
c8 = c9
c9 = c10
c10 = c11
c11 = c12
c12 = c13
c13 = c14
c14 = c15
c15 = c16
c16 = c17
c17 = c18
c18 = c19
c19 = c20
c20 = c21
c21 = c22
c22 = c23
c23 = c24
c24 = c25
c25 = c26
c26 = c27
c27 = c28
c28 = c29
c29 = c30
ancho = ancho - 1 ; controla el momento de cargar otro caracter
Else ; controls when another character is needed
pausa = pausa - 1
End If
End loop ; si scroll = columnas, carga otro caracter
; If scroll = columns, load another character
direccion = direccion + 1
End loop