Connecting a LCD to Z80

Thread Starter

Robin Mitchell

Joined Oct 25, 2009
819
well the so called "enable" pin appears to behave as a read/write line. you toggle E to do stuff so i think you would use an AND gate output to E, one input to RD and the other one to WR. That way, if you read or write it toggles the E input.
 

kubeek

Joined Sep 20, 2005
5,731
That would be a bad idea. You need different bit on RS to select between command and data input, as well as on RW because you really should check the status codes to make sure the display has finished doing what you wanted.

The proper way to interface it is to first set the data and RS and RW for what you want, then toggle the E bit on and off to execute the command. Then set for bits for read and read the busy flag until it is cleared, then issue next command.
 

Attachments

kubeek

Joined Sep 20, 2005
5,731
I never used z80. Are those ce, iorq and m1 some kind of bus control outputs?
It still seems to me that using only one pin and no external logic is easier.
 

Thread Starter

Robin Mitchell

Joined Oct 25, 2009
819
in English please :O?
Look whos talking ;D

Basically the LCD is not completely "compatible" with the z80. In other words, a device has CS, WR and RD. On the Z80 they are active lows. So devices that i consider compatible (ie need no control logic and can be directly connected) would have the same pins that are similar to the z80 (active low).

The LCD for starters is active High. Also, commands are triggered by an E pulse BUT the Read and write is on the same pin so.......its hard to explain.
 
Top