LCD2041 internal memory corruption?

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

LCD2041 internal memory corruption?

Post by thyrihad »

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
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello thyrihad,

Thanks for you post.

Can you please query the display for its version number?
254 / 54

Best Regards,
Raquel Malinis
Design and Development
Matrix Orbital
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

Is the result supposed to be sent back down the serial line or displayed on the LCD screen?

I get nothing back when I read after sending that command, but when I do read, a "V" is printed on the display, which would imply the version is v5.6
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello thyrihad,

Thanks for the version number, I'll get one here of exactly the same version and test out your strings. I will let you know.

Thanks,
Raquel Malinis
Design and Development
Matrix Orbital
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

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.
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello thyrihad,

I've tried the strings out and did not see the same result that you did. Please check out the actual data coming out from the serial port, you might want to scope out what '10' really is being sent out as.

Thanks,
Raquel Malinis
Design and Development
Matrix Orbital
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

Given that I can do pretty much everything else this display is capable of flawlessly, I doubt it's my inability to send the number 10 :p

Is there a way for me to reload the unit to it's default configuration and try that? Failing that can I please send this back to you for exchange?
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

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,
Raquel Malinis
Design and Development
Matrix Orbital
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

I'll try uProject as soon as I can, in the meantime I think I'll just buy another display and see if it's the same.

With regards to "factory reset", is there such a function available?

Thanks for your help
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

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?
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

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,
Raquel Malinis
Design and Development
Matrix Orbital
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Post by thyrihad »

I don't know about the other because it's not in my possesion at the moment. I'll get a returns number when I've bought some more in to replace this one, thanks.
thyrihad
LCD?
Posts: 9
Joined: Tue Apr 17, 2007 8:57 am

Solution to the character 10 problem

Post by thyrihad »

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:

Code: Select all

stty -F /dev/tts/0 19200 raw nl
"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
Post Reply