Page 1 of 1
LCD2041 rev 2.0 problem locating cursor with Basic
Posted: Mon Dec 15, 2008 7:55 pm
by PJG
Hi guys,
we're trying to locate the cursor on a LCD2041 rev 2.0 lcd using the Basic command: PRINT #1, CHAR$(254);"G"; CHAR$(X); CHAR$(Y), where X and Y are column and row numbers. The cursor moves to the right column ok, but always to column 1. Also the move right command ("M"), has no response. When we issue the commands from a TINY_TIGER module, the cursor won't even go to row 1, but always starts on row 2. Does anyone have any clues as to what we're missing?
Thanks
Peter javascript:emoticon(':(')
Posted: Tue Dec 16, 2008 12:38 pm
by Raquel
Hello Peter,
Thanks for your post.
First off, I would like to get you to try playing with the display using
uProject. This will eliminate the possibility of a bad display.
In uProject's Main tab, you can play with cursor controls and see if the display behaves accordingly. If it does, then its back to playing with BASIC.
I am not versed with BASIC but your command looks good, as per parameters and command number are concerned. I will get my colleague to look at your code (he knows more than I do) and ask if he sees anything wrong. Are you able display data and do other commands like clear screen (cmd 254 88 )?
Also, you might want to try your code with uProject, just send it out on the comport (RS232 of course) and uProject will tell you what it is you are sending.
Thanks and Best Regards,
Posted: Tue Dec 16, 2008 5:14 pm
by PJG
Thanks for your reply Raquel,
I forgot to mention that I did try it with uProject, and the LCD is ok. I didn't know however that I can try the code through uProject, so I'll give that a go. By the way, the commands for clear screen, block cursor off and on, and underline cursor off and on work ok
cheers
Peter
Posted: Tue Dec 16, 2008 5:16 pm
by PJG
Also forgot to mention that we can write data and txt to the display ok, just not to the spot we want.
cheers
Posted: Tue Dec 16, 2008 6:17 pm
by PJG
Raquel, I played around with uProject, and found the upload tab and played with entering raw data. I can't actually enter the raw Basic text, it just prints it out as text. But I'm thinking maybe this is not what you meant? Is there a way of sending data from my Basic software package to uProject? Or is there a way of hooking up the LCD so that uProject can tell what it recieves?
Thanks
Peter
Posted: Tue Dec 16, 2008 8:04 pm
by PJG
Sorry to keep posting like this. Another interesting fact is that we have an older lcd2041 Rev 1.5. If I talk to it from our Tiny Tiger module, we get the same result as the Rev 2.0 unit. But when we talk to it from a pc running a DOS version of Basic, there is no problem locating or moving the cursor on the Rev 1.5, whereas on the Rev 2.0 we can't locate or move the cursor from the pc. Has something drastically changed from 1.5 to 2.0?
Cheers
Peter
Posted: Tue Dec 16, 2008 10:24 pm
by PJG
I just noticed a mistake in my first post. What I meant to say was: the cursor moves to the correct ROW ok, but always to the first column.
Might make a difference to understanding the problem
Cheers
Posted: Wed Dec 17, 2008 10:24 am
by Raquel
Hello Peter,
Sorry for not being clear on uProject.
What I meant was to try and connect your Tiny Tiger module to uProject (make sure that the com port is open) and see in the box in the Main tab the data that is being sent out by your Tiny Tiger module. See if you are sending data as expected.
And yes, there have been changes from PCB Rev 1.5 and 2.0, but not a whole lot specially on the Go To command. If I maybe forgetting something that might affect your system, please see this
PCN.
I hope this helps. Please let me know how it turns out.
Thanks,
Posted: Sun Dec 21, 2008 11:49 pm
by PJG
Raquel, I think I found the problem, thanks to your suggestion of reading the output of the Tiger module through the uProject software. I noticed that after a simple command like clear screen: /254/88, the Tiger would send those two, as well as two others, and they were always the same: 0D and 0A. After looking at the Basic manual again, I found that unless you put a semicolon behind the PRINT statement, Basic will add a linefeed. This is what put the cursor on the second row. I have now full control over the cursor. Thanks again!
Peter
Posted: Mon Dec 29, 2008 12:01 pm
by Raquel
Glad to hear that things are now working as expected.
Let me know if you need any more assistance.
Thanks and Happy Holidays,