Page 1 of 1

Drawing a Bitmap Directly

Posted: Thu Dec 13, 2007 12:46 pm
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

Posted: Thu Dec 13, 2007 1:49 pm
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

Posted: Thu Dec 13, 2007 2:27 pm
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.

Posted: Thu Dec 13, 2007 2:58 pm
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.

Posted: Wed Jul 02, 2008 6:00 am
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.

Posted: Wed Jul 02, 2008 7:54 am
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?

Posted: Wed Jul 02, 2008 8:16 am
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]

Posted: Wed Jul 02, 2008 8:52 am
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#?

Posted: Wed Jul 02, 2008 9:10 am
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.

Posted: Wed Jul 02, 2008 9:40 am
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.

Posted: Wed Jul 02, 2008 9:46 am
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.