LK202-24-USB User Manual LK202-24-USB rev 1 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.2 Options ........................................................................................................................................... 33 9. Appendix: Glossary............................................................................................................... 34 Revisions Version 1.
1. Introduction Your LK202-24-USB 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.
USB Drivers (located on our website and the eCD) Test software, such as Alpha Demo or Display Tuner Figure 1-1 Connections for Testing 1. Refer to the diagram above and Figure 2-1 for the following steps. 2. Connect the USB cable to the LCD and to the computer. 3. Install the necessary drivers. (located on the eCD or in our download section) 1. Download or copy files into a directory 2. Uncompress the files, they will be a self extracting ZIP file. 3.
1.6 Trying out a Keypad Since a number of different keypad types can be connected to the LK202-24-USB, the results you get may be a little unpredictable. At this point all we need to do is make sure that your keypad and interface work, and possibly generate an ASCII map for your programming needs. The keypad interface on the LK202-24-USB converts a row/column connection to an ASCII character. By default, a keypress is transmitted as serial data immediately.
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 that 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. 7. Download the “Display tuner” application from www.matrixorbital.com/downloads. Turn off the display Put a jumper on pins 6 and 7 of the keypad connector Power up the display. The baud rate is now set to 19,200.
1.8 Memory Chip Lock Down The LK202-24-USB uses a memory chip to store speed, startup screen, contrast and backlight brightness. When everything has been changed to the wanted settings and the unit will be in a finished product or in the field, locking down the memory chip so no settings can be changed might be desirable. This is only to be done by knowledgeable people. Any damage to the display by this procedure resulting from user error will no be covered under warrantee.
2. Connections 2.1 Connector Pinout Refer to the diagram below for this chapter. Figure 2-1 Electrical Connections Connector Function 14 pin dual header General purpose outputs (6) (see section 2.2) and +5V Output Rx/Tx Receive and Transmit LED outputs 10 pin header Keypad (see section 2.6.12) USB Communication/power (see section 0) Alt. USB Alternate USB / power header 4 pin White header Optional High power GPO power input 2.1.
Warning: When using the Alternate USB Header, verify all the cable pin outs before applying power. Incorrect power application may damage the display. Make sure the host is capable of supplying all the necessary power. Add the LCD power requirement and the GPO power if used for a total power requirement. The LK202-24-USB has a secondary power connector used for High Power GPOs. Only if you are planning on using GPO 4, GPO 5 and GPO 6 as 12V should you plug in a unmodified 3.5” floppy power cable.
2.1.3 Alternate USB Communications Pin Number Description 1 +5V 2 D- 3 D+ 4 Not Used 5 Ground Please verify the pin out with your motherboard manual. 2.2 General Purpose Outputs The LK202-24-USB has six 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 5.1.10 and 5.1.11 for the command syntax.
Figure 2-3 General Purpose Outputs GPO 1, GPO 2, GPO 3 Maximum allowable current is 20mA, which is enforced by a 240ohm current limiting resistor. If the device being switched has a resistance of 240 ohms or more the corresponding resistor may be shorted. Solder a small jumper wire (wirewrap wire is good) from the feed through hole to the corresponding negative pin for the GPO in question. Note: The GPOs do not have any over current or over/under voltage protection so care must be taken when using them.
GPO 4, GPO 5 and GPO 6 The LK204-22-USB has three high current general purpose outputs. These are provided to control both electromechanical and electronic devices. This allows external devices to be turned on or off using your PC or controller and software commands. (See sections 5.1.10 and 5.1.11 for the command syntax.) Each output is wired as shown in Figure 2-3. MOSFET electronic switches can connect any of the 3 GPO header pins to ground.
2.4 The Built-In Character Font The LK202-24-USB 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 2-5. Figure 2-5 Character Set 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-24-USB does not have provision to download other fonts. 2.
The position where text is to be inserted is a character location stored in the LK202-24-USB's volatile memory and maintained internally by the LK202-24-USB's firmware. This position is manipulated by the commands shown in the following section. 2.6 Text Commands In this section commands are identified by their names and decimal values. Hex and ASCII equivalents are given in the summary (Table 6-1). Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.3.
2.6.10 Turn off block (blinking) cursor (254 84) (R) Turns off the blinking block cursor. Does not affect the underline cursor. 2.6.11 Cursor left (254 76) Moves the cursor one position to the left but does not erase any character that may be in that position. Note that this command moves the text insertion point even if the cursor is turned off.
3. Keypad Interface This chapter describes the keypad interface and associated commands in detail. 3.1 General The LK202-24-USB keypad interface processes the keypad row/column matrix into a serial data byte stream. Aside from this processing, the keypad has no effect on the LK202-24-USB display. If you need to send keystrokes to the display, they must be routed through your controller. 3.
3.3 USB Interface By default on any press of a key, the module will immediately send out the key code at the selected baud rate. This behavior can be modified using commands found in the next section. 3.4 Keypad Commands Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.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 5.1.1 for further information. 3.4.
3.4.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. 3.4.4 Auto transmit keypresses off (254 79) (R) In this mode, up to 10 keypresses are buffered until the unit is polled by the host system via the poll keypad command. Issuing this command places the unit in polled mode. 3.4.5 Clear key buffer (254 69) This command clears any unread keypresses.
4. Bar Graphs and Special Characters The LK202-24-USB 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-24-USB please read sections 6.2 and 6.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).
5. 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-24-USB please read sections 6.2 and 6.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. 5.1 Command List 5.1.
5.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. 5.1.6 Backlight off (254 70) (R) This command turns the backlight of the LK202-24-USB off. 5.1.7 Set backlight brightness (254 153 [brightness]) This command sets the display's brightness to [brightness], where [brightness] is a value between 0x00 and 0xFF (between 0 and 255).
5.1.12 Read module type (254 55) This command will return, the model type value of the module.
5.1.16 Read Version Number 254 54) This command will return the firmware version number of the LK202-24-USB. It will be a one-byte hex value.
6. Appendix: Command Summary 6.1 General The operation of the LK202-24-USB 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 0 to 4 in the same sequence as in the following tables. 6.2 Issuing Commands Commands are issued to the LK202-24-USB by the controller.
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. 6.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.
Command Syntax Default Notes 254 'G' [col] [row] The cursor marks the text insertion point in this and all commands. Send cursor home FE 48 254 72 254 'H' This command moves the cursor to the top left of the display area. 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.
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. 6.6 Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters.
6.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 5.1.1. Table 6-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.
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.
7. Appendix: Specifications and Options 7.1 Specifications Standard Temperature Operating Temperature 0°C to +50°C Storage Temperature -20°C to +70°C Operating Relative Humidity 90% max non-condensing Electrical Specifications Supply Voltage 4.75 - 5.25 Vdc Supply Current 35 mA typical Supply Backlight Current 115 mA typical Optical Characteristics LK202-24-USB rev 1 Number of Characters 40 (20 characters by 2 lines) Matrix format 5 x 7 with underline Display Area 82.2 x 18.
Figure 7-1 Physical Layout 7.
8. 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.
LK202-24-USB rev 1 36