A question for all those who have played with LCD displays


Closed Thread
Results 1 to 11 of 11

Hybrid View

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

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

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

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

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    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 12: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 " !!!
    *****************************************

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