MO-2041 WB Backlight / MO-Perl

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

Moderators: Henry, Mods

Post Reply
s0me0ne
LCD?
Posts: 6
Joined: Thu Aug 07, 2003 8:57 am
Contact:

MO-2041 WB Backlight / MO-Perl

Post by s0me0ne »

Hello,
I've been messing around with my display for a while now and have some working code for an mp3 player using anders MO-Perl module which im sure some of you are fimilar with.
The thing is when i turn on the PC and the LCD lights up, the background is bright blue with a bright grey blinking cursor.. but as soon as I initalize the display and write some text to it, the background turns much darker and the so does the text - it just doesnt look as cool.

I read the PDF file from the manuals page on matrixorbital.com and the best answer i can come up with is that my problem is a brightness setting? Now according to the PDF document the commands for adjusting the brightness are: 254 153 [brightness]. So i set about adding a new sub to the Display.pm module but it doesnt quite work(the sub IS being called btw)... heres what I've done to test it:

Code: Select all

sub display_brightness
{
 $brightness = sprintf "%c153", 0xfe, 255;
                                                                                
 print DISPLAY "$brightness";
}
Unfortunatly when called the output is just as dull as normal but with "53" at position 1,1 ..
I'm pretty sure that im sending the commands to the display incorrectly so if anyone can guide me in the right direction I can add some more usfull features not yet implemented in the MO-Perl module..

While I have your attention :D Im interested in turning off the auto line wrap but I cant get this to work either. Just to make sure It does what i think it does: If i turn it off and send a string of say 24 chars only the first 20 will be shown and the last 4 should be cut off and ignored is that correct? I've been using the str() function to do some chopping but it's making adding songs from my playlist quite hard and messy...

Any reply or example code or even reading this is aprechiated =)
Thanks.
s0me0ne
LCD?
Posts: 6
Joined: Thu Aug 07, 2003 8:57 am
Contact:

Post by s0me0ne »

Surely someone can answer this? or at least point me in the right direction..
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Hello,

On the PCB there is a revision number, can you tell me what revision you have?
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
s0me0ne
LCD?
Posts: 6
Joined: Thu Aug 07, 2003 8:57 am
Contact:

Post by s0me0ne »

Miles, thanks for your reply. The revision number on the pcb is REV1.5 with "WB" written next to it in pen.
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

From what your explaining to me you must send the commands in the appropriate order. Command syntax then the parameters.

For ex: [254] [153] [255] If sent in this order the unit will recognize the function and the brightness will be set to full! :D

For auto line wrap "off", note that this is not "word wrapping" and wraps may occur in the middle of a word. Note that if auto line wrap and auto scroll are both off (default) text will wrap from line 1 to line 3 then 2 then 4. Factory default is OFF. If you send 24 characters, the first 20 will appear on the first line and the next 4 on the 3rd line if used in this mode.
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
s0me0ne
LCD?
Posts: 6
Joined: Thu Aug 07, 2003 8:57 am
Contact:

Post by s0me0ne »

Would you mind showing me in terms of:

$brightness = sprintf "%c153", 0xfe, 255;

try as i might i cant formulate my own commands..

On the old matrixorbital.com there was some example perl code for working with these lcd's, however I didnt download it when i had the chance and it doesnt seem to be on the new site. Is there a back up of the old site floating around work somewhere you could have a look at for me?
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Can you send me an email at myero@matrixorbital.ca and I will send you a couple of code examples!! :D
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Post Reply