GLK24064-25 User Manual GLK24064-25 rev.
Table of Contents 1. Introduction.............................................................................................................................. 4 1.1 1.2 1.3 1.4 1.5 1.6 1.7 What it Does ..................................................................................................................................... 4 What it Does Not Do ........................................................................................................................ 4 Keypad Interface.............
8.6 Keypad Interface Commands.......................................................................................................... 32 8.7 File System Commands .................................................................................................................. 33 8.8 Miscellaneous Commands .............................................................................................................. 33 9. Appendix: Specifications..............................................................
1. Introduction Your GLK24064-25 has 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 it Does The GLK24064-25 is designed as the display unit for an associated controller. The controller may be anything from a single board, special purpose microcontroller to a PC, depending on the application.
The first time you run mogd.exe you'll need to enter some information: ! ! ! The port number to be used (usually COM1 or COM2) The baud rate for the connection (use 19,200 for initial startup of the GLK24064-25) The type of display unit (set to 240 x 64 for the GLK24064-25) Once this information is entered the program can be used to control all functions of the GLK24064-25. 1.5 Trying Out your GLK24064-25 Before setting up your application you may want to try out the GLK24064-25.
1.5.1 Here's what to do: GLK24064-25 PC +5V power Figure 1-2 Connections for Testing 1. Refer to the diagram above for the following steps. 2. Wire the connector to the power supply. On most connectors the RED lead will go to +5V and the BLACK lead to GND. Important: Do not connect the GLK24064-25 to a "spare" floppy drive power lead in the PC. The wiring is not correct and the GLK24064-25 will be damaged.
The keypad interface on the GLK24064-25 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. Your PC should be running a terminal program, such as Hyperterm (as in the previous section). 2. With the GLK24064-25 connected to the PC, plug in your keypad.
2. Connections 2.1 Power Warning: ! ! ! ! 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 you are aware of the modifications required. Do not under any circumstances use an unmodified floppy drive power cable. Refer to the diagram below for this chapter. 5V jumper Figure 2-1 Electrical Connections 2.1.
+5 V GND +12 V PC wiring +5 V GND Display module wiring Figure 2-2 Wiring for 5 volt modules If you don't want to modify cable wiring yourself, 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 Figure 2-3 below. Figure 2-3 Five volt Power Cable Simply insert the splitter cable in series with a "large" power connector (e.g. one going to a hard drive) and plug the small connector into the display module.
+5 V GND +12 V PC wiring +12 V GND Display module wiring Figure 2-4 Wiring for 12 volt modules If you don't want to modify cable wiring yourself, 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 Figure 2-5 below. Figure 2-5 Twelve volt power cable Note: The connector provided does not allow access to the middle two pins, which are used for I2C communications.
2.2.2 Power via RS-232 Connector Power may be provided to the module by pin 9 of the DB9 connector instead of through the 4-pin SIP. If power is to be applied using the DB9, it must be a regulated 5Vdc supply*. Since pin 9 is used for the power source, there must be no connection for RI to the PC. The user must solder the 5 volt jumper point beside the DB9 connector (see Figure 2-1 for location). Warning: Use this method of power up at your own risk. Application of a voltage to pin 9 greater than 5.
3. Displaying Text This chapter describes the various text-display commands in detail. A quick reference summary of all text commands is found in section 8.4. 3.1 General Text is displayed on the GLK24064-25 using fonts saved in its internal flash memory. The GLK24064-25 is supplied with a 5 x 7 font installed. If this suits your needs you don't need to install any other fonts. If you prefer to install your own fonts, instructions are given in section 6.2. 3.
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.
4. Displaying Graphics This chapter describes the various graphics-display commands in detail. A quick reference summary of all graphics commands is found in section 8.5. 4.1 General Since the GLK24064-25 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 GLK2406425 using the mogd.exe program.
The coordinate origin (0,0) is at the top left corner of the display. X values go from 0 to 239 (increasing towards the right) and Y values go from 0 to 63 (increasing towards 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.
The bar graphs may be located anywhere on the display, but if they overlap, they will not display properly. Note: 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 Write to bar graph command, described below. 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.
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".
This mode must not be used during loading of fonts and bitmaps. It is highly recommended for use with direct screen write and multiple pixel placements. 4.3.2 Exit Flow Control Mode (254 59) This command turns off flow control. Bytes may overflow the buffer without warning. GLK24064-25 rev.
5. Keypad Interface This chapter describes the keypad interface and associated commands in detail. 5.1 General The GLK24064-25 keypad interface processes the keypad row/column matrix into a serial (RS-232 or I2C) data byte stream. Aside from this processing, the keypad has no effect on the GLK24064-25 display. If you need to send keystrokes to the display, they must be routed through your controller. 5.
5.3 I2C Interface The keypad is read by I²C master read. In short, this means that a read of the module will always return the first unread key press. A read is initiated by writing to the module with its base address plus 1, then clocking the module’s return byte after the module releases the SDA line. Much more detail on this basic I²C function can be found in the I²C specification by Philips. A good reference is also available at http://www.ping.be/~ping0751/i2cfaq/i2cindex.
Polls Key up Key down auto-repeat clock valid key stroke (before key up) unwanted auto-repeat after key-up. Figure 5-2 Poll timing 5.5.2 Auto repeat mode off (254 96) This command turns off auto repeat mode. 5.5.3 Auto transmit keypresses on (254 65) In this mode, all keypresses are sent immediately to the host system without the use of poll keypad command. This is the default mode on power up. 5.5.
6. Fonts and Graphics Files 6.1 General Matrix Orbital graphic modules contain a sophisticated file system for storing and retrieving font information, bitmaps and system parameters; not unlike the way that a computer deals with files on a hard drive. However, the modules use no moving parts, therefore, data is stored far more reliably than data on a home PC. Operationally, there is one important difference between the Matrix Orbital file system and that of a PC.
6.3 Commands In addition to the commands listed below, you may use the mogd.exe program to save fonts and bitmaps to the GLK24064-25's flash memory. Before issuing commands to the GLK24064-25 please read sections 8.2 and 8.3. 6.3.1 Erase file (254 173 [type] [ref]) This command erases a file within the GLK24064-25 memory. This command erases a single file at a time. This command needs to be given two parameters: [type] and [ref].
The character bitmaps are described in section 6.4.3. 6.4.1 Font File in Table Form The table below shows the layout of a font file in table form.
* If the module detects that the file will not fit in the available memory when the file size has been transmitted, it will send 0x08 instead of 0x01. In this case, the host should cease transmission. The module will return to a ready state. From this point, the module treats all data as raw and just stores it away. The module will store the data, then read it back from memory and send the read value back to the host.
Explanation of the bytes in the file: (All values below are in hex) FF FF 05 07 68 70 00 0F 05 00 14 03 00 17 04 7F 04 81 80 07 C4 3E 10 02 20 B1 07 placeholders for actual EOF font width in pixels font height in pixels first ASCII character defined last ASCII character defined offset to definition of first character (h) number of bytes in definition of first character offset to definition of second character (i) number of bytes in definition of second character offset to definition of third character (j)
7. Miscellaneous Commands The commands listed in this chapter don't readily fit in any of the other categories, or are used in more than one category. Before issuing commands to the GLK24064-25 please read sections 8.2 and 8.3. 7.1.1 Clear display (254 88) This command clears the display and resets the text write position to the top left of the screen. 7.1.
7.1.9 Read module type (254 55) This command will return, over the RS-232 interface, the model type value of the module.
8. Appendix: Command Summary 8.1 General The operation of the GLK24064-25 is controlled by a simple and consistent command set. Commands control ! ! ! ! ! text display graphics display keypad interface the GLK24064-25 file system miscellaneous operating parameters This chapter includes summary tables of all commands. Individual commands are discussed in detail in Chapters 3 to 7. 8.2 Issuing Commands Commands are issued to the GLK24064-25 by the controller.
Based on the table, the byte 01001011 can be represented in hex as 4B, which is usually written as any of 4Bh, 4BH, 4B hex or 0x4B. The numbers can also be expressed in decimal form if preferred. 8.3.1 ASCII Characters Since computers deal internally with numbers only, but externally with both letters and numbers, several schemes were developed to "map" written characters to numeric values. One such scheme has become universal, the American Standard Code for Information Interchange, or ASCII.
Command Syntax Default Notes Set text insertion point using pixel values FE 79 [x][y] 254 121 [x][y] 254 'y' [x][y] n/a Sets text insertion point to position (x,y), where x and y are in pixels. Value is top left corner of next text character. Set current font FE 31 [font id] 254 49 254 '1' n/a Sets font to [font id]. Font must be in memory. Set font metrics FE 32 [metrics] 254 50 [metrics] 254 '2' [metrics] n/a For definition of [metrics] see section 3.3.7. 8.
Command Syntax Notes Direct screen write bitmap FE 64 [x1][y1][x2][y2][data]{[data]} 254 100 [x1][y1][x2][y2][data]{[data]} 254 'd' [x1][y1][x2][y2][data]{[data]} Sends bitmap from host/controller to the GLK2406425. x1 and x2 must lie on byte boundaries. See section 4.2.10. Initialize strip chart FE 6A [ref][x1][y1][x2][y2] 254 106 [ref][x1][y1][x2][y2] 254 'j' [ref][x1][y1][x2][y2] [ref] is a reference number from 0 – 6, allowing 7 strip charts to be defined.
8.7 File System Commands In addition to these commands, the mogd.exe program (see section 1.4) is used to download fonts and graphics to the GLK24064-25. Table 8-4 File System Commands Command Syntax Default Notes Erase file FE B0 [type] [ref] 254 173 [type] [ref] n/a Erases file in memory. Type = 0x01 is font, type = 0x05 is bitmap. [ref] is reference number. Purge memory FE 21 59 21 254 33 89 33 n/a Removes all fonts, font metrics, bitmaps and settings from memory.
Command Syntax Default Notes Set I C address FE 33 [address] 254 51 [address] 254 '3' [address] 0x50 Value is write address and must be even, read address is 1 higher. Read module type FE 37 254 55 254 '7' see table Reads the module type. See table in section 7.1.9. Set RS232 port speed FE 39 [speed] 254 57 [speed] 254 '9' [speed] 19,200 baud Sets RS232 speed. See table in section 7.1.10 for values of [speed].
9. Appendix: Specifications Environmental Specifications Standard Temperature Extended Temperature Operating Temperature 0°C to +50°C -20°C to +70°C Storage Temperature -20°C to +70°C -30°C to +80°C Operating Relative Humidity 90% max noncondensing 90% max non-condensing Vibration (Operating) 4.9 m/s² XYZ directions Vibration (Non-Operating) 19.6 m/s² XYZ directions Shock (Operating) 29.
Figure 9-1 Physical Layout 9.1 Options Options Available on Standard Product Line Extended Temperature E Wide Voltage V Wide Voltage with Efficient Switching Power Supply VPT Blue Electroluminescent Backlight EL Cold Cathode Fluorescent Lamp Backlight (CCFL) FL Model LCD0821 LCD2021 LCD2041 LCD4021 LCD4041 LK162-12 GLK24064-25 rev.
Model E V LK204-25 " " " " LK204-25-PC N/A GLC24064 " " " " " " " " " " " " GLK12232-25 LK202-25 LK402-12 LK404-55 LK404-AT VPT EL FL N/A N/A N/A " N/A N/A N/A N/A N/A N/A " " " " N/A N/A N/A N/A " " " " " " " " " " N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A " N/A N/A N/A N/A N/A N/A N/A N/A N/A " " N/A N/A N/A N/A N/A N/A GLK12864-25 N/A N/A N/A N/A N/A GLK128128-25 N/A N/A N/A N/A N/A GLK24064-25 " N/
10. Appendix: Glossary ASCII American Standard Code for Information Interchange. A 7 bit binary code representing the english alphabet, decimal numbers and common punctuation marks. "Also includes control characters" such as carriage return or end of text. An 8 bit superset of the standard ASCII codes is often used today to include foreign characters and other symbols. These supersets are often called extended ASCII character sets.
LCD Liquid Crystal Display Module Type Value This refers to the model number of the module. Pixel The smallest individually controllable element of a display. Pre-Generated Fonts Pre-determined fonts which can be downloaded into graphic liquid crystal displays. Primitive A low-level object or operation from which higher-level, more complex objects and operations can be constructed.
11. List of Distributors United States (continued) North America Canada HVW Technologies Suite 473, 300 - 8120 Beddington Blvd. NW Calgary, Alberta, Canada T3K 2A8 Telephone: +1 403 730 8603 Facsimile: +1 403 730 8903 Email: info@hvwtech.com BiPOM Electronics Inc 11246 South Post Oak #205 Houston, Texas, USA, 77035 Telephone: +1 713 661 4214 Facsimile: +1 713 661 4201 General Information: info@bipom.com Technical Support: tech@bipom.com Sales: sales@bipom.com Tri-M Systems Inc.
Europe (continued) Switzerland Germany Bernhard Elektronik Aarauer Str. 20, CH-5734 Reinach AG Telephone : +41 0 62 7716944 Facsimile : +41 0 62 7716944 Email : schweiz@elektronikladen.de Elektronikladen Mikrocomputer Gmbh Offices throughout Germany Head Office: Wilhelm - Mellies - STR. 88, D - 32758, Detmold Telephone: +49 0 5232 8171 Facsimile : +49 0 5232 86197 Email: sales@elektronikladen.de Middle East Israel Italy Alpha Terminals & Printers Ltd. 7 Ha'Mifalm St.