Drawing a Bitmap Directly

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

Moderators: Henry, Mods

Post Reply
houserm62
LCD?
Posts: 3
Joined: Thu Dec 13, 2007 12:36 pm

Drawing a Bitmap Directly

Post by houserm62 »

I have the GLK24064-25 and I want to plot some data and write it to the screen. I use the 0xFE 0x64 command. Do I have to use the protocol of send a byte, read echo, and then ack?

Mike
Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Mike,

Thanks for your question, good to see that you are experimenting with some of the bitmap features of your GLK24064-25. If you would like to upload a bitmap directly to your display, you will have to follow the file upload protocol outlined in your manual which includes the send, echo, and ack bytes. If your data is relatively simple, you may be able to convey it using the draw pixel, line or rectangle commands. Best of luck in your application, if you have any more questions along the way, feel free to post them and I'll do my best to answer them.

Thanks,

Troy
Troy Clark
Design & Development
Matrix Orbital
houserm62
LCD?
Posts: 3
Joined: Thu Dec 13, 2007 12:36 pm

Post by houserm62 »

Thanks Troy. I will probably use the draw line or pixel commands. The reason that i asked was that I tried to Read the echo after sending a byte of data. The Read always throws the timeout exception. I expected it to work like this:

Loop:
Write(0x05);

echo = Read();

if(echo == 0x05)
Write(0x01)

I'm writing in C# and using the Windows SerialPort Class. The data is sent to the screen correctly only because I ignore the timeout. The ack never gets written.
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

You are correct you do not need to wait for an echo when writing direct bitmaps, that is only needed when uploading either fonts or bitmaps to the unit.
vedavis
LCD Geek
Posts: 21
Joined: Wed Jul 02, 2008 5:24 am

Post by vedavis »

I notice that the latest version of MOGD# does not have a Draw Bitmap Direct command. Is there a PC program that someone has written to do this? I can write one, but my efforts would be wasted if a program exists.
---------------
Vernon Davis
Thwing-Albert Instrument Company
vdavis@thwingalbert.com
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

Mogd# is primarily meant for quickly testing ,configuring and uploading fonts/bitmaps to a display. Given the volatile nature of the Draw Bitmap Direct command (Bitmap is gone when you power cycle or draw anythen else over top of it) we don't offer the command in mogd#.

Out of curiosity what where you intending on using it for?
vedavis
LCD Geek
Posts: 21
Joined: Wed Jul 02, 2008 5:24 am

Post by vedavis »

>> Out of curiosity what where you intending on using it for?

We are trying to find a drop-in replacement for our current 240 x 64 monochrome display from Apollo Displays. The only issue with the GLK24064 series is the amount of flash; we need to hold at least 50 240 x 64 bitmaps, requiring at least 96K of flash, whereas the GLK24064 has only 16K. I was hoping that using the TTL interface at 115K baud, I could download a 1920 bytes and update the bitmap in real-time without noticeable flicker. Do you think this is possible?[/b]
---------------
Vernon Davis
Thwing-Albert Instrument Company
vdavis@thwingalbert.com
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

At 115k2 you would theoretically be able to push 6 frames a second to the display. The human eye needs I think somewhere between 15-20 fps to see fluid motion so you will still see some flicker.

Our GX line of products is able to do those higher framerates over USB without problem but you'll need a usb host to drive it which isn't usually available in smaller embedded systems.

While I do see the use of the Direct Bitmap Write command in your application I'm still confused on its use in mogd# you are just interested to see how fast it would be? Or are you planning to somehow drive those 50 images from mogd#?
vedavis
LCD Geek
Posts: 21
Joined: Wed Jul 02, 2008 5:24 am

Post by vedavis »

>> I'm still confused on its use in mogd# you are just interested to see how fast it would be?...

Yes. It appears that mogd# can execute every command that the display supports except for the Draw Bitmap Directly.
---------------
Vernon Davis
Thwing-Albert Instrument Company
vdavis@thwingalbert.com
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

You can use the scripting functionality to get an idea of the speed of the draw bitmap direct. Here's a small script that clears the screen and draws a tiger.
Attachments
tiger.zip
(2.55 KiB) Downloaded 706 times
vedavis
LCD Geek
Posts: 21
Joined: Wed Jul 02, 2008 5:24 am

Post by vedavis »

>>Here's a small script that clears the screen and draws a tiger.

Thanks! I'll try it in few days and post my results. Vernon.

EDIT: Results. The display will handle a direct to display command with 240 x 64 bitmap at 115K baud with a slight repaint delay. This delay is visually unobtrusive and not an issue for our product line. Thanks for your support. Vernon.
---------------
Vernon Davis
Thwing-Albert Instrument Company
vdavis@thwingalbert.com
Post Reply