Maximun Cable Length for PIC to LCD


Closed Thread
Results 1 to 40 of 53

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Ontario Canada
    Posts
    30

    Default Maximun Cable Length for PIC to LCD

    Hello all, I have just finished a project which includes displaying on three LCD displays. Thanks to a great method by Darrel Taylor. http://www.pbpgroup.com/files/2_LCDs.gif
    His idea works fantastic. What is the maximum cable length of cable that can be used between Pic and LCD? I have all the three LCD working close to the PIC but 20 feet away I get gibberish. Am I just stuck with a shorter length of cable or is there a work a around.

    Thanks.

  2. #2
    Join Date
    Oct 2007
    Location
    Vancouver, BC, Canada
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    i guess max around 2feet for TTL level. if you require longer length i suggest using serial lcd.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    wildbilly,

    Great, glad that's working for you.

    I can't answer the main question, as I've never tried to go more than a couple inches to an LCD.
    But, I'll agree that serial might be a better way.

    However, I think there's two possible sources for the garbled text. And I might be able to do something about one of them if you still want the parallel interface.
    1. PBP sends everything out to the LCD at the MINIMUM pulse widths defined in the HD44780 datasheet. Which means approximately 1 Mhz squarewave signals since the enable pulse only lasts 1 uS. That's going to be tuff to get through 20 feet of ribbon cable.
      <br>
    2. The other source could be inductive pick-up, like an antenna.
      Can't help much if that's the case.

    If the problem is #1? It may be possible to slow down the LCD data to a point that will propagate thru the long ribbon.

    Using the technique described in the LCD_Anypin thread, we could create whatever timing is required to slow it down to a reasonable speed.

    If you want to try, let me know.
    You'll have to do the testing though.
    <br>
    DT

  4. #4
    Join Date
    Nov 2005
    Location
    Ontario Canada
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    Thank you KVLV. I think you are correct about using serial instead. It would be nice though to be able to use the parallel interface. I do enjoy a challenge and it keeps PicBasic interesting.
    Thanks Darrel, I have read the LCD_Anypin thread and that is very interesting. I am up for the leg work. I am willing to try and I will do all the testing required.

    Thank you.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wildbilly View Post
    I am up for the leg work. I am willing to try and I will do all the testing required.
    Shouldn't take much, but you'll need to install the HighJack routines first.
    And you'll also be using the LCD_Anypin files, so download them too.

    Start with that, and you should be able to get the LCD working on a Short cable first.

    After that, we'll adjust the delays and see what happens on a long one.
    If you have any problems getting LCD_Anypin to work, let me know.
    <br>
    DT

  6. #6
    w7ami's Avatar
    w7ami Guest


    Did you find this post helpful? Yes | No

    Default Maximun Cable Length for PIC to LCD

    wildbilly,

    It should be possible to send data over 20 feet to your display and have it work, but not using ribbon cable. All the conductors are parallel to each other and divided by insulation. In other words you have a bunch of capacitve coupling between the lines. Also the ribbon cable is likely not shielded so any manner of garbage will be picked up from the nearby environment. I have an absolute encoder (10 lines of TTL data) working over a distance of 50 feet in a high RF environment.

    First as stated earlier make sure you have cleaned up the power to the LCD with good bypass capacitors with short lead length. You will need to put the displays in some sort of metal box. Then use a shielded cable with twisted pairs (signal and ground on each pair) between the two units. Then if you are still having problems mess with the pulse widths.

    Terry

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,947


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    ....
    2. PBP sends everything out to the LCD at the MINIMUM pulse widths defined in the HD44780 datasheet. Which means approximately 1 Mhz squarewave signals since the enable pulse only lasts 1 uS. That's going to be tuff to get through 20 feet of ribbon cable.

    ....
    Well in this case, I would suggest to use double the number of flat cable wires and the middle ones connected to the ground point. It won't eliminate the problem but will help for sure.

    Ioannis
    Last edited by Ioannis; - 28th November 2007 at 20:19.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    at very least, if you really want to waste that amount of cable, place some cap close of the LCD VDD/GND (47uF (or greater) + 10 uF tantalum and finally 0.1 uF ceramic)

    I don't think there's a real problem with the length of cable so far, my feeling is that you just need to filter the Vdd rail properly at the end and probably play with COMMANDUS & DATAUS DEFINEs.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. DS1820 Max Cable length ?
    By dccch in forum General
    Replies: 2
    Last Post: - 24th January 2008, 07:44
  4. Measure cable length with a PIC?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th July 2007, 18:45
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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