Matrix Orbital GLK24064-25 User manual

GLK24064-25
Technical Manual
Revision: 1.0

Contents
Contents ii
1 Introduction 1
1.1 What to Expect From the GLK24064-25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What Not to Expect From the GLK24064-25 . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Keypad Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 mogd.exe ............................................ 1
1.5 Trying Out the GLK24064-25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5.1 Here’s what to do: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.6 Trying out a Keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6.1 Here’s what to do: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.7 Manual Over-ride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.8 Memory Chip Lock Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Connections 5
2.1 Power .............................................. 5
2.1.1 Power Connection (4 pin header) . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 Five Volt Power Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.3 Power Connection (DB-9 Connector) . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 RS-232 Communications and DB-9 Connector Pinout . . . . . . . . . . . . . . . . 8
2.2.2 TTL Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.3 RS-232 Communication through the Power Connector . . . . . . . . . . . . . . . . 10
2.2.4 I2C Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.5 ACK .......................................... 11
2.3 General Purpose Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Displaying Text 13
3.1 General ............................................. 13
3.2 Writing Text to the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Text Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.1 Auto scroll on (254 81) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.2 Auto scroll off (254 82) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3.3 Set text insertion point (254 71 [col] [row]) . . . . . . . . . . . . . . . . . . . . . . 14
3.3.4 Set current text insertion point to top left (254 72) . . . . . . . . . . . . . . . . . . . 14
3.3.5 Set text insertion point using pixel values (254 121 [x][y]) . . . . . . . . . . . . . . 14
3.3.6 Set current font (254 49 [font ID]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.7 Set font metrics (254 50 [metrics]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Displaying Graphics 15
4.1 General ............................................. 15
4.2 Graphics Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2.1 Set drawing color (254 99 [color]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2.2 Draw line (254 108 [x1][y1][x2][y2]) . . . . . . . . . . . . . . . . . . . . . . . . . 16
Matrix Orbital GLK24064-25 ii

4.2.3 Continue line (254 101 [x][y]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2.4 Put pixel (254 112 [x][y]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2.5 Draw outline rectangle (254 114 [color][x1][y1][x2][y2]) . . . . . . . . . . . . . . . 16
4.2.6 Draw solid rectangle (254 120 [color][x1][y1][x2][y2]) . . . . . . . . . . . . . . . . 17
4.2.7 Initialize bar graph (254 103 [ref][type][x1][y1][x2][y2]) . . . . . . . . . . . . . . 17
4.2.8 Write to bar graph (254 105 [reference number][value]) . . . . . . . . . . . . . . . 17
4.2.9 Display saved bitmap (254 98 [reference number][x][y]) . . . . . . . . . . . . . . . 17
4.2.10 Direct screen write bitmap (254 100 [x1][y1][x2][y2][data]{[data]}) . . . . . . . . . 18
4.2.11 Initialize strip chart (254 106 [ref][x1][y1][x2][y2]) . . . . . . . . . . . . . . . . . . 18
4.2.12 Shift strip chart (254 107 [ref]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3 Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.1 Enter Flow Control Mode (254 58 [full][empty]) . . . . . . . . . . . . . . . . . . . 19
4.3.2 Exit Flow Control Mode (254 59) . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 Keypad Interface 20
5.1 General ............................................. 20
5.2 Connections........................................... 20
5.3 I2CInterface .......................................... 21
5.4 RS-232 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.5 Commands ........................................... 21
5.5.1 Auto repeat mode on (254 126 [mode]) . . . . . . . . . . . . . . . . . . . . . . . . 21
5.5.2 Auto repeat mode off (254 96) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.3 Auto transmit keypresses on (254 65) . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.4 Auto transmit keypresses off (254 79) . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5.5 Clear key buffer (254 69) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.5.6 Poll keypad (254 38) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.5.7 Set debounce time (254 85 [time]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Fonts and Graphics Files 23
6.1 General ............................................. 23
6.2 Using mogd.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3 Commands ........................................... 24
6.3.1 Erase file (254 173 [type] [ref]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3.2 Purge memory (254 33 89 33) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3.3 Upload Font (254 36 [ref] [file size] [file data]) . . . . . . . . . . . . . . . . . . . . 25
6.3.4 Upload Bitmap (254 94[ref] [file size] [file data]) . . . . . . . . . . . . . . . . . . . 25
6.4 Working with Font Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4.1 Font File in Table Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4.2 Uploading the File to the Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.4.3 A Sample Font File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.5 Working with Bitmap Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7 Miscellaneous Commands 29
7.1 General ............................................. 29
7.1.1 Clear display (254 88) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.2 Set contrast (254 80 [contrast]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.3 Set contrast and save (254 145 [contrast]) . . . . . . . . . . . . . . . . . . . . . . . 30
Matrix Orbital GLK24064-25 iii

7.1.4 Backlight on (254 66 [minutes]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.5 Backlight off (254 70) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.6 General purpose output on (254 86) . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.7 General purpose output off (254 87) . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.8 Set I2C address 254 51 [address]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1.9 Read module type (254 55) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1.10 Set RS-232 port speed (254 57 [speed]) . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1.11 Set Serial Number (254 52 [byte1] [byte2] . . . . . . . . . . . . . . . . . . . . . . . 32
7.1.12 Read Serial Number (254 53) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.1.13 Read Version Number 254 54) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8 Appendix: Command Summary 32
8.1 General ............................................. 32
8.2 Issuing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3 OnNumbers........................................... 33
8.3.1 ASCII Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.4 Text Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.5 Graphics Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.6 Keypad Interface Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.7 File System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.8 Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
9 Appendix: Specifications 40
Matrix Orbital GLK24064-25 iv

1 Introduction
The GLK24064-25 comes equipped with the following features;
•240 x 64 pixel graphics display
•Text display using built in or user supplied fonts
•Adjustable contrast
•Backlighting
•Keypad interface
•RS-232 or I2C communications
1.1 What to Expect From the GLK24064-25
The GLK24064-25 is designed as the display unit for an associated controller. The controller may be
anything from a single board, special purpose micro-controller to a PC, depending on the application. This
controller is responsible for what is displayed on the screen of the display
The display provides a simple command structure to allow both text and graphics to be transferred to the
screen. Text fonts and graphics, if desired, are stored in the display’s flash ROM and may be regarded as
’permanent’ in that they survive power-off periods and don’t change until explicitly reprogrammed.
The screen is backlit for low-light situations. Backlighting may be turned on or off under program
control. Contrast is adjustable to compensate for differing lighting conditions and viewing angles.
1.2 What Not to Expect From the GLK24064-25
Since the display is intended to be used with a controller, it does not have any built in text editing
functions. If a stream of ASCII characters is inputed they will be displayed, but the CR, LF, backspace, etc.,
will be ignored. If the application requires these functions, they must be provided by the software in the
controller, which can issue the appropriate positioning commands to the display.
1.3 Keypad Interface
The keypad interface takes row / column input and converts it to ASCII characters, which are delivered
out the RS-232 or I2C port to the associated controller. Note that the keypad is not used to directly control
any aspect of the operation of the display, which acts simply as a matrix to serial converter. If use of the
keypad to control the display is required, the controller must then be programmed accordingly.
1.4 mogd.exe
Matrix Orbital has developed an interface program which exercises all the features of the display. It
is also used to manage font and graphics downloads. The program, called "mogd.exe", is provided on the
Matrix Orbital Cd and website.
To install mogd.exe follow these steps;
Matrix Orbital GLK24064-25 1

1. Insert the Matrix Orbital Cd-ROM into the Cd drive.
2. Locate the file "mogd.zip". It should be in the “Download” directory.
3. Unzip mogd.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.
After installation is complete there will be a Matrix Orbital entry under “Programs” in the “Start Menu”.
Click on this entry to run mogd.exe.
The first time mogd.exe is run, some information will be required;
•The port number to be used. (Usually COM1 or COM2)
•The baud rate for the connection. (Use 19,200 for initial startup of the display)
•The type of display unit. (Set to 240 x 64 for the display)
Once this information is entered the program can be used to control all functions of the display.
1.5 Trying Out the GLK24064-25
Matrix Orbital suggests testing the display out before setting it up for any application. This is easily
done with a PC. The following will be required;
•A 5V power supply. (8 to 30 VDC for Efficient Switching Supply (VPT) models)
•A power connector. The type used for 3.5” floppy drives works fine
•A PC with a spare RS-232 port (COM1 or COM2)
•The mogd.exe program, installed as in the previous section
•A 9 or 25 conductor RS-232 serial cable. If using a 25 conductor cable, a 25 to 9 pin adapter will also
be required
The back view of the GLK24064-25 is shown below for reference.
Figure 1: Rear View of GLK24064-25
1.5.1 Here’s what to do:
1. Refer to the Figure above for the following steps.
Matrix Orbital GLK24064-25 2

2. Wire the connector to the power supply. On most connectors the RED lead will go to +5V and the
BLACK lead to GND. Do not connect the GLK24064-25 to a spare floppy drive power lead in the
PC; the wiring is not correct and the unit will be damaged.
NOTE The Manufacturer’s Warranty becomes void if the unit is subjected to over-voltage
or reversed polarity.
3. Connect the display to the PC using the serial cable and adapter if required.
4. Connect the power connector, making sure that the +5V goes to V+ as shown in the diagram. Turn on
the power: the LCD backlight should come on.
5. Use the mogd.exe program to exercise some of the features of the display to make sure everything
works properly.
6. To experiment with typing text, run a PC terminal program, such as Hyperterm. Make sure it’s con-
figured to use the correct port. Set the baud rate to 19,200.
If characters are typed on the keyboard, they should now appear on the display screen. Note that CR,
backspace etc., will not have any effect. Text will wrap around to the next line when the end of a line has
been reached.
1.6 Trying out a Keypad
Since a number of different keypad types can be connected to the display, the results may be a little
unpredictable. At this point all we need to do is make sure that the keypad and interface work, and possibly
generate an ASCII map for any programming needs.
The keypad interface on the display converts a row / column connection to an ASCII character. By
default, a keypress is transmitted as serial data immediately. Keypad buffering can be selected using the
appropriate commands.
1.6.1 Here’s what to do:
1. The PC should be running a terminal program, such as Hyperterm (as in the previous section).
2. With the display connected to the PC, plug in the keypad. If the connector has fewer pins than the one
on the display, center it as well as possible.
NOTES
•The keypad connector must be wired with columns on one side and rows on the other
side of the center of the connector. If the keypad isn’t wired this way an adapter must
be made or the connector must be rewired to meet this requirement.
•The connector is reversible. Reversing the connector will not damage the keypad or
the display, but will however, change the ASCII character map.
3. Press a key on the keypad. An upper case ASCII character (A-Y) should appear on the PC screen.
Different keys should generate different characters.
Matrix Orbital GLK24064-25 3

To experiment, reverse the connector and see if it generates a more logical set of characters. Ultimately, the
program in the micro-controller will have to ’map’ these characters to the ones marked on the keypad, which
will likely be different.
1.7 Manual Over-ride
Manual over-ride should only be required in one instance. If for some reason the module is set at a baud
rate which cannot be produced by the host system and all communication to the display is lost, then the user
should follow this simple procedure;
1. Turn off the display.
2. Put a jumper on pins 5 and 6 of the keypad connector.
3. Power up the display. The baud rate is now set to 19,200.
4. Remove the jumper and change the RS-232 port settings to the desired baud rate.
5. Turn off the display.
6. Power up the display.
Refer to the "Set RS-232 port speed" command for acceptable baud rates. This procedure does not change
settings in the memory chip, it uses default settings stored in the main processor. This allows the user to
communicate with the display when all other communications are lost. Once able to communicate with the
display, the user may then change the default settings in the memory chip.
Please note, with the manual over-ride jumper in place, the unit will receive and perform commands such
as turning on and off the backlight, but will not output text to the LCD.
1.8 Memory Chip Lock Down
The display uses a memory chip to store speed, startup screen contrast, fonts, bitmaps and I2C settings.
When everything has been changed to the desired settings and the unit is in a finished product or in the field,
locking down the memory chip so no settings can be changed becomes very useful. This is only to be done
by knowledgeable people. Any damage to the display by this procedure resulting from user error will not be
covered under the Manufacturer’s Warranty.
Figure 2: Lockdown
Matrix Orbital GLK24064-25 4

To lock down the memory chip, solder the jumper in the ’red box’ and cut the trace where the red ’X’
is. This will lock down the memory chip, preventing anything from being changed inside it until the track is
restored and the solder jumper is removed.
2 Connections
2.1 Power
WARNINGS
•Do not apply any power with reversed polarization.
•Do not apply any voltage other than the specified voltage.
•Do not use any cables other than the cables supplied by Matrix
Orbital, unless aware of the modifications required.
•Do not apply voltage to the DB-9 connector AND power connector
•Do not apply more then +5Vdc to pin #9 on the DB-9 connector.
Refer to the Figure below for this chapter.
Figure 3: Electrical Connections
Table 1: Connectors and Functions
Connector Function
10 pin header Keypad header, 5x5 matrix
4 pin Power (Vdc) and I2C communica-
tions or RS-232
DB-9F RS-232/power
2 pin header GPO header
3x2 header I2C and RS-232 select
Matrix Orbital GLK24064-25 5

Table 2: Connector Pinout
Pin 4 Ground
Pin 3 SDA (I2C data) / Rx
Pin 2 SCL (I2C clock) / Tx
Pin 1 Vdc
2.1.1 Power Connection (4 pin header)
Power is applied via pins 1 and 4.
Power requirement is;
•+5Vdc ±0.25V on standard voltage units
•+7Vdc to +30Vdc with Wide Voltage and Efficient Switching Power supply (-VPT).
Figure 4: Power Connector
2.1.2 Five Volt Power Cable
If a display module is used in a PC it becomes tempting to plug a spare power connector into the unit.
Don’t do this! Wiring for the PC power connector and that required for the module are different as shown
in the Figure below.
Figure 5: Wiring for Five Volt Modules
Matrix Orbital GLK24064-25 6

Matrix Orbital can supply an adapter cable designed to use with the display module when it’s installed
in a PC. The cable is wired as shown in the Figure below.
Figure 6: Five Volt Cable
Simply insert the splitter cable in series with a ’large’ power connector (i.e., one going to a hard drive)
and plug the small connector into the display module. The connector is ’keyed’ and will only fit one way.
NOTE The connector provided does not allow access to the middle two pins, which are
used for I2C communications. If this functionality is required, Matrix Orbital suggests
wiring a suitable connector.
2.1.3 Power Connection (DB-9 Connector)
The display can be powered via pin 9 on the DB-9 connector. No matter what voltage option the display
is +5Vdc may only be used through pin 9, as it bypasses any voltage regulator on the display. These modifi-
cations must be done. However, improper modifications will damage the display and will result in a void of
the Manufacturer’s Warranty.
For standard power displays, two modifications have to be done;
1. Remove the solder jumper from the bottom pad and solder the top one.
Figure 7: DB-9 Power Conversion
2. Solder the jumper in the ’red square’. It’s located right of the DB-9 connector, in the middle.
Matrix Orbital GLK24064-25 7

Figure 8: DB-9 Solder Jumper
WARNING For users with wide voltage units, please note; power may
only be delivered by +5Vdc through the DB-9 connector, regardless of
VPT.
Only one modification must to be done.
1. Solder the jumper in the ’red square’. It’s located right of the DB-9 connector, in the middle.
Figure 9: DB-9 Solder Jumper
2.2 Communications
2.2.1 RS-232 Communications and DB-9 Connector Pinout
A standard DB-9F is provided for RS-232 communications. Power may also be supplied via this con-
nector if desired. As well, the two middle pins of the power connector may also be used for serial commu-
nications.
Matrix Orbital GLK24064-25 8

Figure 10: RS-232 and Power Connector
The RS-232 connector on the serial cable is wired so that a standard ’straight through’ 9 pin D-sub cable
may be used to connect the modules to a standard serial port such as COM ports on PCs. Note that this
device complies with the EIA232 standard in that it uses signal levels from +/-12V to +/- 12V. It will can
also operate correctly at TTL (0 to +5V) levels. To use standard RS-232 no modifications are required. For
TTL, please see below.
Table 3: RS-232 Pinout
Pin Number Direction Description LCD Host
2 Data from LCD Data Out (LCD) Tx Rx
3 Data to LCD Data In (LCD) Rx Tx
5 - Ground gnd gnd
2.2.2 TTL Communication
Figure 11: Standard and TTL Configuration
Standard: (+/-12V to +/- 12V) Jumper 1 and 3 soldered
TTL: (0 to +5V) Jumper 2 and 4 soldered
Matrix Orbital GLK24064-25 9

This will allow TTL RS-232 levels of communication through the DB-9 connector or the power connec-
tor.
2.2.3 RS-232 Communication through the Power Connector
RS-232 communication can also be achieved through the middle two pins of the power connector.
Figure 12: Power Connector
Table 4: Connector Pinout
Pin 4 Ground
Pin 3 Rx
Pin 2 Tx
Pin 1 Vdc
To allow this, the jumpers must be set as indicated below;
Figure 13: RS-232
2.2.4 I2C Communications
The display has I2C communications running at 100 Kbps and up to 127 units can be on a single com-
munications line. The display’s I2C communication lines are the two middle pins of the power connector.
They are shared with RS-232 and have to be turned on. The I2C data line operates on 5 volt CMOS levels.
The default I2C address is 0x50.
Matrix Orbital GLK24064-25 10

Figure 14: Power Connector
Table 5: Connector Pinout
Pin 4 Ground
Pin 3 SDA (I2C data)
Pin 2 SCL (I2C clock)
Pin 1 Vdc
The display does not work on I2C by default. The modification shown below must be done;
Figure 15: I2C
2.2.5 ACK
The idea of ACK is to indicate when the data has been received correctly. ACK does not indicate data
incorrectly received. ACK simply fails to indicate when data is correctly received. Clearly, this is of limited
usefulness and even less so with Matrix Orbital modules. Matrix orbital modules are not capable of failing
to acknowledge and incorrectly received byte in response to that bytes transition. They are only capable of
failing to acknowledge the bytes following the byte, which was not received. To fully understand the reasons
for this one needs to understand something about how a Matrix Orbital module processes data. Basically the
reason why a Matrix Orbital module might fail to receive a byte correctly is that it was unable to process the
byte previous before the failed byte was transmitted. Because the module cannot possibly know that it would
be unable to store the byte before the next byte was received it cannot know to not ACK. The reason for this
situation in deference to situations one might be familiar with (i.e., memory chips, etc) is that the Matrix
Orbital module employs a micro-processor to perform these data storage functions. A memory chip takes
Matrix Orbital GLK24064-25 11

care of these things entirely within hardware subsystems which operate at the same speed as the transmission
themselves.
The display uses a standard Phillips 7bit address as defined by Phillips. However, Matrix Orbital specifies
I2C address in 8bits. The 8th bit, least significant bit (LSB or Low Order Bit) of the 8bit address is a read
/ write bit. If we take a standard Phillips 7bit address of 45hex this would be in binary 1000101. This is
7bits. Matrix Orbital would describe the Phillips I2C address of 45hex as 8Ahex. The read address would
be 8Bhex.
For more information on Phillips I2C please visit;
!"#%$!&%'()*
2.3 General Purpose Output
The general purpose output is provided to control relays or other devices via the display. This allows an
external device to be turned on or off using the controller and software commands.
The GPO is meant to be used as a pair. The positive side of the GPO is connected to a power source of
+5Vdc supplied by the module. This connection is via a 240 ohm resistor which limits the maximum current
to 20 mA. The negative side of the GPO is connected to ground.
If the device which is being driven by a GPO requires a relatively high current (such as a relay) and
has an internal resistance of its own greater than 250 ohms, then the 240 ohm resistor may be removed and
replaced with a jumper. This resistor can be located directly to the left of the positive pin of the general
purpose output.
NOTE This operation requires soldering. With the resistor removed the GPO does not
have any over current or over / under voltage protection so care must be taken when using
the GPO. For instance, if the external device is a relay it must be fully clamped (using a
diode and capacitor) to absorb any generated back electro-motive force (EMF).
Figure 16: Clamping a Relay
Matrix Orbital GLK24064-25 12

3 Displaying Text
This chapter describes the various text display commands in detail.
3.1 General
Text is displayed on the display using fonts saved in its internal flash memory. The display is supplied
with a 5x7 font installed. If this is suitable, there is no need to install any other fonts.
3.2 Writing Text to the Display
When the display receives a character, it displays that character at the position currently defined. The next
character sent to the module then advances to the following position on the display. Characters are drawn
using the currently selected font, and only characters defined in the current font are actually processed.
Characters which are not defined by the current font are ignored, and the positioning is not advanced for the
next character.
The position where text is to be displayed is a single pixel location stored in the display’s volatile memory
and maintained internally by the display’s firmware. This position is manipulated by the commands shown
in the following section.
3.3 Text Commands
In this section commands are identified by their names and decimal values.
3.3.1 Auto scroll on (254 81)
When 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 scroll position defined by the "Set font metrics" command in the
display memory (normally the bottom right character position - default value for the GLK24064-25 is 64).
3.3.2 Auto scroll off (254 82)
When auto scrolling is disabled, text will wrap to the top left corner of the display area. Existing graphics
or text in the display area are not erased before text is placed. When using proportional fonts without auto
scrolling, care should be taken to clear areas where text is being written, particularly when wrapping occurs.
This may be done using the “Draw solid rectangle” command with the colour set to white.
Matrix Orbital GLK24064-25 13

3.3.3 Set text insertion point (254 71 [col] [row])
This command sets the insertion point to the [column] and [row] specified. The insertion point is posi-
tioned 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 [column]. The pixel row used is determined by multiplying the height of the font by [row + interline
spacing].
3.3.4 Set current text insertion point to top left (254 72)
This command moves the text insertion point to the top left of the display area, based on the metrics of
the current font. Refer to the "Set font metrics" command below for more details.
3.3.5 Set text insertion point using pixel values (254 121 [x][y])
This command sets the next position for text placement to an individual pixel location. The coordinate
([x position],[y position]) defines a pixel on the screen where the top left corner of the screen is defined as
(0,0). This pixel location will be used as the top left corner of the next character of text which is sent to the
module without any regard to ’font metrics’ like character spacing or line spacing.
3.3.6 Set current font (254 49 [font ID])
This command instructs the display to use the font specified by [font identifier] as the default font. The
value specified should refer to a font already present in the display’s memory.
NOTE The font ID is established when the font is saved to the display, normally using
the mogd.exe program. The installed 5x7 font ID is 0x01, unless changed by user.
3.3.7 Set font metrics (254 50 [metrics])
Where [metrics] = [left margin][top margin][x space][y space][scroll row]
This command defines the metrics of a font already present in the display’s memory.
•[left margin] specifies the first pixel column to use for the first character in a row. In some instances,
a font may not evenly fit on the screen and dividing the extra space between the margins will improve
the overall appearance of the font.
•[top margin] specifies the top pixel row to begin drawing the first row of text on the display area.
•[x space] specifies the number of pixels to place between characters (i.e., character spacing).
•[y space] specifies the number of pixels to place between rows of text (i.e., line spacing).
•[scroll row] specifies the pixel row where scrolling should start (or, if auto scrolling is off, where
wrapping should occur). Typically, this value should be set to the first pixel row immediately below
the last row of text which will fit the display.
Matrix Orbital GLK24064-25 14

4 Displaying Graphics
This chapter describes the various graphics display commands in detail. Uploading a bitmap to position
1 will result in it being displayed on power up.
4.1 General
Since the display is a bit mapped device, it may be used to display graphics. Graphic images may be
created by means of a pixel oriented graphics program, saved as bitmaps, and loaded into the display using
the mogd.exe program. Images may be saved in the display’s memory, and displayed upon command or they
may be downloaded ’on the fly’ (inline) during display operation.
Please note that ’saved’ and ’on the fly’ graphics images are processed differently. These differences
must be taken into account when processing graphics.
1. Saved bitmaps: These use each byte (8 bits) to represent a vertical column of 8 pixels. The next byte
represents the next column to the right. If the graphic is ’taller’ than 8 pixels, the LSB of the next data
byte will be the next pixel. Orientation is top to bottom - LSB to MSB. Pixels / bits are ’packed’ - that
is, if the height of the graphic is not an even multiple of 8, the leftover bits go on the next X column
to the right, etc.
2. Inline bitmaps: These are processed horizontally, and each byte represents a horizontal row of 8 bits,
with the next byte representing the next 8 bits to the right. Orientation is left to right - MSB to LSB,
which is the opposite to the serial transmission sequence (bytes are sent LSB first).
Figure 17: Graphic Bitmaps
Each pixel in a bitmap is described by a single bit, and may only have the values ON or OFF. For
example, shades of grey are not supported.
Matrix Orbital GLK24064-25 15

4.2 Graphics Commands
In this section commands are identified by their names and decimal values.
The coordinate origin (0,0) is at the top left corner of the display. X values go from 0 to 239 (increasing
toward the right) and Y values go from 0 to 63 (increasing toward the bottom).
4.2.1 Set drawing color (254 99 [color])
This command sets the drawing color for subsequent graphic commands that do not have the drawing
color passed as a parameter. The parameter [color] is the value of the color where white 0 Hex, and black is
255 Hex.
NOTE All non-zero values will display as black.
4.2.2 Draw line (254 108 [x1][y1][x2][y2])
This 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. 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.
4.2.3 Continue line (254 101 [x][y])
This command will draw a line with the current drawing color from the last line end (x2,y2) to (x,y).
This command uses the global drawing color so the “Set drawing color” command should be used before
the first line segment if required.
4.2.4 Put pixel (254 112 [x][y])
This command will draw a pixel at (x,y) using the current drawing color. The unit processes these
requests fast enough to keep up with a steady stream at 115 kbaud, so flow control is not required.
4.2.5 Draw outline rectangle (254 114 [color][x1][y1][x2][y2])
This command draws a rectangular box in the specified color (0 = white, non-zero = black). The top left
corner is specified by (x1,y1) and the bottom right corner by (x2,y2).
Matrix Orbital GLK24064-25 16
Other manuals for GLK24064-25
2
Table of contents