+ Reply to Thread
Results 1 to 14 of 14

Thread: Z80 Graphic LCD interface

  1. #1
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Z80 Graphic LCD interface

    Hi,

    I'd like to interface a Z80 cpu to a monochrome LCD display through a dual port sram.
    The LCD is a 320x240 graphic display but I just want to use it to display 40x25 characters which will be stored in the dual port sram (1KB).

    I'm thinking of using the following hardware: Optrex F-55157GNF-LW-ASN display, and Cypress cy7c130 dual port sram.

    What would be the best way to go about doing this?

    Please would you give me some pointers in the right direction or any sample circuit designs would be very helpful.

    Thanks.


  2. #2
    monkeybiter Good monkeybiter Good
    Join Date
    Oct 2006
    Location
    doncaster, u.k.
    Posts
    200

    The LCD will need a microcontroller or the Z80 to feed it the display data, it won't get it by it's self.
    You could use a separate uC to access the ram and supply the LCD, but when the Z80 is writing data to the ram it might as well be writing directly to the LCD.
    In other words you don't need dual port ram for a job like this, just the cpu, program/data ram and the LCD [plus glue logic].

  3. #3
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi Monkeybiter,

    Thank you for your help.

    Understood. I also need to be able to generate the characters for the display.
    Could I use a PIC cpu as an interface between the Z80 and LCD?

    I would like the LCD to be memory mapped, not using the I/O functionality of the Z80.


    Thanks again.

  4. #4
    monkeybiter Good monkeybiter Good
    Join Date
    Oct 2006
    Location
    doncaster, u.k.
    Posts
    200

    After a quick look at the datasheet for the display you will not be able to drive it directly from the cpu. In fact to drive it with a pic I think you will need a quickish chip at 20MHz min. For you requirements a parallel slave port might work out ok with character data stored in the pic. Why memory map the display?
    Choose an 18F at 40MHz and you should be OK.
    On the other hand I've just finished a nightshift and my grey matter is just about to go into sleep mode, so I might be talking rubbish.

  5. #5
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi monkeybiter,

    I'll give that a try. I had been looking at some 40MHz PICs - not really sure which one to go with as there are so many. Any recommendations? I did some googling and came across a few PIC/LCD projects so I'll work on that part first.

    The next step I guess is to interface the Z80 with the PIC. I want to "memory map" the display because I'm basing the design on a very old computer, the first computer I used when I was a kid.

    Thanks for helping me out while on your nightshift :-)

  6. #6
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,558

    I vaguely remember something about using the Z80's DRAM refresh feature to create a video signal with little or no processor overhead, but the details escape me at the moment.
    Inside every little problem, is a big problem trying to get out.

  7. #7
    monkeybiter Good monkeybiter Good
    Join Date
    Oct 2006
    Location
    doncaster, u.k.
    Posts
    200

    The majority of PIC/LCD projects you will find will use what I would call static LCD modules as opposed to dynamic. The static type [character or graphic] have their own memory mapped to the display. You simply write data to the required address and the amended display remains until altered.
    'Dynamic' types require a constant synchronised data stream just to maintain the display. That would be challenging to perfect with a pic.
    I would reccomend a compromise on the display resolution to begin with so that you can use an easier memory mapped module, until you get the rest of your machine working, then revisit the display.

    Out of curiosity what was your first computer? Mine was a ZX80 [still got it].
    Last edited by monkeybiter; 27th June 2009 at 07:29 AM. Reason: Added question.

  8. #8
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by cmos555 View Post
    Hi monkeybiter,

    I'll give that a try. I had been looking at some 40MHz PICs - not really sure which one to go with as there are so many. Any recommendations? I did some googling and came across a few PIC/LCD projects so I'll work on that part first.

    The next step I guess is to interface the Z80 with the PIC. I want to "memory map" the display because I'm basing the design on a very old computer, the first computer I used when I was a kid.

    Thanks for helping me out while on your nightshift :-)
    hi cmos,
    What was the model of I'm basing the design on a very old computer.?

    The Sharp MZ80K had the vid memory mapped at D000h thru D3E8h.
    1Kbyte, 40 cols * 25 lines, monochrome.
    The character set was in ROM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  9. #9
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi kchriste,

    Interesting idea! I did a google and came across a few related articles but can't say I really understood :-(

    Thanks.

  10. #10
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by cmos555 View Post
    Hi kchriste,

    Interesting idea! I did a google and came across a few related articles but can't say I really understood :-(

    Thanks.
    hi,
    All it really means that the video memory/ram area is addressed by the video logic, timing from a 32.768Khz/2 xtal for the 15Khz nominal line freq.

    The main cpu writes to the vid memory during video blanking and the vid logic reads it during the display scan.
    Last edited by ericgibbs; 27th June 2009 at 04:14 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  11. #11
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi monkeybiter,

    Thanks. I've been looking at some graphic lcd displays (with memory). Some of them have controllers and some don't. Would it be better to use an LCD with a controller or without if I am going to use a PIC interface? The SED controllers seem popular.

    I'll try setting up the PIC part first to get something to display on the screen, then work on the Z80 part.

    I realised that I made a mistake with the screen resolution. It was actually 48chars x 16 lines. Can you guess what computer it was? (see my reply to ericgibbs) So, I actually need something like a 400x200 pixel display (or 480x200). Makes it a bit more complicated, I guess... Can you recommend any displays?

    Thanks again.

  12. #12
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi Eric,

    I vaguely remember the MZ80K, although I remember the ZX80 a bit better.
    Mine was a Nascom 1 that my dad bought. It was a kit that we had to build it ourselves.
    The display was memory mapped at 0800-0bff and quite a horrible configuration:

    video

    My dad threw it away a few months ago and I was a bit p!$$ed off so I decided I wanted to build one myself.

    Cheers.

  13. #13
    cmos555 Newbie
    Join Date
    Jun 2009
    Location
    Tokyo, Japan
    Posts
    7

    Hi Eric,

    I think I need to read up a bit more on how displays work :-)


    Cheers

  14. #14
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by cmos555 View Post
    Hi Eric,

    I think I need to read up a bit more on how displays work :-)


    Cheers
    Hi,
    I'll dig out and post the MZ80K video mem circuit.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

+ Reply to Thread

Similar Threads

  1. pic and graphic lcd
    By IZACH in forum Micro Controllers
    Replies: 15
    Latest: 28th October 2007, 12:16 PM
  2. Graphic LCD
    By flemmard in forum Micro Controllers
    Replies: 1
    Latest: 13th September 2007, 03:32 AM
  3. Graphic LCD
    By mohandessina in forum General Electronics Chat
    Replies: 2
    Latest: 10th March 2007, 10:37 AM
  4. graphic LCD PIC MCU
    By tom_electronic in forum Micro Controllers
    Replies: 4
    Latest: 28th February 2006, 12:29 PM
  5. graphic lcd help
    By jijita in forum General Electronics Chat
    Replies: 1
    Latest: 18th August 2004, 07:32 AM

Tags for this Thread