LCD2041 internal memory corruption?
LCD2041 internal memory corruption?
Hi,
I bought 2x LCD2041 from you a few months back for prototype work, and I now want to use them in the final product, however..
The two I have work flawlessly for 99% of operation (RS232, 19200 baud), but I have problems whenever I try to send the value 10 as part of a command.
The commands that I have encountered problems with so far are:
Set Cursor Position, where sending:
254, 71, 9, 3, "hello"
prints hello at 9,3 where you would expect, and:
254, 71, 11, 3, "hello"
prints hello at 11,3 where you would expect, but:
254, 71, 10, 3, "hello"
prints a 3-pixel-high vertical bar character (or horizontal if loaded), at 13,1 followed by the hello.
Place Horizontal Bar Graph (this may or may not be related):
First I load the chars:
254, 104
then display a bar graph with:
254, 124, 1, 1, 0, 11
which displays a 11 pixel wide bar graph starting at 1,1 as expected, but:
254, 124, 1, 1, 0, 10
displays a 13 pixel wide bar! and...
254, 124, 1, 1, 0, 9
displays a 10 pixel wide bar. Highly confusing behaviour.
I have set up a startup screen by modifying the custom characters in bank 0, and that works fine.
I have tried setting custom horizontal bar characters by programming bank 0, but even after loading them instead of the defaults I get the same result. I have only set the first 5 characters of bank 0 however, because I have no idea what the other 3 would be used for in a 5 pixel wide bar graph.
Is this display broken or am I doing something wrong?
Thanks
I bought 2x LCD2041 from you a few months back for prototype work, and I now want to use them in the final product, however..
The two I have work flawlessly for 99% of operation (RS232, 19200 baud), but I have problems whenever I try to send the value 10 as part of a command.
The commands that I have encountered problems with so far are:
Set Cursor Position, where sending:
254, 71, 9, 3, "hello"
prints hello at 9,3 where you would expect, and:
254, 71, 11, 3, "hello"
prints hello at 11,3 where you would expect, but:
254, 71, 10, 3, "hello"
prints a 3-pixel-high vertical bar character (or horizontal if loaded), at 13,1 followed by the hello.
Place Horizontal Bar Graph (this may or may not be related):
First I load the chars:
254, 104
then display a bar graph with:
254, 124, 1, 1, 0, 11
which displays a 11 pixel wide bar graph starting at 1,1 as expected, but:
254, 124, 1, 1, 0, 10
displays a 13 pixel wide bar! and...
254, 124, 1, 1, 0, 9
displays a 10 pixel wide bar. Highly confusing behaviour.
I have set up a startup screen by modifying the custom characters in bank 0, and that works fine.
I have tried setting custom horizontal bar characters by programming bank 0, but even after loading them instead of the defaults I get the same result. I have only set the first 5 characters of bank 0 however, because I have no idea what the other 3 would be used for in a 5 pixel wide bar graph.
Is this display broken or am I doing something wrong?
Thanks
I just realised a typo mistake in my original post. I meant bank 1, not 0, in the following part:
I have tried setting custom horizontal bar characters by programming bank 0, but even after loading them instead of the defaults I get the same result. I have only set the first 5 characters of bank 0 however, because I have no idea what the other 3 would be used for in a 5 pixel wide bar graph.
HI,
Yes, you are right, I forgot that you have things working but these strings. Sorry
But I am weary that getting these displays back here and/or replacing/repairing them will solve the issue. I am afraid that after we sent you new ones that they will have the same problem.
Can you please try these strings out using uProject (instead of using your own app)?
Thanks,
Yes, you are right, I forgot that you have things working but these strings. Sorry

But I am weary that getting these displays back here and/or replacing/repairing them will solve the issue. I am afraid that after we sent you new ones that they will have the same problem.
Can you please try these strings out using uProject (instead of using your own app)?
Thanks,
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
I can confirm that uProject also has the problem with the horizontal bar graphs being incorrect - during the demo the bars jump erratically. The right-to-left bar graph is even more screwed up.
Testing with exact commands reveals that when doing a left-to-right bar graph (direction 0), sending length 9 or 10 both give a 10 pixel width bar - ie. it's impossible to draw a 9 pixel wide bar. This isn't the same result as when I do it on the target machine with my software, but it is similarily screwed up.
I'm running uProject on a completely different PC fyi - the target runs linux.
Strangely though, the set cursor command works fine when sent column 10.
When I read version number from the board with uProject, I get "FF", and for serial number "FF FF".
This display seems faulty to me, is that the case?
Testing with exact commands reveals that when doing a left-to-right bar graph (direction 0), sending length 9 or 10 both give a 10 pixel width bar - ie. it's impossible to draw a 9 pixel wide bar. This isn't the same result as when I do it on the target machine with my software, but it is similarily screwed up.
I'm running uProject on a completely different PC fyi - the target runs linux.
Strangely though, the set cursor command works fine when sent column 10.
When I read version number from the board with uProject, I get "FF", and for serial number "FF FF".
This display seems faulty to me, is that the case?
Yes, that does sound weird. Both of the displays act the same?
I am inclined now to get your display back to look at. If you please email support@matrixorbital.ca your email address and we can start up the return process for you.
Thanks,
I am inclined now to get your display back to look at. If you please email support@matrixorbital.ca your email address and we can start up the return process for you.
Thanks,
Raquel Malinis
Design and Development
Matrix Orbital
Design and Development
Matrix Orbital
Solution to the character 10 problem
For any who have a similar issue to me, in that sending character 10 displays a 13 pixel wide bar, the solution was obvious once I looked at the numbers, 10 being the line-feed character and 13 being carriage-return.
The linux terminal I was using to write to the display (/dev/tts/0 in my case), was translating character 10 to character 13.
This can be turned off with the stty program. I use the following line to set up the serial port for use:
"man stty" for more info.
I have been sent a uProject script that reprograms the original bar graph characters, so I hope that will solve the other issues I had (when I get to try it).
Thanks
The linux terminal I was using to write to the display (/dev/tts/0 in my case), was translating character 10 to character 13.
This can be turned off with the stty program. I use the following line to set up the serial port for use:
Code: Select all
stty -F /dev/tts/0 19200 raw nl
I have been sent a uProject script that reprograms the original bar graph characters, so I hope that will solve the other issues I had (when I get to try it).
Thanks