The GLK24064-25 is an intelligent graphic LCD display designed to decrease development time by
providing an instant solution to any project. With the ability to communicate via serial RS-232/TTL and I2C
protocols, the versatile GLK24064-25 can be used with virtually any controller. The ease of use is further
enhanced by an intuitive command structure to allow display settings such as backlight brightness, contrast
and baud rate to be software controlled. Additionally, text and fonts may be uploaded to the display and
stored in the on board memory.
1.1Display Options Available
The GLK24064-25 comes in a variety of colors including the standard yellow/green, the popular blue/white
and the crisp white/grey. Extended voltage, and temperature options are also available, to allow you to select
the display which will best fit your project needs.
Figure 2: GLK24064-25 Options
Matrix OrbitalGLK24064-251
Page 6
1.2Accessories
NOTE Matrix Orbital provides all the interface accessories needed to get your display
up and running. You will find these accessories and others on our e-commerce website at
http://www.matrixorbital.com. To speak with a sales associate see Section 15.5 on page 61
for contact information.
Figure 3: 5V Power Cable Adapter
Figure 4: 12V Power Cable Adapter (V/VPT Models)
Matrix OrbitalGLK24064-252
Page 7
Figure 5: Breadboard Cable
Figure 6: Serial Cable 4FT
Matrix OrbitalGLK24064-253
Page 8
Figure 7: Communication and 5V Power Cable
Figure 8: 4X4 Keypad
Matrix OrbitalGLK24064-254
Page 9
1.3Features
• 240 x 64 pixel graphics display
• Selectable communication protocol, RS-232 or I2C
• 128 byte buffered communication
• 5V - 20mA General Purpose Output
• 16 KB flash memory for fonts and bitmaps
• Lightning fast communication speeds, up to 115 kbps for RS-232 and 400 kbps for I2C
• Display text using built in or user supplied fonts
• Adjustable contrast
• Adjustable backlight brightness
• Default 19.2 kbps serial communication speed
• Extended temperature available for extreme environments of -20C to 70C
• Extended voltage and efficient power supply available
• Support for up to a twenty-five key matrix style keypad
Matrix OrbitalGLK24064-255
Page 10
1.4Connecting to a PC
The GLK24064-25 connects seamlessly to a PC and it is an excellent means of testing the functionality
and uploading new fonts and bitmaps. You will require a standard RS-232 9-pin serial cable such as the one
pictured in figure 6 on page 3, as well as a modified 5V power adapter such as the one pictured in figure 3 on
page 2.
In order to connect your display to a personal computer follow these easy instructions:
1. Plug the serial cable into the com port you wish to use.
2. Connect the modified 5V power adapter to a power lead from your PC power supply (you will have to
open your computer case).
3. Connect the serial cable to the DB-9 connector on the back of the display.
4. Connect the 5V power adapter to the 4-pin connector on the back of the display.
WARNING DO NOT use the standard floppy drive power connector,
as this will not provide you with the correct voltage and will damage the
display module.
Figure 9: PC vs Matrix Orbital Display Module Wiring
Matrix OrbitalGLK24064-256
Page 11
1.5Installing the Software
1.5.1MOGD#
MOGD# is the latest updated version of MOGD and can be used to manage font and graphics downloads
as well as exercise all of the features of our graphical displays. MOGD# provides a new user friendly
interface as well as many feature enhancements.
To install MOGD# from the Matrix Orbital CD, follow the following steps:
1. Insert the Matrix Orbital Cd-ROM into the Cd drive
2. Locate the file MogdSharp.zip, which should be in the “cd-drive:\Download” directory
3. Unzip MogdSharp.zip to a temporary directory using a program such as Winzip, Pkzip, etc.
4. Double click on "setup.exe"
5. Follow the instructions on the screen to complete the installation
6. MOGD# requires the .NET framework 2.0 and will download and install it automatically
After the installation is complete there will be a Matrix Orbital entry under “Start->Programs->Matrix Orbital” in the start menu. Click on the ’Mogd Sharp’ entry to run the program.
Be sure to check the information selected in the configuration panel the first time MOGD# is run.
Once this information is entered correctly the program can be used to control all functions of the graphic
display.speed=17.391-1
speed=16.391
PortThe serial port the display is plugged in to.
SpeedThe communication speed the display
module is set to. (Default 19,200)
Display TypeThe type of display. (GLK24064-25)
PCB RevisionThe revision of the display you are using.
(Found on the back of the PCB)
Figure 10: Mogd Sharp Settings
NOTES
• MOGD# may also be downloaded from Matrix Orbital’s support site at
• Winzip is available as a free download from http://www.winzip.com
Matrix OrbitalGLK24064-257
Page 12
2Hardware Information
Refer to the following diagram for this chapter:
1 DB-9 Connector6 Legacy Connector Jumper
2 Power Through DB9 Jumper7 Protocol Select Jumpers
3 Manual Override8 File System Lock Jumper
4 Keypad Interface Connector
5 Power / Data Connector
Figure 11: GLK24064-25
2.1DB-9 Connector
The GLK24064-25 provides a DB-9 Connector to readily interface with serial devices which use the
EIA232 standard signal levels of ±12V to ±12V. It is also possible to communicate at TTL levels of 0 to
+5V by setting the Protocol Select Jumpers to TTL. As an added feature it is also possible to apply power
through pin 9 of the DB-9 Connector in order to reduce cable clutter. However, in order to accomplish this
you must set the Power Through DB-9 Jumper.
9 Jumper. See table 1 on page 10 for
power requirements.)
Figure 12: RS-232 Pin-out
Matrix OrbitalGLK24064-258
Page 13
2.1.1Power Through DB-9 Jumper
In order to provide power through pin 9 of the DB-9 Connector you must place a solder jumper on the
Power through DB-9 Jumper pictured in figure 13 below. The GLK24064-25 allows all voltage models to use
the power through DB-9 option, see table 1 on the following page for display module voltage requirements.
Figure 13: Power Through DB-9 Jumper
WARNING Do not apply voltage through pin 9 of the DB-9 connector
AND through the Power/Data Connector at the same time.
2.2Power/Data Connector
The Power/Data Connector provides a standard connector for powering the display module. The GLK24064-
25 requires five volts for the standard display module, between nine to fifteen for the wide voltage (V) and
between nine to thirty-five volts for the wide voltage with efficient power supply module (VPT). The voltage is applied through pins one and four of the four pin Power/Data connector. Pins two and three are
reserved for serial transmission, using either the RS-232/TTL or the I2C protocol, depending on what has
been selected by the Protocol Select Jumpers. Pins two and three may be reversed by changing the LegacyConnector Jumpers in order to be compatible with previous PCB revisions.
• Do not apply any power with reversed polarization.
• Do not apply any voltage other than the specified voltage.
2.2.1Legacy Data Connector Jumpers
To reverse pins two and three of the Power/Data Connector remove the zero ohm resistors from the
Legacy Data Connector Jumpers, labeled with the = symbol and place them on the jumpers labeled with
the X symbol. This will allow you to transmit on pin two, and receive data on pin three as pictured in figure
The Protocol Select Jumpers, pictured below in figure 16, provide the means necessary to toggle the
display module between RS-232, TTL and I2C protocols. As a default, the jumpers are set to RS-232 mode
with zero ohm resistors on the 232 jumpers. In order to place the display module in I2C mode you must
first remove the zero ohm resistors from the 232 jumpers and then solder the resistors on to the I2C jumpers.
The display will now be in I2C mode and have a default slave address of 0x50 unless it has been changed.
Matrix OrbitalGLK24064-2510
Page 15
Similarly, in order to change the display to TTL mode, simply remove the zero ohm resistors from the 232
or I2C jumpers and solder them to the TTL jumpers.
Figure 16: Protocol Select Jumpers
2.4Keypad Interface Connector
The GLK24064-25 provides a Keypad Interface Connector which allows for up to a five by five matrix
style keypad to be directly connected to the display module. Key presses are generated when a short is
detected between a row and a column. When a key press is generated a character, which is associated with
the particular key press, is automatically sent on the Tx communication line. If the display module is running
in I2C mode, the “Auto Transmit Keypress” function may be turned off, to allow the key presses to remain
in the buffer so that they may be polled. The character that is associated with each key press may also be
altered using the “Assign Key Codes” command, for more detailed information see the Keypad Section, onpage 35.
Figure 17: Keypad Interface Connector
Matrix OrbitalGLK24064-2511
Page 16
2.5Manual Override
The Manual Override is provided to allow the GLK24064-25 to be reset to factory defaults. This can be
particularly helpful if the display module has been set to an unknown baud rate or I2C Slave Address and
you are no longer able to communicate with it. If you wish to return the module to its default settings you
must:
1. Power off the display module.
2. Place a Jumper on the Manual Override pins 1 and 2 as pictured below.
3. Power up the display module.
4. The display module is now set to its default values listed below in table 2.
NOTE The display module will revert back to the old settings once turned off, unless the
settings are saved.
Matrix OrbitalGLK24064-2512
Page 17
2.6Filesystem Lock Jumper
The File System Lock Jumper allows you to lock the file system on the GLK24064-25 so that no fonts or
bitmaps can be either written or deleted from the on board memory. This feature is useful in order to protect
data integrity of production units, if protection of other settings is required see Section 12.1.
To lock the file system, solder a zero ohm resistor or use a solder jumper on the Filesystem Lock Jumper
pictured in figure 19 below.
Figure 19: File System Lock Jumper
3Troubleshooting
3.1The display does not turn on when power is applied.
• First, you will want to make sure that you are using the correct power connector. Standard floppy
drive power cables from your PC power supply may fit on the Power/Data Connector however they do
not have the correct pin-out as can be seen in figure 9 on page 6. Matrix Orbital supplies power cable
adapters for connecting to a PC, which can be found in the Accessories Section on page 2.
• The next step is to check the power cable which you are using for continuity. If you don’t have an
ohm meter, try using a different power cable, if this does not help try using a different power supply.
• The last step will be to check the Power / Data Connector on the GLK24064-25. If the Power / Data
Connector has become loose, or you are unable to resolve the issue, please contact Matrix Orbital
see 15.5 on page 61 for contact information.
3.2The display module is not communicating.
• First, check the communication cable for continuity. If you don’t have an ohm meter, try using a
different communication cable. If you are using a PC try using a different Com port.
Matrix OrbitalGLK24064-2513
Page 18
• Second, please ensure that the display module is set to communicate on the protocol that you are
using, by checking the Protocol Select Jumpers. To change the protocol used by the display module
see Section 2.3 on page 10.
• Third, ensure that the host system and display module are both communicating on the same baud rate.
The default baud rate for the display module is 19200 bps.
• If you are communicating to the display via I2C please ensure that the data is being sent to the correct
address. The default slave address for the display module is 0x50.
NOTE I2C communication will always require pull up resistors.
• Finally, you may reset the display to it’s default settings using the Manual Override Jumper, see
Section 2.5 on page 12.
3.3The display module is communicating, however text cannot
be displayed.
• The cause of this is often that no font has been loaded onto the display. To load a font onto the display
see Section 4.2.1 on page 16.
• Another common cause may be that the contrast settings have been set to low. The solution to this
problem is to adjust the contrast settings, the default setting that will work in most environments is
128.
NOTE Optimal contrast settings may vary according to factors such as temperature, viewing angle and lighting conditions.
3.4There is a problem uploading fonts or bitmaps.
• First, ensure that you can communicate to the display. A good test is to use a PC, with MOGD# in-
stalled, to connect to the display. See Section 1.4 on page 6 for setting up a PC to test the GLK24064-
25.
• Second, unsure that the File System Lock Jumper has not been set. See Section 2.6 on the previous
page.
• Third, please ensure that the display module’s memory is not full. The GLK24064-25 has 16 Kb of
memory for fonts and bitmaps.
NOTE If you are unable to resolve any issue please contact Matrix Orbital. See 15.5 on
page 61 for contact information.
Matrix OrbitalGLK24064-2514
Page 19
4Communications
4.1Introduction
The commands listed in this chapter describe how to configure data flow on the RS232/TTL and I2C
port. The display has built in flow control which may be useful when long strings of text are downloaded to
the display. Flow control is enabled or disabled by two commands. If flow control is enabled, the display
will return an "almost full" message (0xFE) to the controller when its internal buffer fills to a defined level,
and an "almost empty" message (0xFF) when the buffer contents drop to a defined level.
4.1.1I2C Communication
The GLC25064 is capable of communicating at 400 Kbps in I2C mode, with 127 units addressable on
a single I2C communication line. However, in order to communicate via I2C you must first set the Protocol
Select Jumpers as can be seen in Section 2.3 and ensure that pull up resistors, with a nominal value of 1K to
10K, are placed on the SCL SDA communication lines coming from pins two and three of the Data / Power
Connector respectively. The GLK24064-25 uses 8-bit addressing, with the 8th bit designated as the read
write bit, a 0 designates a write address and a 1 designates a read address. The default read address of the
display module will be 0x51, whereas the write address is 0x50 by default, to change the I2C address see
section 8.2.1.
When communicating in I2C the GLK24064-25 will send an ACK on the 9th clock cycle when addressed.
When writing to the display module, the display will respond with a ACK when the write has successfully
been completed. However if the buffer has been filled, or the module is too busy processing data it will
respond with a NAK. When performing a multiple byte read within one I2C transaction, each byte read from
the slave should be followed by an ACK to indicate that the master still needs data, and a NAK to indicate
that the transmission is over.
4.1.2Serial Communication
In addition to being able to communicate via I2C the GLK24064-25 communicates natively through the
RS-232 protocol at a default baud rate of 19,200 bps and is capable of standard baud rates from 9600 to
115200 bps. Furthermore the GLK24064-25 is also capable of reproducing any non-standard baud rate in
between using values entered into our baud rate generation algorithm and set through command 164 (0xA4).
The display module communicates at standard voltage levels of . at ±12V to ±12V or at TTL levels of 0 to
+5V by setting the Protocol Select Jumpers to TTL.
Matrix OrbitalGLK24064-2515
Page 20
4.2Turn Flow Control On
Syntax
Parameters
DescriptionThis command enables flow control. When the buffer fills so that only
ParameterLengthDescription
full1The upper limit to issue an
empty1The lower limit to issue an
[full] bytes are available, the display will return an “almost full” message (0xFE) to the host controller. When the buffer empties so that only
[empty] bytes remain, the display will return an “almost empty” message
(0xFF) to the host controller.
The display will return the “almost full” message for every byte sent to
the display until the used buffer space once more drops below the [full]
level. Whether the user is in ‘flow control mode’ or not, the module will
ignore display or command bytes which would overrun the buffer. While
in ‘flow control mode’ the unit will return 0xFE when buffer is almost
full even though it may have already thrown rejected data away. The
buffer size for the display is 80 bytes.
When using this command in an application, selection of the value for
the buffer [full] should be considered very carefully. This is a critical
aspect to be able to use this feature to it’s full potential. When using a
host system or PC which contains a FIFO, the user should set the value
of [full] equal to or greater than the size of the FIFO. The reason for this
is that the FIFO may be full when the host system receives 0xFE. In the
case of 16550 UART the size at its maximum is 16, therefore the value
of [full] should be set to 16 or greater.
RememberedNo
Factory DefaultOff
4.3Turn Flow Control Off
Syntax
Matrix OrbitalGLK24064-2516
Hexadecimal0xFE 0x3B
Decimal254 59
ASCII254 “;”
Page 21
DescriptionThis command turns off flow control. Bytes may overflow the buffer
without warning.
RememberedNo
4.4Changing the I2C Slave Address
Syntax
Parameters
DescriptionThis command sets the I2C write address of the module between 0x00
ParameterLengthDescription
adr1The new I2C write address (0x00 -
0xFF).
and 0xFF. The I2C write address must be an even number and the read
address is automatically set to one higher. For example if the I2C write
address is set to 0x50, then the read address is 0x51.
ParameterLengthDescription
speed2Inputed LSB MSB from baud rate
formula (12-2047).
DescriptionThis command sets the RS-232 port to a non-standard baud rate. The
command accepts a two byte parameter that goes directly into the modules baud generator. Use the formula, speed =
16,000,000
8×DesiredBaud
− 1 to calculate the [speed] for any baud rate setting. The speed can be anywhere
from 12 to 2047 which corresponds to a baud range of 977 to 153,800
baud. Setting the baud rate out of this range could cause the display to
stop working properly and require the Manual Override jumper to be set.
RememberedAlways
Examples
speed = 17.391− 1
speed =
16, 000, 000
8 × DesiredBaud
−1
speed = 16.391
speed =
16, 000, 000
8 × 115, 000
−1
LSB = 16
MSB = 0
NOTE Results from the formula are rounded to the nearest whole number.
Matrix OrbitalGLK24064-2518
Page 23
5Fonts
5.1Introduction
The GLK24064-25 comes loaded with the ’Small Filled’ and ’Futura Bk BT 16’ fonts by default however, it is capable of displaying any font that is uploaded to it in the correct format. MOGD# provides a
simple method of generating font files from your installed fonts. For instructions on how to install MOGD#
see Section 1.5.1 on page 7.
5.1.1Font File Format
A font file consists of three parts, a header, a character table and bitmap data.
1. Header (4 bytes)
(a) Nominal Width (1 byte)
(b) Height (1 byte)
(c) ASCII Start Value (1 byte)
(d) ASCII End Value (1 byte)
2. Character Table (3 bytes for every character between the ASCII Start and End values inclusive)
(a) High Offset LSB (1 byte)
(b) Low Offset MSB(1 byte)
(c) Character Width (1 byte)
3. Bitmap Data
5.1.2Creating a Font
The following is an example of how to create a font file for the letters h, i and j.
First you must create the bitmaps containing the character data in bitmap form. Figure 20 below illustrates the bit pattern for the h, i and j bitmap data.
Figure 20: Bitmaps for h, i, and j
Second you may begin to create the font file starting with the header. The header will contain the nominal
width, the height and the ASCII start and end values inclusive that you wish to create characters for.
Matrix OrbitalGLK24064-2519
Page 24
Character Data
Character DataByte Size (For Reference)
h0x840x2D0x980xC60x200x05
i0x430x240x840x03
j0x2D0x980x190x600x04
Table 8: Font File Header
Nominal WidthHeightASCII Start ValASCII End Val
0x050x070x490x4B
Next we will have to find out how many bytes each character will use up, in order to create the character
table. The bitmaps are encoded horizontally and may have variable widths, h has a width of five, i a width
of three and j a width of four, see the figure below for an example of encoding the first letter h:
Bitmap DataByteHex Value
10000
10000100001000x84
10110001011010x2D
1100110011000Fonts
10001110001100xC6
10001001000000x20
10001
Figure 21: Bitmap Encoding
As you can see the letter h will take up five bytes with the last three bits being zero padded to form a full
byte. So if you continue the process you will get the character data as seen in table 5.1.2.
The second part of the font file is the character table. The character table is comprised of three bytes for
every glyph in the font file.
The first two bytes represents the position, in bytes, of the glyph stored MSB LSB referenced from the
beginning of the file including the header. The third byte is the width of the glyph in pixels. So because there
will be 0x09 bytes in the character table (three bytes for each glyph) and four bytes in the header section,
the first entry in the table will be 13, or 0x00 0x0D in hexadecimal, and 0x05 for the width.
To calculate the second entry in the character table, representing the position and width of the second
glyph, take the offset of the first entry and add the size of the first bitmap in bytes. Since the first glyph
occupies 0x05 bytes as seen in table 5.1.2 above, and the offset is 0x00 0x0D, the offset of the second entry
will be 0x00 0x12 and the width of the glyph is 0x03.
Calculate the third entry the same way as the second to get table 9 below.
Matrix OrbitalGLK24064-2520
Page 25
Table 9: Character Table
High Offset (MSB)Low Offset (LSB)Character Width
h0x000x0D0x05
i0x000x120x03
j0x000x150x04
Once completed, place the character table after the header and the character data at the end, as seen in
table 10.
ParameterLengthDescription
refID1A unique font identification
number.
size2Font file size (LSB to MSB).
dataxFont file data.
Page 26
DescriptionIn order to upload a font to the GLK24064-25 you must first initiate the
upload font file command (0xFE 0x24), you must then pass it a reference
identification number, which must be unique for every font on the display
module. You may then pass the display module the two byte file size,
which needs to be transfered LSB, then MSB. The last part of uploading
a font is transmitting the font file data.
For detailed instructions on uploading a file to the GLK24064-25 see
Section 11.1 on page 43.
RememberedAlways
5.3Setting the Current Font
Syntax
Parameters
DescriptionIn order to set the font on the GLK24064-25 you must know the font
ParameterLengthDescription
refID1A unique font identification
number.
identification number of the font that you wish to use. The font ID is
established when the font is saved to the display. The default installed
fonts are “Small Filled” and “Futura Bk BT 16” and their font ID’s are
0x01 and 0x02 respectfully. Once you are aware of the font ID for the
font that you wish you use, simply send the command bytes (0xFE 0x31)
and then send the font ID corresponding to the font you wish to use. A
directory listing of the contents of the entire filesystem may be obtained
by using the “Get Filesystem Directory” command, see Section 11.5 on
page 46 for more detailed information.
DescriptionFont metrics define where the characters are positioned on the
RememberedYes
ParameterLengthDescription
lm1Left margin: Location in pixels.
tm1Top margin: Location in pixels.
csp1Character Spacing: Amount of
space in pixels between characters.
lsp1Line Spacing: Amount of space
between lines in pixels.
srow1Scroll Row: The Y location of the
last row in pixels.
screen, by setting where the rows and columns begin based on the
[lm][tm][csp][lsp][srow] parameters. [lm] defines the leftmost position
and [tm] the topmost. [csp] controls the amount of pixels that are placed
in between characters and [lsp] controls the amount of pixels that are
placed in between lines. [srow] is the location of the top of the last row
that will be displayed on the GLK24064-25. It defines the row that, when
filled, will cause the display to auto scroll if auto scrolling is enabled.
The font metrics will have to be reconfigured after changing to a different font.
5.5Set Box Space Mode
Syntax
Parameters
DescriptionThis command will toggle the box space mode. Box space mode is when
a box, the size of the character to be written, is printed to the display
before a character is written.
Page 28
6Text
6.1Introduction
The GLK24064-25 is an intelligent display module, designed to reduce the amount of code necessary
to begin displaying data. This means that it is able to display all characters and strings that are sent to it,
which are defined in the current font, without much, if any configuration. The display module will begin
displaying text at the top left corner of the display area, known as home, and continue to print to the display
as if it was a page on a typewriter. When the text reaches the bottom right, as defined in the font metrics, it
will automatically scroll all of the lines up and continue to display text.
6.2Move Cursor Home
Syntax
DescriptionThis command moves the text insertion point to the top left of the display
RememberedNo
Hexadecimal0xFE 0x48
Decimal254 72
ASCII254 “H”
area, based on the current font metrics see Section 5.4 on page 22.
6.3Setting the Cursor Position
Syntax
Parameters
DescriptionThis command sets the text insertion point to the [col] and [row] speci-
fied. The insertion point is positioned using the base size of the current
font (this command does not position the insertion point at a specific
pixel). The pixel column used is determined by multiplying the width of
the widest character in the font by the [column]. The pixel row used is
determined by multiplying the height of the font by [row + Metrics: line
spacing].
Matrix OrbitalGLK24064-2524
Page 29
RememberedNo
6.4Setting the Cursor Coordinate
Syntax
Parameters
DescriptionThis command positions the insertion point at a specific pixel (X,Y),
which references the top left corner of the font insertion point.
6.5Auto Scroll On
Syntax
Hexadecimal0xFE 0x51
Decimal254 81
ASCII254 “Q”
DescriptionWhen auto scrolling is on, it causes the display to shift the entire display’s
contents up to make room for a new line of text when the text reaches
the end of the scroll row defined in the font metrics (the bottom right
character position) see Section 5.4 on page 22.
RememberedYes
Factory DefaultOn
Matrix OrbitalGLK24064-2525
Page 30
6.6Auto Scroll Off
Syntax
DescriptionWhen auto scrolling is disabled, text will wrap to the top left corner of
RememberedYes
Factory DefaultOn
Hexadecimal0xFE 0x52
Decimal254 82
ASCII254 “R”
the display area when the text reaches the end of the scroll row defined in
the font metrics (the bottom right character position) see Section 5.4 onpage 22. Existing text in the display area is not erased before new text is
placed. A series of spaces followed by a “Cursor Home” command may
be used to erase the top line of text.
7Bitmaps
7.1Introduction
One of the main features of the GLK24064-25 is its ability to display bitmap images, that are either
loaded onto its on board memory, or written directly to the screen. This chapter will cover creating a bitmap,
uploading the bitmap, as well as drawing the bitmap from memory and directly.
number.
size2Bitmap file size (LSB to MSB).
dataxBitmap data.
Page 31
DescriptionThe GLK24064-25 is capable of storing up to sixty-four font and bitmap
files combined. In order to upload a bitmap to the GLK24064-25 you
must first initiate the upload font file command (0xFE 0x5E), you must
then pass it a reference identification number, which must be unique for
every font on the display module. You may then pass the display module
the two byte file size, which needs to be transfered LSB, then MSB. The
last part of uploading a bitmap is transmitting the bitmap file data.
For detailed instructions on uploading a file to the GLK24064-25 see
Section 11.1 on page 43.
RememberedAlways
7.3Drawing a Bitmap from Memory
Syntax
Parameters
DescriptionThis command will draw a bitmap that is located in the on board memory.
The bitmap is referenced by the bitmaps reference identification number,
which is established when the bitmap is uploaded to the display module.
The bitmap will be drawn beginning at the top left, from the specified
X,Y coordinates. A directory listing of the contents of the entire filesystem may be obtained by using the “Get Filesystem Directory” command,
see Section 11.5 on page 46 for more detailed information.
age to the memory can be a very useful feature for drawing images that
are not used very often. In order to accomplish this, you must supply the
display module with the X,Y coordinates, representing the top left corner
of where you would like to draw the bitmap on the screen, as well as the
width and the height of the bitmap. After you have supplied this data you
may then upload the bitmap data to the GLK24064-25. The bitmap data
is encoded into bytes horizontally and is transfered the same as if you
were uploading a file, see Section 11.1 on page 43 for more information
about transferring data to the display module.
NOTE Drawing a bitmap directly to the display supports flow control.
8Bar Graphs and Drawing
8.1Introduction
Supplementary to the ability of the GLK24064-25 to display bitmaps and fonts, the GLK24064-25 also
allows for a robust 2D drawing environment. With the ability to draw by pixel, line or rectangle, as well as
the ability to continue a line to form a polygon, we are certain that you will spend less time, developing and
creating better looking projects. With the addition of custom bar and strip graphs, you are sure to find the
right tools to make any graphical layout a success.
DescriptionThis command will draw a line from (x1,y1) to (x2,y2) using the current
drawing color. Lines may be drawn from any part of the display to any
other part. However, it may be important to note that the line may interpolate differently right to left, or left to right. This means that a line
drawn in white from right to left may not fully erase the same line drawn
in black from left to right.
RememberedNo
8.5Continue a Line
Syntax
Parameters
DescriptionThis command will draw a line with the current drawing color from the
1: Black). The top left corner is specified by (x1,y1) and the bottom right
corner by (x2,y2). Since this command involves considerable processing
overhead, we strongly recommend the use of flow control, particularly if
the command is to be repeated frequently.
DescriptionThis command initializes a bar graph referred to by number [reference
ParameterLengthDescription
refID1Reference number
type1Type of bar graph.
x11Left bounds.
y11Top Bounds.
x21Right Bounds.
y21Bottom Bounds.
number] of type [type] with size from (x1,y1) (top left) to (x2,y2)
(bottom right). A maximum of 16 bar graphs with reference numbers
from 0 to 15 can be initialized as:
The bar graphs may be located anywhere on the display, but if
they overlap, they will not display properly.
It is important that [x1] is less than [x2], and [y1] is less than [y2]. This
command doesn’t actually draw the graph, it must be filled in using the
Fill Bar Graph command. The unit saves time by only drawing that part
of the bar graph which has changed from the last write, so the representation on the screen may not survive a screen clear or other corrupting
action. A write of value zero, followed by new values will restore the
proper look of the bar graph.
ParameterLengthDescription
ref1Initialized bar graph reference
number.
value1The number of pixels to fill.
Page 37
DescriptionOnce the bar graph has been initialized it can be filled in using this com-
mand. This command sets the bar graph specified by the [ref] number
to fill in [value]. [value] is given in pixels and should not exceed the
available height/width of the graph. (If it does the graph will simply be
written to its maximum size.)
DescriptionA strip chart is an area of the screen reserved for horizontal scrolling.
This is normally used as follows:
• Initialize the strip chart, which reserves the appropriate area of the
screen.
• Draw a line segment at the right or left side of the strip chart.
• Shift the strip chart to the right or left.
• Draw the next line segment.
• Used this way the strip chart can produce a graph which scrolls
smoothly horizontally in either direction. With text the strip chart
can produce a marquis effect.
NOTE If the strip chart is used with text we recommend the use of a 6 or 7 pixel wide
fixed width character set, with each character placed 8 pixels from the start of the previous
one.
Up to 7 strip charts ([ref] = 0 - 6) may be defined. To initialize a strip
chart the user must define an area on the display in which to place the
strip chart.(x1,y1) is the top left corner of the area to be used, where [x1]
is the placement of the column where the strip chart is to begin and [y1]
is the row. The user must then define [x2] as the bottom right column of
the area to be utilized and [y2] as the bottom right row.
The definition of x must lie on byte boundaries. That is, x must be defined
as 0x00, 0x08, 0x10, etc. This restriction does not apply to y values.
ParameterLengthDescription
ref1Reference number of a strip chart
that has already been created.
Page 39
DescriptionThis command shifts the strip chart left or right. [ref] determines both
which strip chart is used and which direction it will shift. The direction
is selected by the most significant bit (MSB):
• MSB: 0 shifts left
• MSB: 1 shifts right
For example if [ref] is 1:
• 254 107 1 (hex FE 6B 01) shifts left
• 254 107 129 (hex FE 6B 81) shifts right
This command shifts the contents of the area defined in the Initialize
Strip Chart command 8 pixels at a time.
RememberedNo
9Keypad
9.1Introduction
The GLK24064-25 supports up to a twenty-five key, matrix style, keypad and may be configured to
allow key presses to be automatically transmitted via RS-232 or polled through I2C. The GLK24064-25 also
allows for auto-repeating key presses, and remapping of all keypad character codes.
9.2Auto Transmit Key Presses On
Syntax
DescriptionIn this mode, all key presses are sent immediately to the host system
RememberedYes
Factory DefaultOn
Matrix OrbitalGLK24064-2535
Hexadecimal0xFE 0x41
Decimal254 65
ASCII254 “A”
without the use of the poll keypad command. This is the default mode
on power up.
Page 40
9.3Auto Transmit Key Presses Off
Syntax
DescriptionIn this mode, up to 10 key presses are buffered until the unit is polled
RememberedYes
Hexadecimal0xFE 0x4F
Decimal254 79
ASCII254 “O”
by the host system, via the poll keypad command 254 38. Issuing this
command places the unit in polled mode.
9.4Poll Key Press
Syntax
DescriptionThis command returns any buffered key presses via the RS-232 inter-
Hexadecimal0xFE 0x26
Decimal254 38
ASCII254 “&”
face. The host system must be set up to receive key codes. When the
display receives this command, it will immediately return any buffered
key presses which may have not been read already. If there is more than
one key press buffered, then the high order bit (MSB) of the returned key
code will be set (1). If this is the only buffered key press, then the MSB
will be cleared (0). If there are no buffered key presses, then the returned
code will be 0x00. Please note that to make use of this command, the
“Auto Transmit Key Presses” mode should be off.
RememberedNo
9.5Clear Key Buffer
Syntax
Matrix OrbitalGLK24064-2536
Hexadecimal0xFE 0x45
Decimal254 69
ASCII254 “E”
Page 41
DescriptionThis command clears any unread key presses. In a menu application, if
the user presses a key which changes the menu context, any following
key presses may be inaccurate and can be cleared out of the buffer between menu changes to prevent jumping around the menu tree. It may
also be used, in effect, to reset the keypad in case the host application
resets for whatever reason.
RememberedNo
9.6Set Debounce Time
Syntax
Parameters
DescriptionThis command sets the time between key press and key read. All key
ParameterLengthDescription
time1Debounce time in increments of
6.554ms (0 - 255).
types with the exception of latched piezo switches will ’bounce’ for a
varying time, depending on their physical characteristics. The [time]
value is in increments of 6.554ms. The default debounce time for the
module is 8 (about 52ms), which is adequate for most membrane keypads.
Resend Key Mode This mode is similar to the action of a keyboard on
a PC. In this mode, when a key is held down, the key code is
transmitted immediately followed by a 1/2 second delay. After
this delay, key codes will be sent via the RS-232 interface at a rate
of about 5 codes per second. This mode has no effect if polling or
if using the I2C interface.
Key Up/Down Mode This mode may be used when the typematic pa-
rameters of the “Resend Key Code” mode are unacceptable or if
the unit is being operated in polled mode. The host system detects
the press of a key and simulates an auto repeat inside the host system until the key release is detected. In this mode, when a key is
held down, the key code is transmitted immediately and no other
codes will be sent until the key is released. On the release of the
key, the key release code transmitted will be a value equal to the
key down code plus 20 hex.
RememberedYes
ExamplesWhen the key code associated with key ’P’ (0x50) is pressed, the release
code is ’p’ (0x70). In RS-232 polled mode or via the I2C, the “Key
Down / Key Up” codes are used; however, the user should be careful of
timing details. If the poll rate is slower than the simulated auto-repeat it
is possible that polling for a key up code will be delayed long enough
for an unwanted key repeat to be generated.
9.8Auto Repeat Mode Off
Syntax
DescriptionThis command turns auto repeat mode off. See Set Auto Repeat Mode.
Matrix OrbitalGLK24064-2538
Hexadecimal0xFE 0x60
Decimal254 96
ASCII254 “‘”
Page 43
RememberedNo
9.9Assign Keypad Codes
Syntax
Parameters
DescriptionThis command will allow you to reassign the key codes that correspond
ParameterLengthDescription
KDown25Key down codes
KUp25Key up codes
to the key presses on the matrix style key pad. The first twenty-five bytes
that are transmitted will be used for the key down codes and the next
twenty-five bytes that are transmitted will be used for the key up codes.
The default values of the key down codes are ’A-Y’ in order, and for the
key up codes the values are ’a-y’ in order.
Key Down
12345
1ABCDE
2FGHIJ
3KLMNO
4PQRST
5UVWXY
1abcde
2fghij
3klmno
4pqrst
5uvwxy
Key Up
12345
10Display Functions
10.1Introduction
The GLK24064-25 employs software controlled display settings, which allow for control over, clearing
the screen, changing the brightness and contrast or setting timers for turning it on or off. The combination
of these allow you complete software control over your display’s appearance.
Matrix OrbitalGLK24064-2539
Page 44
10.2Clear Screen
Syntax
DescriptionThis command clears the display and resets the text insertion position to
RememberedNo
Hexadecimal0xFE 0x58
Decimal254 88
ASCII254 “X”
the top left position of the screen defined in the font metrics.
ParameterLengthDescription
min1Minutes before turning the
backlight on (0 to 90).
DescriptionThis command turns the backlight on after the [minutes] timer has ex-
pired , with a ninety minute maximum timer. A time of 0 specifies that
the display should turn on immediately and stay on. When this command
is sent while the remember function is on, the timer will reset and begin
after power up.
RememberedYes
Factory Default0
Matrix OrbitalGLK24064-2540
Page 45
10.4Backlight Off
Syntax
DescriptionThis command turns the backlight off immediately. The backlight will
RememberedYes
Hexadecimal0xFE 0x46
Decimal254 70
ASCII254 “F”
remain off until a ’Backlight On’ command has been received.
10.5Set Backlight Brightness
Syntax
Parameters
DescriptionThis command sets the backlight settings according to [backlight]. If the
ParameterLengthDescription
contrast1Contrast value (0 to 255).
a value between 0x00 and 0xFF (between 0 to 255). Lower values cause
‘on’ elements in the display area to appear lighter, while higher values
cause ‘on’ elements to appear darker. Lighting and temperature conditions will affect the actual value used for optimal viewing. Individual
display modules will also differ slightly from each other in appearance.
In addition, values for optimal viewing while the display backlight is on
may differ from values used when backlight is off.
This command does not save the [contrast] value, and is lost after power
down; but this command has the option of remembering the settings
when issued with the Remember function ‘on’ . When this is the case,
this command is the same as the Set and Save Contrast command.
ParameterLengthDescription
contrast1Contrast value (0 to 255).
Page 47
DescriptionThis command sets the display’s contrast to [contrast], where [contrast] is
a value between 0x00 and 0xFF (between 0 to 255). Lower values cause
‘on’ elements in the display area to appear lighter, while higher values
cause ‘on’ elements to appear darker. Lighting conditions will affect the
actual value used for optimal viewing. Individual display modules will
also differ slightly from each other in appearance. In addition, values for
optimal viewing while the display backlight is on may differ from values
used when backlight is off.
NOTE This command saves the [contrast] value so that it is not lost after power down.
RememberedYes
Factory Default128
11Filesystem
11.1Introduction
11.1.1File Upload Protocol
In order to allow fonts and bitmaps to be uploaded to the on board flash memory Matrix Orbital has
developed a simple protocol that supports RS-232/TTL or I2C communications. In order to upload a font
file you must first provide a reference identification number (ref ID), then the file size and finally the data.
The reference identification number will allow you to identify the font for future use. After transmitting
the refID, please wait for the display module to send an immediate confirmation that the reference ID has
not been used yet. The display module will do this in the form of echoing the byte back to you. Once you
receive the echo, you must then confirm it by sending a 0x01 byte.
The next part of uploading a font file is to provide the display module with a two byte file size of the
font file you are attempting to upload; the font size must be formated LSB to MSB. After the first byte is
transmitted you will receive an echo of the byte and you must confirm the echo with a confirmation byte
(0x01). However, after the display module receives the second byte it will echo the byte and then send a
0x01 confirmation byte if the file fits, if the file does not fit the module will notify you by sending 0x08 and
then it will terminate the upload session. If the font file does fit you must confirm the echo with a 0x01 byte.
Matrix OrbitalGLK24064-2543
Page 48
The last part of uploading a font file is to upload the file data. After transmitting each byte of the file the
module will echo the byte and wait for a confirmation byte of 0x01 until the file has completed uploading.
Below is an example of uploading the font file which we created in Section 5.1.2 on page 19.
Host:Transmit(0xFE); //Command Prefix
Transmit(0x24); //Font file upload command
Transmit(0x03); //Request file ID for font file
Module: Echo(0x03);//Accept request for file ID, by echoing the request
Host:Receive();//Receive the echo
Confirm(0x01); //Confirm File ID
Transmit(0x19); //Transmit the file size LSB
Module: Echo(0x19);//Echo the LSB
File Size = 0x19
Host:Receive();//Receive LSB echo
Confirm(0x01); //Confirm the LSB
Transmit(0x00); //Transmit MSB
Module: Echo(0x00);//Echo MSB
FileFits(0x01); //Send confirmation that the file fits
Host:Receive();//Receive confirmation
Transmit(0x05); //Begin transmit of file data
Module: Echo(0x05);//Echo first byte from file
Host:Receive();//Receive echo
Confirm(0x01); //Confirm echo
Transmit(0x07); //Transmit second byte of file data
etc...
NOTES
• The GLK24064-25 has watch dog timer, set to 2.1 seconds in between transmissions,
in order prevent the display module from staying in a waiting state.
• Once the timeout has been reached the timer will reset the display and issue a 0xFE
0xD4 response to the host to signal that this has happened.
Matrix OrbitalGLK24064-2544
Page 49
11.2Wipe Filesystem
Syntax
DescriptionThis command completely erases the display’s non-volatile memory. It
removes all fonts, font metrics, bitmaps, and settings (current font, cursor
position, communication speed, etc.). It is an “odd” command in that it
is three bytes in length in order to prevent accidental execution.
11.3Deleting a File
Syntax
Parameters
DescriptionThis command erases a single file at a time within the GLK24064-25
ParameterLengthDescription
type1Type of file (0:Font, 1:Bitmap)
refID1Reference ID of the file to delete.
memory when given two parameters: [type] and [ref]. The file type and
reference number are defined when the file is saved to the GLK24064-25.
• [type] = 1: Bitmap
• [type] = 0: Font
RememberedYes
11.4Get Filesystem Space
Syntax
Matrix OrbitalGLK24064-2545
Hexadecimal0xFE 0xAF
Decimal254 175
Page 50
DescriptionThis command will return 4 bytes, LSB to MSB for how many bytes are
remaining in the 16 KB on board memory.
RememberedNo
11.5Get Filesystem Contents
Syntax
DescriptionThis command will return the contents of the file system directory.
RememberedNo
Hexadecimal0xFE 0xB3
Decimal254 179
The first byte returned will be a hex value representing the number of
entries in the filesystem, followed by four bytes for each entry. See the
following tables:
ParameterLengthDescription
oldT1Old file type
oldID1Old file ID
newT1New file type
newID1New file ID
type of a file that was uploaded incorrectly. The command first checks to
see if there is a file identified by [oldT] and [oldID]. If it does exist, and
there is no file already with the desired type and ID, the ID and type of
the old file will be changed to [newT] and [newID] respectively.
12Data Security
12.1Introduction
Ensuring that your GLK24064-25 display’s exactly what you want it to can be the difference between a
projects success and failure. This is why we incorporate features such as Data Lock into the GLK24064-25.
With this new feature you now are in control over of how and when settings will be changed so there is no
need to worry about the module acting exactly like you expected it to because all the settings may be locked
and remembered for the next power up.
Matrix OrbitalGLK24064-2547
Page 52
12.2Set Remember
Syntax
Parameters
DescriptionThis command allows you to switch the remember function on and off.
ParameterLengthDescription
switch10: Do not remember, 1: Remember
To use the remember function, set remember to on, then set all of the
settings that you wish to save, settings that are listed as ’Remember:
Yes’ support being saved into the non-volatile memory. After you have
set all of the commands that you wish to save, you may then cycle the
power and check the display settings to ensure that all the settings have
been saved. If you wish to use remember again after cycling the power,
you must set it to on again.
NOTES
• Writing to non-volatile memory is time consuming and slows down the operation of
the display.
• Non-volatile memory has a ‘write limit’ and may only be changed approximately
ParameterLengthDescription
level1Sets the data lock level
Page 53
DescriptionData lock, originally known as paranoia, allows you to lock the module
from displaying information, as well as enables the protection of the
filesystem and module settings. Each bit corresponds corresponds to a
different lock level, while sending a zero will unlock your display as the
following tables explains:
BitBinaryData Lock LevelDescription
00UnlockSending a zero will cause
the display to unlock.
1-41-1111Reserved
510000Setting LockLocks the display settings
such as backlight, contrast
and GPO settings.
6100000Filesystem LockWhen locked no bitmap or
font files may be added,
deleted or modified.
71000000Command LockLocks all commands but
the the data lock command.
810000000
NOTES
• Sending a new data lock level will override the previous data lock level.
• Data lock levels may be combined.
RememberedAlways
Factory Default0
Examples
HexDecBinaryDescription
0x0000Unlock
0xF024011110000Setting, Filesystem, Command and Display Lock
0x508001010000Setting and Command Lock
Matrix OrbitalGLK24064-2549
Page 54
12.4Set and Save Data Lock
Syntax
Parameters
DescriptionThis command will set and save the data lock level. See the Data Lock
ParameterLengthDescription
level1Sets the data lock level
section for more information.
13Miscellaneous
13.1Introduction
This chapter covers the ’Report Version Number’ and ’Read Module Type’ commands. These commands
can be particularly useful to find out more information about the display module before contacting technical
support.
13.2Read Version Number
Syntax
DescriptionThis command will return a byte representing the version of the module,
Matrix OrbitalGLK24064-2550
Hexadecimal0xFE 0x36
Decimal254 54
ASCII254 “6”
see the following table as an example:
Hex ValueVersion Number
0x10Version 1.0
0x20Version 2.0
0x42Version 4.2
Page 55
RememberedNo
13.3Read Module Type
Syntax
DescriptionThis command will return a hex value corresponding to the the model
CommandDescriptionPage
HexDecASCII
0x2133“!”Wipe Filesystem45
0x2436“$”Uploading a Font File21
0x2638“&”Poll Key Press36
0x3149“1”Setting the Current Font22
0x3250“2”Font Metrics22
0x3351“3”Changing the I2C Slave Address17
0x3654“6”Read Version Number50
0x3755“7”Read Module Type51
0x3957“9”Changing the Baud Rate17
0x3A58“:”Turn Flow Control On16
0x3B59“;”Turn Flow Control Off16
0x4165“A”Auto Transmit Keypresses On35
0x4266“B”Backlight On40
0x4569“E”Clear Key Buffer36
0x4670“F”Backlight Off41
0x4771“G”Setting the Cursor Position24
0x4872“H”Move Cursor Home24
0x4F79“O”Auto Transmit Keypresses Off36
0x5080“P”Set Contrast42
0x5181“Q”Auto Scroll On25
0x5282“R”Auto Scroll Off26
0x5585“U”Set Debounce Time37
0x5888“X”Clear Screen40
0x5E94“^”Uploading a Bitmap File26
0x6096“‘”Auto Repeat Mode Off38
0x6298“b”Drawing a Bitmap from Memory27
0x6399“c”Set Drawing Color28
0x64100“d”Drawing a Bitmap Directly27
0x65101“e”Continue a Line30
0x67103“g”Initializing a Bar Graph31
0x69105“i”Drawing a Bar Graph32
0x6A106“j”Initializing a Strip Chart33
0x6B107“k”Shifting a Strip Chart34
0x6C108“l”Drawing a Line29
0x70112“p”Draw Pixel29
0x72114“r”Draw a Rectangle30
0x78120“x”Drawing a Solid Rectangle31
0x79121“y”Setting the Cursor Coordinate25
0x7E126“~”Set Auto Repeat Mode37
0x91145Set and Save Contrast42
0x93147Set Remember48
Matrix OrbitalGLK24064-2558
Page 63
CommandDescriptionPage
HexDecASCII
0x98152Set and Save Backlight Brightness41
0x99153Set Backlight Brightness41
0xA4164Setting a Non-Standard Baud Rate18
0xAC172Set Box Space Mode23
0xAD173Deleting a File45
0xAF175Get Filesystem Space45
0xB2178Downloading a File46
0xB3179Get Filesystem Contents46
0xB4180Moving a File47
0xCA202Data Lock48
15Appendix
15.1Specifications
15.1.1Environmental
Table 70: Environmental Specifications
Standard TemperatureExtended Temperature
Operating Temperature0◦C to +50◦C-20◦C to +70◦C
Storage Temperature-20◦C to +70◦C-30◦C to +80◦C
Operating Relative Humidity90% max non-condensing
Vibration (Operating)4.9 m/s2XYZ directions
Vibration (Non-Operating)19.6 m/s2XYZ directions
Shock (Operating)29.4 m/s2XYZ directions
Shock (Non-Operating)490 m/s2XYZ directions
Matrix OrbitalGLK24064-2559
Page 64
15.1.2Electrical
Table 71: Electrical Specifications
StandardWide Voltage (V)WideVoltagewithEfficient
Switching Power Supply
(VPT)
Supply Voltage+5Vdc ±0.25V+9V to +15V+9V to +35V
Backlight On110 mA typical
Backlight Off Supply40 mA
Power Conservation35 mA
15.2Optical Characteristics
Table 72: Optical Characteristics
Pixel Layout240 x 64 pixels XxY
Number of Characters320 (maximum 40 characters x 8
Lines with 5x7 font)
Display Area127.16 x 33.88mm XxY
Dot Size0.49 x 0.49mm (XxY)
Dot Pitch0.53 x 0.53mm (XxY)
LED Backlight Life100, 000 hours typical
BacklightYellow/Green LED
Blue LED
White LED
Matrix OrbitalGLK24064-2560
Page 65
15.3Physical Layout
Figure 22: Physical Diagram
15.4Definitions
E Extended Temperature (-20C to 70C)
VPT Wide Voltage with Efficient Switching Power Supply (+9 to +35Vdc)
V Wide Voltage (+9 to +15Vdc)
GW Grey Text / White Background
WB White Text / Blue Background
MSB Most Significant Byte
LSB Least Significant Byte
15.5Contacting Matrix Orbital
Telephone
Sales and Support: 1(403)229-2737
Matrix OrbitalGLK24064-2561
Page 66
On The Web
Sales: http://www.MatrixOrbital.com
Support: http://www.MatrixOrbital.ca
Forums: http://www.lcdforums.com
Matrix OrbitalGLK24064-2562
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.