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


    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.

  2. #2
    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

  3. #3
    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

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


    Did you find this post helpful? Yes | No

    Default

    Hello all. As W7AMI suggested, I have tried filtering the supply and I have changed the cable to shielded pairs but no luck. Darrel I have installed the Highjack routines and also included the LCD_Anypin.pbp and VirtualPort.bas in the PBP folder. I then added the Include file in my main program just below the define Parameters.

    INCLUDE "LCD_AnyPin.pbp"
    I am using MicroCode Studio and when compile is run I get the error
    Line 87:Bad expression. (LCD-AnyPin.pbp)
    The LCD_AnyPin file is opened and the line LOW LCD_RS : HIGH LCD_E is highlighted causing the error. I have included two images. The green Display is connected on the short cable and the Blue Display is connected to the long cable. As you can see blue is not displaying what the green is and the character on the blue display is constantly changing.
    Attached Images Attached Images   

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I think the problem is that it is just plain too cold where you live!
    Charles Linquist

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


    Did you find this post helpful? Yes | No

    Default

    That's a good laugh. I thought someone would have that reply.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wildbilly
    Darrel I have installed the Highjack routines and also included the LCD_Anypin.pbp and VirtualPort.bas in the PBP folder. I then added the Include file in my main program just below the define Parameters.
    Excellent!

    Does your main program have this section (modified for your hardware of course).
    The old lcd DEFINES can be commented out.
    Code:
    ;----[ Change these to match your LCD ]---------------------------------------
    </i></b></font><b>LCD_DB4   </b><font color="#008000"><b>VAR </b></font><b>PORTA</b>.<font color="#800000"><b>0
    </b></font><b>LCD_DB5   </b><font color="#008000"><b>VAR </b></font><b>PORTB</b>.<font color="#800000"><b>3
    </b></font><b>LCD_DB6   </b><font color="#008000"><b>VAR </b></font><b>PORTB</b>.<font color="#800000"><b>7
    </b></font><b>LCD_DB7   </b><font color="#008000"><b>VAR </b></font><b>PORTC</b>.<font color="#800000"><b>1
    </b></font><b>LCD_RS    </b><font color="#008000"><b>VAR </b></font><b>PORTD</b>.<font color="#800000"><b>4
    </b></font><b>LCD_E     </b><font color="#008000"><b>VAR </b></font><b>PORTA</b>.<font color="#800000"><b>1
    </b></font><b>LCD_Lines     </b><font color="#008000"><b>CON </b></font><font color="#800000"><b>2    </b></font><font color="#0000FF"><b><i>' # of Lines on LCD,  1 or 2 (Note: use 2 for 4 lines)
    </i></b></font><b>LCD_DATAUS    </b><font color="#008000"><b>CON </b></font><font color="#800000"><b>50   </b></font><font color="#0000FF"><b><i>' Data delay time in us 
    </i></b></font><b>LCD_COMMANDUS </b><font color="#008000"><b>CON </b></font><font color="#800000"><b>2000 </b></font><font color="#0000FF"><b><i>' Command delay time in us 
    
    </i></b></font><font color="#008000"><b>INCLUDE </b></font><font color="#FF0000">&quot;LCD_AnyPin.pbp&quot;  </font><font color="#0000FF"><b><i>; *** Include MUST be AFTER LCD Pin assignments ****</i></b></font>
    DT

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