problem with lcd
ksrenterprises1
Posts: 8
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?
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 Savage
Parallax Tech Support
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?
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.
·
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