Shop OBEX P1 Docs P2 Docs Learn Events
BS2e & LCD screen — Parallax Forums

BS2e & LCD screen

hmlittle59hmlittle59 Posts: 404
edited 2008-11-25 05:59 in BASIC Stamp
Hello everyone,

Carl answered my first problem about variables...thanks... But the 2nd problem deals with the LCD screen from Slot1. The variable name is not displayed only the variable value itself. The second time through the loop the Variable Name is printed along with the Variable value. What step am I not doing when switching to another Bank and Displaying TEXT to an LCD screen. I can force it to work the first time through by printing blank spaces to the LCD screen when I enter the routine, one(1) space for every letter in the name(strange)...any help please. The 2nd time through the loop all seems to be working.

thanks to all

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

hmlittle59

Comments

  • Carl HayesCarl Hayes Posts: 841
    edited 2008-11-23 23:41
    I don't know about yours, but many LCD screens have additional character spaces, invisible, to the right of the ones on the screen. I imagine you're writing there, where they're invisible -- then, the second time around, they're getting pushed out where you can see them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-11-24 16:23
    Are you using one of the Parallax serial LCDs or something else?

    Once you write something to the LCD, it stays there until over-written or power is removed. This can lead to all kinds of odd looking things showing up on the display until you understand what is going on. If the display has character locations that are not displayed (anything smaller than a 4x20) then it can be even more confusing.

    If your formatting never changes (labels always in the same place) all you have to refresh are the values, but you will need to specify exactly where the LCD is to show them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • hmlittle59hmlittle59 Posts: 404
    edited 2008-11-24 21:47
    hello

    I've never had any problem displaying text at any time before, even the fist time out the box with the demo or my own programs. But now I'm using the BS2e and when I go to Bank1 the Constant Text "Month" is not displayed only the Variable number. The second time through the loop ALL is well. I can print a top line of SPACES" " before I enter the LooP and that appears to fix it...but why does it fix it. I've tried "CR", LCDOn1, LCDline1 , but there must be something I need to do to the LCD before or after changing into a new Bank.

    Hello

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

    hmlittle59
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-24 22:26
    hmlittle -

    Have you tried a clear screen or clear-to-end-of-line LCD command?

    You never replied to this question, two messages back: "Are you using one of the Parallax serial LCDs or something else?", otherwise I might be able to give you the specific command. If it is a Parallax LCD the appropriate commands will be in the Parallax manual.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • hmlittle59hmlittle59 Posts: 404
    edited 2008-11-24 23:29
    Ok,

    I don't see the command clear-to-end-of-line but here is what appears to be happening. At this time I'm only printing to the top line but the 1st SIX char. will not display. Even with the other Sub-Routine in that Bank. So which ever one I jump to first, the FIRST Six do not appear. The rest of the text and Variable will appears from either Sub-routine. I did a:
    For idx = 0 to 5:
    Serout Lcdscreen, baud, [noparse][[/noparse]lcdrt]
    next
    -or-
    Serout Lcdscreen,baud,[noparse][[/noparse]Lcdline1," "]

    to fix it. Also.......LcdLF and LcdBkSpc within the loop appears to work also. If there is a need to reset the SCREEN from Bank to Bank I don't see the command. I tried taking it to LOW...back...HIGH and that did not work.

    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

    hmlittle59
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-24 23:54
    hmlittle -

    At this point a copy of the program would be real helpful. Your examples use variable names (i.e. lcdrt) and there is no way of knowing if the value of that variable is correct - not that I'm saying it isn't correct. Just attach a copy of the program or banks of programs, to the next message you send. Then we may be able to help a bit better.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • hmlittle59hmlittle59 Posts: 404
    edited 2008-11-25 04:09
    Sorry had to leave,

    The variables were from the LCD Demo program(LCDrt,LCDLF,LCDBKSpc) are for screen commands (right, left, backspace). I can use any of these to correct the problem or just print 15 blank space across the top row then everything is ok.

    Parallax Backlight LCD
    thanks again

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I HAVE LEARN SO MUCH...BUT STILL KNOW SO LITTLE!!!

    hmlittle59
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-11-25 05:59
    Try explicitly sending the command to place the cursor at line 0, column 0 before you send your label and data to the LCD.

    SEROUT pin, baud, [noparse][[/noparse]128], "whatever you want to display here"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
Sign In or Register to comment.