LK202-25 User Manual LK202-25 rev 3 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................
5. Bar Graphs and Special Characters.............................................................................. 19 5.1 Command List....................................................................................................................................... 19 5.1.1 Initialize wide vertical bar graph (254 118) ............................................................................ 19 5.1.2 Initialize narrow vertical bar graph (154 115)........................................................
1. Introduction Your LK202-25 has the following features: § § § § § § § § § § § § § § § 20 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 power cable with a 4 pin connector (same connector as used to connect 3.5 inch floppy drive). Do not connect the LK202-25 to an unmodified spare power connector in a PC. To modify such a cable see section 2.1.1. 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. LK202-25 PC +5V power RS-232 cable Figure 1-1 Connections for Testing 1.
Character Hex value Function CR 0x0D Moves cursor to beginning of the current line. LF 0x0A Moves cursor to the beginning of the next (or previous) line. FF 0x0C Clears the display and puts the cursor at the top left 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.
1.7 To Reset the module 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 5 and 6 of the keypad connector (C5 and R1). 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. 1 2 3 4 5 6 Ge neral Purpose Outputs RS -232 +5 Powe r connecto r Key pad Connector gnd pin 5 pin 1 pin 1 Figure 2-1 Electrical Connections The LK202-25 has four connectors: Connector Function 14 pin dual header 4 pin 10 pin header DB-9F General purpose outputs (6) (see section 2.2) power (5.0 VDC) and I2C communications (see section 2.1.1) Keypad (see section 3.4.12) RS-232/power (see section 2.1.1.1) 2.1.
2.1.1.1 Five Volt Modules If the LK202-25 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 LK202-25 are different as shown in Figure 2-3 below.
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 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.
Each output is wired as shown in Figure 2-8. The + terminal is connected directly to the module positive supply, the – terminal is connected through a 240 ohm current limiting resistor and the electronic switch to ground. - + G PO 1 G PO 2 G PO 3 G PO 4 G PO 5 G PO 6 Pow e r + 5 VDC - + load 240 ohm current limiting resistor Figure 2-8 General Purpose Outputs Maximum allowable current is 20 mA, which is enforced by the current limiting resistor.
G PO - + 1N400 1 10 - 100 uF Relay coil Figure 2-10 Clamping a Relay LK202-25 rev 3 12
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 LK202-25 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 LK202-25 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 LK202-25 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.7 Turn on underline cursor (254 74) (R) Turns on the underline cursor. The cursor shows the current text insertion point. Both underline and blinking cursors may be turned on or off independently. The cursor is off by default. 3.4.8 Turn off underline cursor (254 75) (R) Turns off the underline cursor. Does not affect the blinking block cursor. 3.4.9 Turn on block (blinking) cursor (254 83) (R) Turns on the blinking block cursor. The cursor shows the current text insertion point.
4. Keypad Interface This chapter describes the keypad interface and associated commands in detail. 4.1 General The LK202-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 LK202-25 display. If you need to send keystrokes to the display, they must be routed through your controller. 4.
4.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 4-2 Poll timing 4.5.2 Auto repeat mode off (254 96) (R) This command turns off auto repeat mode. 4.5.3 Auto transmit keypresses on (254 65) (R) In this mode, all keypresses are sent immediately to the host system without the use of the poll keypad command. This is the default mode on power up. 4.5.
5. Bar Graphs and Special Characters The LK202-25 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 LK202-25 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 LK202-25 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.5 Backlight on (254 66 [minutes]) (R) This command turns on the backlight for a time of [minutes] minutes. If [minutes] is zero (0), the backlight will remain on indefinitely. Note: the factory default for backlight is on. 6.1.6 Backlight off (254 70) (R) This command turns the backlight of the LK202-25 off. 6.1.7 Load startup screen (254 64 [40 characters]) This command sets and memorizes the startup screen that will appear each time the LK202-25 is turned on.
6.1.11 Read module type (254 55) This command will return, over the RS-232 interface, the model type value of the module.
6.1.15 Read Version Number 254 54) This command will return the firmware version number of the LK202-25. 6.2 Flow Control The LK202-25 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).
7. Appendix: Command Summary 7.1 General The operation of the LK202-25 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 LK202-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. 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. One such scheme has become universal, the American Standard Code for Information Interchange, or ASCII.
Command Syntax Default Notes Send cursor home FE 48 254 72 254 'H' Underline cursor on FE 4A 254 74 254 'J' off R Turns on the underline cursor. Underline cursor off FE 4B 254 75 254 'K' R Turns off the underline cursor. Block cursor on FE 53 254 83 254 'S' on R Turns on the blinking block cursor. Block cursor off FE 54 254 84 254 'T' R Turns off the blinking block cursor. Cursor left FE 4C 254 76 254 'L' Moves the cursor one position to the left.
Command Syntax Default Notes 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 R Resolution: 1 = 0.6554 ms [time] is a numeric multiplier. 7.6 Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters.
7.7 Miscellaneous Commands Note: The letter "R" in the Default column indicates that this state can be saved to nonvolatile memory with the Remember command. See section 6.1.1. Table 7-4 Miscellaneous Commands Command Syntax Default Notes Remember FE 93 [0|1] 254 147 off Turns the "remember" function on [1] or off [0]. Clear display FE 58 254 88 254 'X' n/a Clears screen of text and graphics, places text cursor at top left.
Command Syntax Read Version Number FE 36 254 54 254 '6' Enter flow control mode FE 3A [full] [empty] 254 58 [full] [empty] 254 ':' [full] [empty] Exit flow control mode FE 3B 254 59 254 ';' LK202-25 rev 3 Default Notes Reads the firmware version number of the module. off Sets "full" and "empty" marks for the 80 byte display buffer. When buffer reaches [full] display will return 0xFE to host. When buffer reaches [empty] display will return 0xFF. Turns off flow control.
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 Pre-determined fonts which can be downloaded into graphic liquid crystal Fonts displays. Primitive A low-level object or operation from which higher-level, more complex objects and operations can be constructed.
10. List of Distributors North America United States (continued) 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.
LK202-25 rev 3 37