LK162-12 User Manual LK162-12 rev 4 1
Table of Contents 1. Introduction.............................................................................................................................. 4 1.1 1.2 1.3 1.4 1.5 1.6 What it Does ..................................................................................................................................... 4 What it Does Not Do ........................................................................................................................ 4 Keypad Interface.................
8. Appendix: Specifications and Options................................................................................ 32 8.1 Specifications.................................................................................................................................. 32 8.2 Options ........................................................................................................................................... 33 9. Appendix: Glossary.............................................................
1. Introduction Your LK162-12 has the following features: 16 column by 2 line text display built-in font with provision for up to 8 user-defined characters Speeds from 1200 bps to a lighting fast 19.
A 5 V power supply. a PC with a spare RS-232 port (COM1 or COM2). A 9 or 25 pin RS-232 serial cable. If you use a 25 conductor cable you'll also need a 9 to 25 pin adapter. Figure 1-1 Connections for Testing 1. Refer to the diagram above and Figure 2-1 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. See Section 2.1.1 for details.
BS 0x08 Moves the cursor one position to the left and clears that position. Note: These command characters are not guaranteed to work on other Matrix Orbital display modules. If you want your code to be portable, use the appropriate commands listed later in the manual instead. If you want to exercise some of the other features of the LK162-12 you'll need to write a program (in any convenient language such as Basic or C) to issue the required command strings.
1.7 Manual Override Manual override 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. 2. 3. 4. 5. 6. Turn off the display Put a jumper on pins 3 and 4 of the keypad connector (R3 and C1). Power up the display. The baud rate is now set to 19,200.
2. Connections 2.1 Connector Pinout Refer to the diagram below for this chapter. Figure 2-1 Electrical Connections The LK162-12 has four connectors: Connector Function 14 pin dual header 4 pin DB-9F General purpose outputs or Keypad (2x7) (see section 2.2) power (Vdc) and I2C communications (see section 2.1.1) RS-232/power (see section 2.1.1.1) 2.1.1 Power and I2C Connections Power is applied via pins 1 and 4 as shown in Figure 2-1. Power requirement is +5 VDC ±0.25V.
Pin 1 Pin 2 Pin 3 Pin 4 +5.0 VDC (+7 to +15 VDC with wide voltage option) SCL (I2C clock) SDA (I2C data) Ground 2.1.1.1 Five Volt Modules If the LK162-12 is used in a PC it is 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 LK162-12 are different as shown in Figure 2-3 below.
+5 V GND +12 V +12 V GND PC wiring Display module wiring Figure 2-5 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-6 below. Figure 2-6 Twelve volt power cable 2.1.2 Power through the DB-9 Connector The LK162-12 can be powered by pin #9 on the DB-9 connector.
2.1.3 RS-232 Communications A standard DB-9F is provided for RS-232 communications. Power may also be supplied via this connector if desired. See Figure 2-7 for pin connections. Figure 2-7 RS-232 and power connector The RS-232 connector on the PC cable is wired so that a standard “straight through” 9 pin D-sub cable may be used to connect the module 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 ± 3V to ± 12V.
For more information on Phillips I2C please visit… http://www.ping.be/~ping0751/i2cfaq/i2cindex.htm 2.2 General Purpose Outputs The LK162-12 has seven general purpose outputs. These are provided to control relays or other electronic devices. This allows external devices to be turned on or off using your PC or controller and software commands. (See sections 6.1.7 and 6.1.8 for the command syntax.) Each output is wired as shown in Figure 2-8.
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 7.4. 3.1 General Text is displayed on the LK162-12 using the built-in 5 x 7 dot matrix font (plus up to 8 user-defined characters. 3.2 The Built-In Character Font The LK162-12 includes a built-in 5 x 7 dot matrix font with the full range of ASCII characters plus a variety of extended characters, as shown in Figure 3-1.
In addition to the built-in characters, users may define up to 8 special characters (which, once defined, occupy positions 0x00 to 0x07 in the above chart). The LK162-12 does not have provision to download other fonts. 3.3 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.
3.4.8 Turn off underline cursor (254 75) Turns off the underline cursor. Does not affect the blinking block cursor. 3.4.9 Turn on block (blinking) cursor (254 83) Turns on the blinking block cursor. The cursor shows the current text insertion point. Both blinking and underline cursors may be turned on or off independently. The cursor is off by default. 3.4.10 Turn off block (blinking) cursor (254 84) Turns off the blinking block cursor. Does not affect the underline cursor. 3.4.
4. Keypad Interface This chapter describes the keypad interface and associated commands in detail. 4.1 General The LK162-12 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 LK162-12 display. If you need to send keystrokes to the display, they must be routed through your controller.
Columns 1 2 3 4 1 ‘A’ 41 Hex ‘F’ 46 Hex ‘K’ 4B Hex ‘P’ 50 Hex 2 ‘B’ 42 Hex ‘G’ 47 Hex ‘L’ 4C Hex ‘Q’ 51 Hex 3 ‘C’ 43 Hex ‘H’ 48 Hex ‘M’ 4D Hex ‘R’ 52 Hex Rows 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. 4.3 I2C Interface The keypad is read by I²C master read.
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 I²C interface. 2. Key down / Key up codes: This mode may be used when the typematic parameters 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.
unbuffered keypresses which may have not been read already. If there is more than one keypress buffered, then the high order bit (MSB) of this returned keycode will be set (1). If this is the only buffered keypress, then the MSB will be reset (0). If there are no buffered keypresses, then the returned code will be 0x00. Please note to make use of this command the “Auto Transmit Keypress” mode should be off. 4.5.7 Set debounce time (254 85 [time]) [time] is in increments of 6.554 milliseconds.
5. Bar Graphs and Special Characters The LK162-12 includes the ability to draw bar graphs (either horizontal or vertical) and allows users to define up to eight special characters. Before issuing commands to the LK162-12 please read sections 7.2 and 7.3. Eight characters (ASCII values 0x00 to 0x07) are set aside for use with bar graphs, user defined characters, and big numbers. Since the same 8 characters are used for each function, the functions may not be used simultaneously.
Custom characters occupy a 5 x 8 pixel matrix. Built-in characters are 5 x 7: the bottom row of pixels is normally reserved for the underline cursor. The underline cursor should be turned off if the bottom row of pixels forms part of a custom character. The characters are defined by issuing the command 254 78 [c] followed by 8 bytes to define the character. [c] is the character number (0x00 to 0x07).
6. 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 LK162-12 please read sections 7.2 and 7.3. Some commands, marked with an (R), may be "remembered" to set new defaults that will be in effect each time the unit is powered on. See section 6.1.1 for further information. 6.1 Command List 6.1.
6.1.7 General purpose output off (254 86 [gpo #]) This command turns OFF any of the General Purpose Outputs (see section 2.2 for a description of the GPOs). [gpo #] is 1 to 7. Note that OFF means that the output floats. 6.1.8 General purpose output on (254 87 [gpo #]) This command turns ON any of the General Purpose Outputs. [gpo #] is 1 to 7. ON means that the output is pulled low (ground via 240 ohms). 6.1.9 Set I2C address 254 51 [address]) This command sets the I²C write address of the module.
6.1.10 Read module type (254 55) This command will return, over the RS-232 interface, the model type value of the module.
6.2 Flow Control The LK162-12 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 (see Table 7-4 and the next two sections). If flow control is enabled, the LK162-12 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. 6.2.
7. Appendix: Command Summary 7.1 General The operation of the LK162-12 is controlled by a simple and consistent command set. Commands control text display graphics display keypad interface miscellaneous operating parameters This chapter includes summary tables of all commands. Individual commands are discussed in detail in Chapters 3 to 5 in the same sequence as in the following tables. 7.2 Issuing Commands Commands are issued to the LK162-12 by the controller.
0110 6 6 1110 E 14 0111 7 7 1111 F 15 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. 7.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.
Auto scroll off FE 52 254 82 254 'R' off Disables auto scroll. Text will wrap to top left and overwrite existing text. Set cursor position FE 47 [col] [row] 254 71 [col] [row] 254 'G' [col] [row] n/a Moves cursor to the specified column and row. The cursor marks the text insertion point in this and all commands.
Auto transmit key presses off FE 4F 254 79 254 'O' off Up to 10 key presses buffered until polled. Clear key buffer FE 45 254 69 254 'E' n/a Clear unread key presses. Poll keypad FE 26 254 38 254 '&' n/a Returns buffered key presses to application. Returns 0x00 if no key presses. High order bit set unless this is the last/only key press. Set debounce time FE 55 [time] 254 85 [time] 254 'U' [time] 52 ms Resolution: 1 = 0.6554 ms [time] is a numeric multiplier. 7.
7.7 Miscellaneous Commands Table 7-4 Miscellaneous Commands Command Syntax Default Notes Clear display FE 58 254 88 254 'X' n/a Clears screen of text and graphics, places text cursor at top left. Set contrast FE 50 [contrast] 254 80 [contrast] 254 'P' [contrast] 0x80 128 Sets display contrast. Compensates for viewing angle. Contrast is a value between 0 and 255 (hex 0 to FF). Larger = darker.
Set Serial Number FE 34 [byte1][byte2] 254 52 [byte1][byte2] 254 '4' [byte1][byte2] This is a one-time-use command which works only on units without factory set serial numbers. Read Serial Number FE 35 254 53 254 '5' Reads the two byte serial number of the module. Read Version Number FE 36 254 54 254 '6' Reads the firmware version number of the module.
8. Appendix: Specifications and Options 8.1 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 -40°C to +85°C Operating Relative Humidity 90% max non-condensing 90% max non-condensing Electrical Specifications Supply Voltage 4.75 - 5.
Figure 8-1 Physical Layout 8.
9. 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.
10. 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.