GLK12232-25-SM User Manual 1
Table of Contents 1. Introduction.............................................................................................................................. 4 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 What it Does ..................................................................................................................................... 4 What it Does Not Do ........................................................................................................................ 4 Keypad Interface.........
8.6 File System Commands .................................................................................................................. 34 8.7 Miscellaneous Commands .............................................................................................................. 34 9. Appendix: Specifications...................................................................................................... 36 10. Appendix: Glossary .......................................................................
1. Introduction Your GLK12232-25-SM has the following features: • • • • • • 122 x 32 pixel graphics display text display using built-in or user-supplied fonts adjustable contrast backlighting keypad interface RS-232 or I2C communications This manual describes the basic use and overview of the GLK12232-25-SM. It also describes advanced functions, which may require soldering. We do expect you to be proficient with a soldering iron before attempting to modify the unit.
1. 2. 3. 4. 5. Insert the Matrix Orbital CD-ROM into your CD drive. Locate the file "mogd.zip" (should be in the Download directory). Unzip mogd.zip to a temporary directory, using a program such as Winzip, Pkzip, etc. Double click on "setup.exe". Follow the instructions on the screen to complete the installation. After installation is complete there will be a Matrix Orbital entry under Programs in your Start Menu. Click on this entry to run mogd.exe. The first time you run mogd.
GLK12232-25 PC +5V power Figure 1-1 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. Note: The manufacturer's warranty is void if the unit is subjected to overvoltage or reversed polarity. 3. Connect the GLK12232-25-SM to the PC using the serial cable and adapter if required. 4.
The keypad interface on the GLK12232-25-SM 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.7.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 GLK12232-25-SM connected to the PC, plug in your keypad.
2. Connections 2.1 Connector Pinout Refer to the diagram below for this chapter.
2.1.1 Power Connections Power is applied to one of the two headers, depending on what style you may require. Power requirement is +5 VDC ±0.25V. Two connections are provided for convenience depending on the type of connector installed. 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.
Standard RS232 and TTL configuration Standard TTL 2.1.3 I²C Communications TheGLK12232-25-Sm I2C communications running at 100 kBps and up to 127 units on a single communications line. The I2C data line operates on 5 volts CMOS levels. The GLK12232-25-SM does not work on I2C by default, three modifications have to be done, as shown in the picture.
Now the unit will be able to communicate over I2C. It uses the same pins as RS232. 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 an incorrectly received byte in response to that bytes transition.
+5V gnd G2 load load G1 GND GND Note: load must be 250 ohms minimum Figure 2-2 Using the General Purpose Outputs If the device which is being driven by a GPO requires a relatively high current (such as a relay) it must have an internal resistance greater than 250 ohms, or must be current limited to 20 mA by means of a suitable resistor. Note: The GPOs do not have any over current or over/under voltage protection so care must be taken when using them.
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.3. 3.1 General Text is displayed on the GLK12232-25-SM using fonts saved in its internal flash memory. The GLK1223225-SM 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.
spacing] (see Set font metrics, below). If precise pixel-based text positioning is required, see "Set text insertion point – pixel values", below. 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.
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.4. 4.1 General Since the GLK12232-25-SM 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 GLK12232-25-SM 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 121 (increasing towards the right) and Y values go from 0 to 31 (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.
4.3.2 Exit Flow Control Mode (254 59) This command turns off flow control. Bytes may overflow the buffer without warning.
5. Keypad Interface This chapter describes the keypad interface and associated commands in detail. 5.1 General The GLK12232-25-SM 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 GLK12232-25-SM display. If you need to send keystrokes to the display, they must be routed through your controller. 5.
Rows 1 2 3 4 5 1 A F K P U Columns 2 3 B C G H L M Q R V W 4 D I N S X 5 E J O T Y Note: The keypad connector must be wired with columns on one side and rows on the other side of the center of the connector. If your keypad isn't wired this way you will need to make an adapter or rewire the connector to meet this requirement. 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.
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. For example, the key code associated with key 'P' (0x50) is pressed, the release code is 'p' (0x70). In RS-232 polled mode (see 5.5.
5.5.7 Set debounce time (254 85 [time]) [time] is in increments of 6554 microseconds. This command sets the time between key press and key read. All key types with the exception of latched piezo switches will “bounce” for a varying time, depending on their physical characteristics. The default debounce time for the module is about 52 mS, which is adequate for most membrane keypads. This time equates to a setting of 8 using this command as there is a debounce time resolution of 6554 microseconds.
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.
[type] = 1 is a font file [type] = 5 is a bitmap Once this command is completed all files “move up” and recover the empty space for efficient memory management. 6.3.2 Purge memory (254 33 89 33) This command completely erases the GLK12232-25-SM's non-volatile memory. This 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. This is to prevent accidental execution. 6.3.
O-Low O-High Data Data Data Data Data Data Data Data Data Data Width O-Low Data Data Data Data Data Data Data Data Data Data O-High Width Data Data Data Data Data Data Data Data Data Data O-Low Data Data Data Data Data Data Data Data Data Data Data Width Data Data Data Data Data Data Data Data Data Data Data O-High Data Data Data Data Data Data Data Data Data Data O-Low Data Data Data Data Data Data Data Data Data Data Width Data Data Data Data Data Data Data Data Data Data 6.4.
6.4.3 A Sample Font File Let's look at a short sample font file containing only the letters "h", "i" and "j". First we need to define the font size. For this example we'll use a 5 x 7 pixel font. Next, we have to draw the bitmaps for each of the characters. We'll use the examples shown in Figure 6-1. Figure 6-1 Bitmaps for h, i and j Now the bitmaps have to be converted to bytes. If the font is 8 bits high, this is a pretty simple job because each vertical column is simply one byte (lsb at the top).
70 00 0F 05 00 14 03 00 17 04 7F 04 81 80 07 C4 3E 10 02 20 B1 07 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) number of bytes in definition of third character definition of first character definition of second character definition of third character 6.
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. 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.2 Set contrast (254 80 [contrast]) This command sets the display's contrast to [contrast], where [contrast] is a value between 0x00 and 0xFF (between 0 and 255).
7.1.9 Read module type (254 55) This command will return, over the RS-232 interface, the model type value of the module. Value will be 1byte hex.
7.1.13 Read Version Number 254 54) This command will return the firmware version number of the GLK12232-25-SM. It will be a 1-byte hex value.
8. Appendix: Command Summary 8.1 General The operation of the GLK12232-25-SM is controlled by a simple and consistent command set. Commands control text display graphics display keypad interface the GLK12232-25-SM 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 GLK12232-25-SM by the controller.
Command Syntax Default Notes Set text insertion point FE 47 [col] [row] 254 71 [col] [row] 254 'G' [col] [row] n/a Sets text insertion point using the base size of the current font Set text insertion point to top left FE 48 254 72 254 'H' 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.
Command Syntax Notes Write to bar graph FE 69 [ref][value] 254 105 [ref][value] 254 'i' [ref][value] Fills the bar graph referred to as [ref] from start to [value]. [value] is in pixels. Display saved bitmap FE 62 [ref][x][y] 254 98 [ref][x][y] 254 'b' [ref][x][y] Causes bitmap [ref] to be displayed with its top left corner starting at position (x,y). 8.
8.6 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 GLK12232-25-SM. Table 8-4 File System Commands Command Syntax Default Notes Erase file FE B0 [type] [ref] 254 45 [type] [ref] n/a Erases file in memory. Type = 1 is font, type = 5 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.
FE 57 [gpo #] 254 87 [gpo #] 254 'W' [gpo #] off Turns a general purpose output ON. [gpo #] is 1 for G1 or 2 for G2. See section 2.2 for further details. 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. Returns a 1-byte hex value.
9. Appendix: Specifications Environmental Specifications Standard Temperature Operating Temperature 0°C to +50°C Storage Temperature -20°C to +70°C Operating Relative Humidity 90% max non-condensing Vibration (Operating) 4.9 m/s² XYZ directions Vibration (Non-Operating) 19.6 m/s² XYZ directions Shock (Operating) 29.4 m/s² XYZ directions Shock (Non-Operating) 490 m/s² XYZ directions Electrical Specifications Supply Voltage 4.75 - 5.
Figure 9-1 Physical Layout 37
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 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 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 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.