1. OCAU Merchandise now available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion here.
    Dismiss Notice

Graphic LCD Tutorial

Discussion in 'Modding' started by cvidler, Sep 6, 2005.

  1. cvidler

    cvidler Member

    Joined:
    Jun 29, 2001
    Messages:
    13,543
    Location:
    Canberra
    Been asked fro this a few times via PM's and such, so here it goes.

    Build
    Start with a Seiko G2446 'X5RIAC' 240x64 backlit graphic LCD. I got mine YEARS ago from EIO, they're still available here for $35 US.

    This LCD is powered by a SED1330 compatible chip.

    The data/power for the screen is made via the 20 pin holes on the right edge of the PCB. The Backlight is a CCFL tube, and requires a seperate CCFL inverter (you can get these from Jaycar) and 12V. The LCD itself runs from 5V supplied by pins 16/17 (5V/GND) I wired up a molex style plug for simplicity. Getting data to the LCD is easy via a parallel port interface, similar to that used by character based LCD.

    The 20-pins on the LCD are as follows (be careful this is for a SED1330 powered LCD, there are other kinds, if you get a LCD check it's wiring diagrams).
    Code:
     1 Reset (Unused)
     2 Read
     3 Write
     4 Select 1
     5 Select 2
     6 Chip Select
     7 Command Mode
     8 Data 0
     9 Data 1
    10 Data 2
    11 Data 3
    12 Data 4
    13 Data 5
    14 Data 6
    15 Data 7
    16 +5V Power
    17 Power GND
    18 Contrast (Unused)
    19 LCD Drive (Unused)
    20 Signal GND
    
    18/19 are handled onboard with this particular display. This is a GOOD thing, as otherwise you'll need some way of making appropriate LCD and contrast offset voltages (negative!)

    And to hook it up to a parallel port using these:

    Code:
    LCD Parallel
     1  
     2  17
     3  1
     4  18-25 (GND)
     5  18-25 (GND)
     6  14
     7  16
     8  2
     9  3
    10  4
    11  5
    12  6
    13  7
    14  8
    15  9
    16  
    17  
    18  
    19  
    20  18-25 (GND)
    
    [​IMG]

    Software
    Need to fill this bit out some more.

    LCDProc (windows/linux) Not graphical output.
    LCDinfo got some good support forums (live action shots were made uisng this)

    Results
    [​IMG] [​IMG] [​IMG] [​IMG]
    1. System stats with no backlight.
    2. System stats backlight on. Utilising simple text output.
    3. Network stats.
    4. A slightly more refined system stats display showcasing bitmap graphical display.
     
  2. OP
    OP
    cvidler

    cvidler Member

    Joined:
    Jun 29, 2001
    Messages:
    13,543
    Location:
    Canberra
    -=| Reserved |=-
     
  3. DeNs

    DeNs Member

    Joined:
    Feb 22, 2003
    Messages:
    1,967
    Location:
    Melbourne
    Excellent work so far! I love how heaps of graphic LCD stuff has been posted recently. I've been thinking about it for quite some time since I wired up my charater LCD. How much was postage over here for yours?

    Anyway, looks excellent. Can't wait to see more in that reserved post.

    ---dens
     
  4. elementalelf

    elementalelf Member

    Joined:
    Feb 11, 2005
    Messages:
    1,467
    Location:
    Newcastle, warnersbay
    woot, thanx cvidler, im one of the ones that asked for this, now i just need to find somewhere in my viper case to put it... the top seems good...
     
  5. bear

    bear Member

    Joined:
    Jun 29, 2001
    Messages:
    2,475
    If you are keen, the programming for these devices is really not that complex - especially if you already have the serial/parallel interface sorted.

    I used a 128x64 pixel lcd in one of my uni projects and apart from the initial screwing around with initialisation of the controller it wasn't that hard to get some nifty screens happening.
     
  6. OP
    OP
    cvidler

    cvidler Member

    Joined:
    Jun 29, 2001
    Messages:
    13,543
    Location:
    Canberra
    As bear alludes to these screens a pretty easy to interface to from even small PIC type devices.

    There are even some premade libraries for ATMEL, BASICStamp and such PICs to work with graphical LCDs - although they're not free.

    As for details, I did all the work - check the pics - back in 2003. I have enough trouble remembering what I did yesterday.

    I hope to use the reserved post for some expansion on the software side of things, but I fear I'm going to have to relearn that myself.
     
  7. Jenova

    Jenova Member

    Joined:
    Jul 9, 2003
    Messages:
    594
    Location:
    Perth
  8. Pyro

    Pyro Member

    Joined:
    Jul 29, 2001
    Messages:
    2,682
    Location:
    Newcastle
    How big are these ? will it fit in a drive bay ? and what software do you use

    Thanx
     
  9. RObErT_RaTh

    RObErT_RaTh Member

    Joined:
    Sep 30, 2004
    Messages:
    235
    Location:
    Adelaide
    Nice guide :D Now I want to go get one :)
     
  10. bear

    bear Member

    Joined:
    Jun 29, 2001
    Messages:
    2,475
    The biggest difference with graphical and charactor based LCD's is charactor sets.

    Graphical LCD's require you to create the charactor sets yourself in software.

    In saying that, you also have to do some tricky maths and logic to get everything to sit properly on the screen.

    There are a couple of tools which will create basic charactor sets in an 8x8 or 16x16 pixel format on the net (for free).

    You store the fonts as hex in lookup tables, and write them one by one to the LCD.

    They really are quite easy devices to work with once you have them running - mine was a bit of a pain in the ass because the manufacturer's datasheet wasn't complete and the actual bug I had in the code was intermittant.

    Ie: it would work for 90% of the instructions I was sending, but lock the LCD on 1 or 2, which was enough to stop it.

    Really is rewarding once it is all going - Crystalfontz make a bunch of LCD's with the controller on the tail, which require very little external electronics to get running - the only issue with amateur's playing with them is actually soldering to the little TAG connectors - it's a lot easier if you have the zif connector on a pcb.

    I beleive the controllor that your LCD uses is very similar to the one that I had as well - in that you have to code some routines to draw across the segments? (IE, the screen is split into blocks of 8x8 pixels)
     

Share This Page

Advertisement: