A question for all those who have played with LCD displays


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29

    Default A question for all those who have played with LCD displays

    I came across this problem in the past when programming LCD displays with 6800 and HC11 series
    processors and now with the F628 chip.
    I'm currently developing a program that uses a 4x20 display to display incoming data. The display
    will refresh with the rate of the incoming data and could even be as often as 50 milliseconds.
    The problem that I'm having is that quite often, especially when the refresh rate is high, either
    some characters will be garbled or the formatting is totally gone - ie. if I want to display something
    at the beginning of line 4, it will start displaying in the middle of line 3.
    To me it seems like there is some sort of a timing issue or the LCD is unable to cope with high
    refresh rates.
    I'm just curious if anyone else has encountered this problem in the past and what measures did
    you take to circumvent this problem.
    BTW, I'm using a 4 wire interface to push data to the LCD.
    Thanks!

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I normally
    PAUSE 150
    after updating a display.

    But that sounds like a problem for your app.
    Does all four line need updated that often? maybe a 7 seg LED bank for the fast updates?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I normally
    PAUSE 150
    after updating a display.

    But that sounds like a problem for your app.
    Does all four line need updated that often? maybe a 7 seg LED bank for the fast updates?
    Yes, it will definitely be a problem unless I come up with a better way of updating the display. Right now, it displays "live data" as it happens and depending on the events, the refresh rate could even be as often as 50 ms.
    So, with 150 ms pause, you see no issues with formatting, weird characters, etc?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    No problems with the PAUSE 150.

    Post you LCD setup and a snippet where the problem happens. We might see a better work around?
    Dave
    Always wear safety glasses while programming.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Isn't there a "Ready" or "Busy" bit sent by the display that you can read to determine when the display is ready to accept more data? I think it is one of the bits returned when you do a read in instruction mode.
    Tim Barr

  6. #6
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Sorry guys, got sidetracked here....

    OK, here is the snippet of the code. This is essentially a display routine, which will fire up everytime one of the SPEEDUNITS varaiables changes. This could be as often as 20 ms.
    However, I have also noticed this problem with slower update speeds (ie. 1 second).
    I'm driving a 4x20 display using 4 data lines.

    Code:
    DisplayResults:
        lcdout $fe,1,$fe,2                                                 ' Clear Display
        lcdout $fe,$80,#Speedunits[0], " FPS"                   ' Display pulse value
        lcdout $fe,$89,#Speedunits[1], " FPS"                   ' Display pulse value
        lcdout $fe,$C0,#Speedunits[2], " FPS"                   ' Display pulse value
        lcdout $fe,$C9,#Speedunits[3], " FPS"                   ' Display pulse value
        lcdout $fe,$94,"Top Speed ",#PeakSpeed," FPS"
        
    return

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Code:
    lcdout $fe,$94,"Top Speed ",#PeakSpeed," FPS"
    You are using 14 spaces in the above with text, then what ever the VAR is using. Add that to the four blank spaces, $94, you might be running out of spaces?
    You might try
    Code:
    lcdout $fe,$90,"Top Speed ",#PeakSpeed," FPS"
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Code:
    lcdout $fe,$94,"Top Speed ",#PeakSpeed," FPS"
    You are using 14 spaces in the above with text, then what ever the VAR is using. Add that to the four blank spaces, $94, you might be running out of spaces?
    You might try
    Code:
    lcdout $fe,$90,"Top Speed ",#PeakSpeed," FPS"
    Actually no... with the address $94, the text starts right at the beginning of the line.

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Well, I am out of ideas. Do you have a data sheet for the display? Might shed some light.
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,620


    Did you find this post helpful? Yes | No

    Wink NO Lcd resets in the displaying loops !!!

    Quote Originally Posted by Navaidstech View Post
    Sorry guys, got sidetracked here....

    OK, here is the snippet of the code. This is essentially a display routine, which will fire up everytime one of the SPEEDUNITS varaiables changes. This could be as often as 20 ms.
    However, I have also noticed this problem with slower update speeds (ie. 1 second).
    I'm driving a 4x20 display using 4 data lines.

    Code:
    DisplayResults:
        lcdout $fe,1,$fe,2                                                 ' Clear Display
        lcdout $fe,$80,#Speedunits[0], " FPS"                   ' Display pulse value
        lcdout $fe,$89,#Speedunits[1], " FPS"                   ' Display pulse value
        lcdout $fe,$C0,#Speedunits[2], " FPS"                   ' Display pulse value
        lcdout $fe,$C9,#Speedunits[3], " FPS"                   ' Display pulse value
        lcdout $fe,$94,"Top Speed ",#PeakSpeed," FPS"
     
    return
    Hi, Just try to place your " LCDOUT $FE,1 " command OUTSIDE your loop ... ( really needed once only in a program !!! @ top lines i.e. )

    so your sub comes to:

    Code:
    DisplayResults:
     
        lcdout $fe,$80,#Speedunits[0], " FPS"                   ' Display pulse value
        lcdout $fe,$89,#Speedunits[1], " FPS"                   ' Display pulse value
        lcdout $fe,$C0,#Speedunits[2], " FPS"                   ' Display pulse value
        lcdout $fe,$C9,#Speedunits[3], " FPS"                   ' Display pulse value
        lcdout $fe,$94,"Top Speed ",#PeakSpeed," FPS"
     
    return
    Will handle the 50 Hz refreshment, now ...
    and note " Home " command already included in the " lcdout $fe,1 " and " lcdout $fe,$80 " commands ...

    Alain
    Last edited by Acetronics2; - 11th June 2010 at 13:51.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Aug 2007
    Location
    Mississauga, Ontario, Canada
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Hi guys... sorry for the delay.
    I've done some extensive testing on the LCD displays and Acetronics is right! I'm using a single reset at the top of the program now and clear the screen thereafter.
    Works like a charm now, no funny characters and everything falls in place perfectly.
    Thanks to all of you guys for your input and Acetronics for nailing it.

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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