Missing chars at beginning of LCD display


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Talking Missing chars at beginning of LCD display

    Hi,

    Still a bit of a noob here but getting the hang of things now. I've recently bought a 2x16 and a 4x20 LCD display. Great fun! Finally put a negative couple of volts via a pot' on the display to get the contrast to show the image. However, I seem to have an issue with the larger (4x20) unit. When I first send the command:

    LCDOUT $FE,1,"Hello"

    It displays this, but, if I then follow it with a pause perhaps, and another command:

    LCDOUT $FE,1,"Hello"
    PAUSE 500
    LCDOUT $FE,1,"World"

    It's output is:

    Hello
    [clear screen]
    rld

    Help!! Any subsequent info sent to the screen misses the first 2 chars.

    I've replaced the LCD with the 2x16 but this works fine. Put the 4x20 LCD back on and the problem returns...

    Weird

    Any offers?

    -Jimbo-

  2. #2
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62


    Did you find this post helpful? Yes | No

    Thumbs up

    Fixed it! Read somewhere about 'home' taking time, so I changed the code to:

    PAUSE 500 ; wait for LCD to initialise

    loop:
    LCDOUT $FE,1 ; clear screen and return cursor to top-left
    PAUSE 100 ; wait for cursor to be moved to top-left!
    LCDOUT "Hello"
    PAUSE 500
    LCDOUT $FE,1 ; clear screen and return cursor to top-left
    PAUSE 100 ; wait for cursor to be moved to top-left!
    LCDOUT "World"
    PAUSE 500
    goto loop


    I would think the PAUSE 100 could be significantly reduced, but I'll fiddle with that later. The main thing is, the display is working! [was beginning to wonder!]

    Best regards to all, and don't give up on a fault... there's always a solution out there :P

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


    Did you find this post helpful? Yes | No

    Default

    Jimbo,

    Yes, Clear Screen/Home cursor normally takes 1.6 mS to complete (1600 uS).
    That time can be compensated for with the LCD_COMMANDUS define.

    PBP 2.50 had a default of 1500 uS, which is too short for most displays.
    It was increased in 2.60.

    Adding this line should fix it without the pauses.
    Code:
    DEFINE  LCD_COMMANDUS  2000
    DT

  4. #4
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62


    Did you find this post helpful? Yes | No

    Talking

    Hi Darrel,

    Many thanks for your reply/explanation. I'll add that in my routines from now on.

    Best regards.

    -Jimbo-

    P.S. Just implemented the -ve supply from the 232 comm's chip to supply contrast potential as recommended by many, as opposed to using a separate psu Works a treat - whole unit is now running off an old mobile phone charger, through a 7805 dc-dc converter

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