LK204-25 User Manual LK204-25 rev 1 1
Table of Contents 1. Introduction............................................................................................................................... 4 1.1 What it Does........................................................................................................................................ 4 1.2 What it Does Not Do........................................................................................................................... 4 1.3 Keypad Interface.........................
4.5.7 Set debounce time (254 85 [time])..........................................................................................19 5. Bar Graphs and Special Characters...................................................................................... 20 5.1 Command List................................................................................................................................... 20 5.1.1 Initialize wide vertical bar graph (254 118).....................................................
1.Introduction Your LK204-25 has the following features: 20 column by 4 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 LK204-25 to an unmodified spare power connector in a PC. To modify such a cable see section 2.1.1. A 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-2 for the following steps. 2.
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.
2.Connections 2.1Connector Pinout Refer to the diagram below for this chapter. Figure 2-2 Electrical Connections The LK204-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.1Power and I2C Connections Power is applied via pins 1 and 4 as shown in Figure 2-2. Power requirement is +5 VDC ±0.25V.
Do not apply more than +5Vdc to pin #9 on the DB-9 connector. Connector pinout is as follows: 1 2 3 4 Figure 2- 3 Power connector 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.1Five Volt Modules If the LK204-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 LK204-25 are different as shown in Figure 2-4 below.
2.1.1.2Wide Voltage Range Modules Note: Do not use this cable unless your display module has the "wide voltage range" option (option V). Use of the 12 volt power cable with 5 volt modules will damage the module. The 12 volt power cable is designed for use with wide voltage range display modules mounted in a PC. Wiring required for the 12 volt power connector is shown in Figure 2-6 below.
complies with the EIA232 standard in that it uses signal levels from ± 3V to ± 12V. It will not operate correctly at TTL (0 to +5V) levels. Pin Number Direction 2 Data from LCD Data out (LCD) Tx Rx 3 Data to LCD Data in (LCD) Rx Tx 5 - Ground gnd gnd Description LCD Host The power connector on the PC cable is wired as shown in Figure 2-8. 2.1.3Configuring RS-232 and I2C RS-232 baud rate and I2C address are configured by means of jumpers.
64H in out in out 66H in out in in 68H in in out out 6AH in in out in 6CH in in in out 6EH in in in in 2400 9600 19200 2.1.4I2C Communications I²C communications runs at 100 kBps and supports up to 127 units on a single communications line. The I2C data line operates on 5 volt CMOS levels. 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.
Figure 2-10 General Purpose Outputs Maximum allowable current is 20 mA, which is enforced by the 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 feedthrough hole to the corresponding negative pin for the GPO in question.
GPO - + 1N400 1 Relay coil 10 - 100 uF Figure 2- 12 Clamping a Relay LK204-25 rev 1 13
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.1General Text is displayed on the LK204-25 using the built-in 5 x 7 dot matrix font (plus up to 8 user-defined characters. 3.2The Built-In Character Font The LK204-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-13.
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 LK204-25 does not have provision to download other fonts. 3.3Writing 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.7Turn on underline cursor (254 74) 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.8Turn off underline cursor (254 75) Turns off the underline cursor. Does not affect the blinking block cursor. 3.4.9Turn on block (blinking) cursor (254 83) 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.1General The LK204-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 LK204-25 display. If you need to send keystrokes to the display, they must be routed through your controller. 4.
4.3I2C 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- 15 Poll timing 4.5.2Auto repeat mode off (254 96) This command turns off auto repeat mode. 4.5.3Auto transmit keypresses on (254 65) 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 LK204-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 LK204-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).
Before using this command the Initialize Large Digits command must be issued to define the blocks necessary to make up the digits. If regular text and large digits are mixed on one screen, the user should always set the display cursor position before placing regular text because the creation of a large digit will leave the cursor position to the bottom right of the large digit and not at the last regular text write position. [col] can have values from 0x01 to 0x12 (1 to 18).
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 LK204-25 please read sections 7.2 and 7.3. 6.1Command List 6.1.1Clear display (254 88) This command clears the display and resets the text insertion point to the top left of the screen. 6.1.
6.1.
7.Appendix: Command Summary 7.1General The operation of the LK204-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.2Issuing Commands Commands are issued to the LK204-25 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. 7.3.1ASCII 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.
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. Send cursor home FE 48 254 72 254 'H' Underline cursor on FE 4A 254 74 254 'J' Underline cursor off FE 4B 254 75 254 'K' Block cursor on FE 53 254 83 254 'S' Block cursor off FE 54 254 84 254 'T' Turns off the blinking block cursor.
Command Syntax Default 254 85 [time] 254 'U' [time] Notes multiplier. 7.6Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters. Table 7-3 Bar Graph and Special Character Commands Command Syntax Notes Initialize thick vertical bar graph FE 76 254 118 254 'v' Initializes the user character set to make wide vertical bar graphs.
7.7Miscellaneous 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.
8.Appendix: Specifications and Options 8.1Specifications 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- 16 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.
Value 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.