Shop OBEX P1 Docs P2 Docs Learn Events
problem with lcd — Parallax Forums

problem with lcd

ksrenterprises1ksrenterprises1 Posts: 8
edited 2008-04-02 21:24 in BASIC Stamp
I have a parallax 4x20 lcd. I tell it to move cursor to line 1 position 0 and type "recording voice" when pin 1 goes low

Then i tell it to move the cursor back to line 1 position 0 and type "recording finished" when pin 2 goes low.

But it doesnt write over the "recording voice".· It seems to put the "recording finished" in a random place on line 2. What am i doing wrong.

How do i display characters over existing characters?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-01 14:55
    Please post your code so we can try to help determine what might be happening...Post it as an attachment. please do not paste it into the message.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • ksrenterprises1ksrenterprises1 Posts: 8
    edited 2008-04-01 17:07
    OK. i will post the code when i get home tonight.
  • ksrenterprises1ksrenterprises1 Posts: 8
    edited 2008-04-02 00:35
    ok here is the program.
    For some reason when i press the womb stop button or the womb play button it places the "playing womb" text on line 0 position 2 and it will place the "womb stopped" text on line 4 position 5.
    also it doesn't type the wom part of "womb stopped" it only types "b stopped.·· I don't get it! Any Help?
  • Dan MiclDan Micl Posts: 3
    edited 2008-04-02 02:59
    My guess is this:

    You should use character controls to locate the printing position:

    example

    SEROUT 14, 84, [noparse][[/noparse]22,12] : PAUSE 5···· ' remark - do this at beginning of program·to initialize

    now try this:

    DO

    SEROUT 14, 84, [noparse][[/noparse]128, "This is first message " ]

    PAUSE 3000

    SEROUT 14, 84, [noparse][[/noparse]128, "This is second message" ]

    PAUSE 3000

    LOOP

    '·remark· 14 = pinout of· #14..... 84 = baud rate of 9600
    The 128 will locate the print position on top line, first column
    CAUTION : Note extra space on the first line, because 2nd message is longer

    The character positions are from 128 to the last lower right of 207.

    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-02 21:24
    Hello,

    What is happening is you’re positioning the cursor in your setup for the menu, but when you jump to the subroutine it prints to the last location the cursor was at…IN this case the 4th line…The reason is you have set your strings to be 20 characters wide. This means when you’ve printed line 2 the cursor has already wrapped to line 3, so when you do the $A8 you’re now on line 4. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.