VK202-25 User Manual VK202-25 rev.
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 .................................................................................... 20 5.1 Command List ................................................................................................................................ 20 5.1.1 Initialize wide vertical bar graph (254 118).......................................................................... 20 5.1.2 Initialize narrow vertical bar graph (154 115) .........................................................
1. Introduction Your VK202-25 has the following features: 20 column by 2 line text fluorescent 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. VK202-25 PC +5V power 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.
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 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 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 General Purpose Outputs RS-232 +5 Power connector gnd Keypad Connector pin 5 pin 1 pin 1 Figure 2-1 Electrical Connections The VK202-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.
Pin 2 Pin 3 Pin 4 SCL (I2C clock) SDA (I2C data) Ground 2.1.1.1 Five Volt Modules If the VK202-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 VK202-25 are different as shown in Figure 2-3 below. Figure 2-3 Power Connector wiring differences If you don't want to modify cable wiring yourself, Matrix Orbital can supply an adapter cable designed to use with the VK202-25 when it's installed in a PC.
+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 RS-232 Communications A standard DB-9F is provided for RS-232 communications. Power may also be supplied via this connector if desired.
Pin Number Direction Description LCD Host 2 Data from LCD Data Out Tx Rx 3 Data to LCD Data In Rx Tx 5 - Ground gnd gnd The power connector on the PC cable is wired as shown in Figure 2-7. 2.1.3 I²C 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.
- + GPO 1 GPO 2 GPO 3 GPO 4 GPO 5 GPO 6 Power + 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. 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-10 Clamping a Relay VK202-25 rev.
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 VK202-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 VK202-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 VK202-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.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 VK202-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 VK202-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) This command turns off auto repeat mode. 4.5.3 Auto 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 VK202-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 VK202-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 VK202-25 please read sections 7.2 and 7.3. 6.1 Command List 6.1.1 Clear 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.6 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 6. Note that OFF means that the output floats. 6.1.7 General purpose output on (254 87 [gpo #]) This command turns ON any of the General Purpose Outputs. [gpo #] is 1 to 6. ON means that the output is pulled low (ground via 240 ohms). 6.1.8 Set I2C address 254 51 [address]) This command sets the I²C write address of the module.
6.1.9 Read module type (254 55) This command will return a 1 byte hex value, over the RS-232 interface only, the model type value of the module.
6.1.13 Read Version Number 254 54) This command will return the firmware version number of the VK202-25 as a 1 byte hex value over RS232 only. 6.2 Flow Control The VK202-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 VK202-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 VK202-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 Underline cursor on FE 4A 254 74 254 'J' off Turns on the underline cursor. 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. Cursor left FE 4C 254 76 254 'L' Moves the cursor one position to the left. If the cursor is already at the beginning of a line it will move to the end of the other line.
7.6 Bar 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. Initialize thin vertical bar graph FE 73 254 115 254 's' Initializes the user character set to make narrow vertical bar graphs.
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 brightness FE 59 [brightness] 254 89 [brightness] 254 'Y' [brightness] 0x03 100% Sets display brightness. Brightness is a value between 0x00 and 0x03. 0x00=25%, 0x01=50%, 0x02=75%, 0x03=100%. Display on FE 42 [minutes] 254 66 [minutes] 254 'B' [minutes] on Display will stay on for [minutes].
Command Exit flow control mode VK202-25 rev. 05 Syntax Default Notes 254 ':' [full] [empty] display will return 0xFE to host. When buffer reaches [empty] display will return 0xFF. FE 3B 254 59 254 ';' Turns off flow control.
8. Appendix: Specifications and Options 8.1 Specifications Environmental Specifications Standard Temperature Extended Temperature Operating Temperature -20°C to +70°C -40°C to +85°C Storage Temperature -40°C to +80°C -50°C to +85°C Operating Relative Humidity 20 to 80% non condensing Vibration (non-operating) 10 to 55 to 10 Hz (Frequency) 1.0 mm (Total Amplitudes) 30 minutes (Duration) X, Y, Z each direction Shock (Non-operation) 593 m/S², 10 mS Electrical Specifications Supply Voltage 4.
Figure 8-1 Physical Layout 8.2 Options Options Available on VK202-25 Extended Temperature E Wide Voltage V VK202-25 rev.
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.