LCD Display, Linking


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    IronPenguin's Avatar
    IronPenguin Guest

    Default LCD Display, Linking

    Hi,

    I'm working on a model railroad project for my layout. It's common to use a "fast clock" for operations, which speeds up time relative to your layout. In other words, though it may take only 1 minute for a train to actually go from one town to another on the layout, if you use a fast clock, the "time" traveling is 15 minutes.

    The clock part is straightforward Basic, but I'd like to display this fast time on several LCD displays around the room, which leads to my questions:

    a) Are there hidden problems I need to know about driving more than one LCD display from a single PIC. (Any suggestions?)

    b) Is there a practical distance limitation, ie how far apart can they be and still work?

    Thanks,

    Mike Tennent

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    I would be inclined to add a PIC to each display to convert them into Serial LCD's. You would then only need to feed +5V, 0V and Serial Data to each display. That way there shouldnt be any worry about distance or having multiple displays as they would just be dumb terminals.

    Dont forget that if you are trying to emulate a real railway display then at least one of them need to be showing the wrong infomation or total garbage
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You need a dot-matrix display telling you that there are three trains arriving all one minute away (obviosuly fighting to get onto the same single line track through a tunnel). This display is 'fixed' ie never changes. Tell me... how come model railway layouts always omit little scale-model Buskers (complete with bad music - playing at 15x speed!), Muggers, Tramps, Drunks, Graffiti and tiny painted born-again-pizza splats on the platforms? Also, how come nobody stops the trains to scale? They roar into the stations doing the equivellent of an emergecy stop at the platform hurtling their passengers into a mangled heap in the front of each carriage... Real-life trains aren't fitted with inertial dampers!... Oh, before I digress, the serial LCD suggestion is best.

  4. #4
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    What about buffer/line drivers? Something from Toshiba.

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    Tell me... how come model railway layouts always omit little scale-model Buskers (complete with bad music - playing at 15x speed!), Muggers, Tramps, Drunks, Graffiti and tiny painted born-again-pizza splats on the platforms?
    LOL

    Probably because they are all undesirable things and you have the opportunity to create a perfect, albeit tiny, world
    Keith

    www.diyha.co.uk
    www.kat5.tv

  6. #6
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    If you really want to ensure data integrity at a distance, you could at RS-485 transceivers. It’s still serial but extends the overall range.

  7. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Proper RS-232 is good for at least 1km of cable (and it's simple and cheap)... special line drivers can extend this to 5km... so unless you want a network of multiple master transcievers, RS-485 isn't nescessary.

  8. #8
    IronPenguin's Avatar
    IronPenguin Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    Muggers, Tramps, Drunks, Graffiti and tiny painted born-again-pizza splats on the platforms? Also, how come nobody stops the trains to scale? They roar into the stations doing the equivellent of an emergecy stop at the platform hurtling their passengers into a mangled heap in the front of each carriage... Real-life trains aren't fitted with inertial dampers!... Oh, before I digress, the serial LCD suggestion is best.
    LOL.

    Sorry about the late reply, I had to go off for the weekend unexpectedly.

    A serious reply to your humor... Many layouts have begun to show the grittier side of railroading - several manufacturers offer graffitti decals, etc. But by and large, most folks model what they'd like the world to be, rather than what it is.

    One quick further question about using a PIC as a serial driver - can someone point me to some code that does that? I have a LAbX-4 board that does that with a PIC onboard, so I understand the theory. I assume the PIC receives the string via SERIN, then sends it out over four pins to the display?

    I did a quick search of the melab site, but nothing pops out immediately.

    Thanks again,

    Mike Tennent

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Just use any of the Serial Output commands for the Master PIC... SEROUT, SEROUT2, DEBUG, HSEROUT, your choice. In it's simplest form, send the Data as if you were going to send it to your LCD... eg...

    SEROUT2 0,16780,[$FE,$01,"Stand Clear",$FE,$C0,"Train Arriving"]

    The value of 16780 is dependant on your chosen baud rate (see PICBasic manual).

    At the receiving end every character received by the receiving PIC is passed straight to it's LCD. Easy Peasy....

    Finally, if you're running long lengths of cable (ie greater than say 5 metres), use a proper RS-232 driver chip (like the MAX232), don't rely on the PICs measly 5v output to drive long distances reliably.

    Oh, and a finally, finally... it's serial comms, so use a Resonator or Xtal.

  10. #10
    IronPenguin's Avatar
    IronPenguin Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks, Melanie.

    This is the first time I've fooled with a stand-alone LCD, but I think it'll be fun to play around with.

    Mike T.

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. LCD display not working properly
    By dilpkan in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd February 2008, 07:43
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts