Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/05/02 12:37
Read: times


 
#18348 - LCD using 4 bit interface
Hi All!
I have made 4-bit interface between LCD and '52 based system. LCD is using HD44780 controller (I have tried 2x16,4x20,2x20 displays). Nothing special... But in this moment I am trying to read ddram (characters code) through my 4-bit interface and as a result of reading I get:
-the first 4 bits are OK,
-the second 4 bits are always F0H.

I have been trying several ways but the result is always the same.

And my question is: is it possible to read bytes from ddram memory in 4 bit mode? Is there anybody who has done it?

I have no problem using 8 bit mode.

Regards,
Jacek

PS
Here is the part od my code:

LcdReadByte:
SETB lcdreg
SETB lcdread
MOV P2,#0FFH
SETB lcdenable
MOV A,P2
SETB lcdenable
MOV R7,A

MOV P2,#0FFH
CLR lcdenable
MOV A,P2
CLR lcdenable
SWAP A
ANL A,#0FH
ORL A,R7
CALL LcdWait
RET



LcdWait:
CLR lcdreg
SETB lcdread
SETB lcdenable
SETB P2.7 JB P2.7,$
CLR lcdenable
SETB lcdenable
NOP
CLR lcdenable
RET



List of 4 messages in thread
TopicAuthorDate
LCD using 4 bit interface            01/01/70 00:00      
RE: LCD using 4 bit interface            01/01/70 00:00      
RE: LCD using 4 bit interface :Thomas            01/01/70 00:00      
RE: LCD using 4 bit interface :Thomas            01/01/70 00:00      

Back to Subject List