Connecting a LCD to Z80

Discussion in 'General Electronics Chat' started by Robin Mitchell, Jul 12, 2011.

  1. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    Im trying to connect one to a z80 but im unsure where to connect the E input to :S
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    The same place as the rest, the z80 :D
    You need to be able to control all the signals, i.e. d0-d7 or d4-d7, RS, RW and E
     
    RRITESH KAKKAR likes this.
  3. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    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.
     
    RRITESH KAKKAR likes this.
  4. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    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.
     
  5. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    Hey kubeek, This was what i needed:

    [​IMG]
     
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    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.
     
  7. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    Nah, just take a look at the z80, you cant just stick the pins together, you need some control logic :S
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    In english please ;)
     
  9. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    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.
     
  10. Robin Mitchell

    Thread Starter Well-Known Member

    Oct 25, 2009
    732
    200
    Just found the best way to do it is to have a pic chip that drives the display and the z80 sends instructions to the pic
     
Loading...