Hello.
I try to display the message "EPSON" in LCD such as it is shown the example 15.1.2 in page 108 ( i use indirect mode M6800 ). I can't clean the first and the second layer such as the steps 8 & 9 show. I disable the second and the third layer and now the LCD displays except the text and another characters. Next i tried to fill the layers by calling the MWRITE command and then i filled 1000 bytes with 20Hex. After that, without calling again the MWRITE even if i sent only one byte with 00Hex the displays cleans completely and doesn't show any character. I believe that the problem is the cleaning of the layers. Please can you tell me with which way can i clean the layers such as it is shown at the example 15.1.2 (Initalization Example).
Regards dXri.
I try to display the message "EPSON" in LCD such as it is shown the example 15.1.2 in page 108 ( i use indirect mode M6800 ). I can't clean the first and the second layer such as the steps 8 & 9 show. I disable the second and the third layer and now the LCD displays except the text and another characters. Next i tried to fill the layers by calling the MWRITE command and then i filled 1000 bytes with 20Hex. After that, without calling again the MWRITE even if i sent only one byte with 00Hex the displays cleans completely and doesn't show any character. I believe that the problem is the cleaning of the layers. Please can you tell me with which way can i clean the layers such as it is shown at the example 15.1.2 (Initalization Example).
Regards dXri.
Rich (BB code):
CALL LCD_DELAY
;SYSTEM_SET
MOVLW 0x40
CALL L_C_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x38
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x87
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x07
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x3F
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x49
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x7F
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x80
CALL L_D_WRITE
NOP
CALL LCD_DELAY
MOVLW 0x00
CALL L_D_WRITE
NOP
;SCROLL
MOVLW 0x44
CALL L_C_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x40
CALL L_D_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x10;3333
CALL L_D_WRITE
NOP
MOVLW 0x40
CALL L_D_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x04
CALL L_D_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x30
CALL L_D_WRITE
NOP
;HDOT SCR
MOVLW 0x5A
CALL L_C_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
;OVLAY
MOVLW 0x5B
CALL L_C_WRITE
NOP
MOVLW 0x01
CALL L_D_WRITE
NOP
;DISP ON/OFF
MOVLW 0x58
CALL L_C_WRITE
NOP
MOVLW 0x56
CALL L_D_WRITE
NOP
MWRITE
MOVLW 0x42
CALL L_C_WRITE
NOP
MOVLW 0x10
MOVWF REG3
CALL WWW
DECFSZ REG3,F
GOTO $-2
;MOVLW 0x01
;MOVWF REG4
;CALL AAA
;DECFSZ REG4,F
;GOTO $-2
;MOVLW 0xFF
;MOVWF REG4
;CALL QQQQ
;DECFSZ REG4,F
;GOTO $-2
;MOVLW 0xFF
;MOVWF REG4
;CALL QQQQ
;DECFSZ REG4,F
;GOTO $-2
;CSRW
MOVLW 0x46
CALL L_C_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
MOVLW 0x00
CALL L_D_WRITE
NOP
;CSRFORM
MOVLW 0x5D
CALL L_C_WRITE
NOP
MOVLW 0x04
CALL L_D_WRITE
NOP
MOVLW 0x86
CALL L_D_WRITE
NOP
CALL DELAY_NOISE
;DISP ON/OFF
MOVLW 0x59
CALL L_C_WRITE
NOP
;CSR DIR
MOVLW 0x4C
CALL L_C_WRITE
NOP
;MWRITE
MOVLW 0x42
CALL L_C_WRITE
NOP
MOVLW 0x20
CALL L_D_WRITE
NOP
MOVLW 0x45
CALL L_D_WRITE
NOP
MOVLW 0x50
CALL L_D_WRITE
NOP
MOVLW 0x53
CALL L_D_WRITE
NOP
MOVLW 0x4F
CALL L_D_WRITE
NOP
MOVLW 0x4E
CALL L_D_WRITE
NOP
LOP
GOTO LOP
QQQ
MOVLW 0x20
CALL L_D_WRITE
NOP
RETURN
QQQQ
MOVLW 0x00
CALL L_D_WRITE
NOP
RETURN
WWW
MOVLW 0xFF
MOVWF REG2
CALL QQQ
DECFSZ REG2,F
GOTO $-2
MOVLW 0xFF
MOVWF REG2
CALL QQQ
DECFSZ REG2,F
GOTO $-2
MOVLW 0xFF
MOVWF REG2
CALL QQQ
DECFSZ REG2,F
GOTO $-2
MOVLW 0xFF
MOVWF REG2
CALL QQQ
DECFSZ REG2,F
GOTO $-2
RETURN
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~DISPLAY DATA AND CURSOR ADDRESS READ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L_C_WRITE
BANK3
; MOVF TEMP_COMMAND,W
BCF PORTG,0 ; CS
BSF PORTG,1 ; A0
BCF PORTG,2 ; R/W
BSF PORTG,3 ; E
MOVWF PORTF
NOP
BCF PORTG,3 ; E
NOP
RETURN
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~DISPLAY DATA AND CURSOR ADDRESS READ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L_D_WRITE
BANK3
; MOVF TEMP_DATA,W
BCF PORTG,0 ; CS
BCF PORTG,1 ; A0
BCF PORTG,2 ; R/W
BSF PORTG,3 ; E
MOVWF PORTF
NOP
BCF PORTG,3 ; E
NOP
RETURN
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LCD DELAY~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LCD_DELAY ;10ms
MOVLW D'10' ;Y --> 10*10^-3=(Y*[(3*256+4)+1]*10^-6 --> Y~10 2 KATAXORITES (0.2sec max)
MOVWF LCD_DELAY1
;$-5
MOVLW D'256' ;X
MOVWF LCD_DELAY2
;$-1
DECFSZ LCD_DELAY2,1
GOTO $-1
DECFSZ LCD_DELAY1,1
GOTO $-5
RETURN
END
Attachments
-
132.5 KB Views: 11
-
177.6 KB Views: 13
-
1 MB Views: 6