On last year I have bought from a Hungarian Microchip-reseller-company an EDT LCD module, type is EW-162G0Gr. It is a 2 rowed, 2x16 pcs 5x7 black LCD display with backlight.
I would like to control it with PIC16F628A, internal 4 MHz oscillator. I wrote in the original initialization routine, but it is not works - ellectronic of this display has a BF flag, with which it can sign, when is not allowed any writing operation, while electronic is working.
I wrote the program, and wait 1->0 transition; it has not comes. What is the problem? May I wait more before actions?
So, I use this type metod; after it, cursor shall blinking:
fejesg
; 8 bits init
;
; wait 15-20 millisec No data should be transferred to or from the display during this time.
;
; RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; BF (BF=R/W !!!)cannot be checked before this command.
;
; wait 5 millisec No data should be transferred to or from the display during this time.
;
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; BF cannot be checked before this command.
;
; wait 100 mikrosec No data should be transferred to or from the display during this time.
;
; 0 0 0 0 1 1 x x x x Function Set Command: (8-Bit interface)
; After this command is written, BF can be checked.
;
; BF=DB7, which connected to RB3, BF=1 please wait, BF=0, ready
varak
banksel TRISB
bsf TRISB,3 ; change output to input
banksel PORTB
bsf PORTA,7 ; RW
btfsc PORTB,3
goto varak
bcf PORTA,7 ; RW
banksel TRISB
bcf TRISB,3 ; back to output
;
; 0 0 0 0 1 1 N F x x Function Set
; (Interface = 8 bits, Set No. of lines and display font)
;
; 0 0 0 0 0 0 1 0 0 0 Display OFF
; 0 0 0 0 0 0 0 0 0 1 Clear Display
; 0 0 0 0 0 0 0 1 I/D S Entry Mode Set:
; 0 0 0 0 0 0 1 1 C B Display ON (Set C and B for cursor/Blink options.)
;
;Initialization Complete, Display Ready.
;BF should be checked before each of the instructions starting with Display OFF.