VK162-12 Technical Manual Revision: 1.
Contents Contents ii 1 Introduction 1.1 What to Expect From the VK162-12 . . . 1.2 What Not to Expect From the VK162-12 . 1.3 Keypad Interface . . . . . . . . . . . . . 1.4 Setup for Testing . . . . . . . . . . . . . 1.5 Trying Out the VK162-12 . . . . . . . . . 1.6 Trying out a Keypad . . . . . . . . . . . 1.6.1 Here’s what to do: . . . . . . . . 1.7 Manual Over-ride . . . . . . . . . . . . . 1.8 Memory Chip Lock Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Keypad Interface 4.1 General . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Connections . . . . . . . . . . . . . . . . . . . . . . 4.3 I2 C Interface . . . . . . . . . . . . . . . . . . . . . 4.4 RS-232 Interface . . . . . . . . . . . . . . . . . . . 4.5 Keypad Commands . . . . . . . . . . . . . . . . . . 4.5.1 Auto Repeat Mode On (254 126 [mode]) (R) 4.5.2 Auto Repeat Mode Off (254 96) (R) . . . . . 4.5.3 Auto Transmit Keypresses On (254 65) (R) . 4.5.4 Auto Transmit Keypresses Off (254 79) (R) .
7 Appendix: Command Summary 7.1 General . . . . . . . . . . . . . . 7.2 Issuing Commands . . . . . . . . 7.3 On Numbers . . . . . . . . . . . . 7.3.1 ASCII Characters . . . . . 7.4 Text Commands . . . . . . . . . . 7.5 Keypad Interface Commands . . . 7.6 Bar Graphs and Special Characters 7.7 Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Introduction The VK162-12 comes equipped with 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.
1.4 Setup for Testing Before setting up the application the user may want to try out the display. This is easily done with a PC. If not equipped with a dual bay PC mounting kit, the following will be required; • A 4-pin power connector of the type used to connect 3.5" floppy drive. Take care not to connect the display to an unmodified spare power connector in a PC • 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.
1.5 Trying Out the VK162-12 The unit should be connected to power and the PC and backlight should be on. To experiment with typing text, run a PC terminal program such as Hyperterm. Make sure it’s configured to use the correct port. Set the baud rate to 19,200. If characters are typed on the keyboard, they should now appear on the display screen. Text will wrap around to the next line when the end of a line has been reached. 1.
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 Remove the jumper and change the RS-232 port settings to the desired baud rate Turn off the display Power up the display Refer to the "Set RS-232 port speed" command for acceptable baud rates. Figure 2: Manual Over-ride Place jumper on the above pins. 1.
14 Pin Dual Header 4 Pin DB-9F Table 2: Mating Connectors Many, ex. MOLEX 70058 MOLEX 7880 To lock down the memory chip, solder the jumper as shown in the LOCKED picture above. This will lock down the memory chip, not allowing anything to be changed inside it until the jumpers are restored to their original position. 2 Connections 2.1 Connector Pinout Refer to the Figure below for this chapter.
2.1.1 Power Connection Power is applied via pins 1 and 4. Power requirement for standard units is +5 VDC ±0.25V (units with the wide voltage range option require 7 - 15 Vdc). Power may also be supplied via the RS-232 connector. WARNINGS • Do not apply any power with reversed polarization. • Do not apply any voltage other than the specified voltage. • Do not use any cables other than the cables supplied by Matrix Orbital, unless aware of the modifications required.
Figure 6: Five Volt Power Cable 2.1.3 Wide Voltage Range Modules NOTE Do not use this cable unless the 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 the Figure below.
2.1.4 Power through the DB-9 Connector The display can be powered by pin 9 on the DB-9 connector. If power is applied here, power cannot be applied to the other power connector. The input voltage for pin 9 can only be +5Vdc, even if the unit is wide voltage. NOTE Failure to follow these instructions will result in the destruction of the unit. The jumper shown in the Figure below will have to soldered to use the DB-9 connector for power. Figure 9: DB-9 Power 2.1.
Table 3: RS-232 Pinout Pin Number 2 3 5 2.1.7 Direction Data from LCD Data to LCD - Description Data out(LCD) Data in (LCD) Ground LCD Tx Rx gnd Host Rx Tx gnd Alternate Serial Connection An optional alternate connection header is provided to allow one cable for data and power. Two jumpers will have to be soldered and two removed.
Table 4: Connector Pinout Pin 4 Pin 3 Pin 2 Pin 1 2.1.8 Ground Rx Tx Vdc TTL Communications The display can be talked to at TTL (logic 0V to +5V) levels. Two modifications must be made. Figure 13: RS-232 Selects Jumpers 2 and 3 must be closed and 1 and 4 open. 2.1.9 I2 C I2 C Communications I2 C communications runs at 100Kbps and supports up to 127 units on a single communications line. The data line operates on 5 volt CMOS levels. 2.1.
for this, one needs to understand how a Matrix Orbital module processes data. Basically, the reason why a Matrix Orbital module might fail to receive a byte correctly is that it was unable to process the byte previous before the failed byte was transmitted. Because the module cannot possibly know that it would be unable to store the byte before the next byte was received it cannot know to not ACK. The reason for this situation in deference to situations one might be familiar with (i.e.
Table 5: Connector Pinout Pin 4 Pin 3 Pin 2 Pin 1 Ground SDA (I2 C data) SCL (I2 C clock) Vdc 2.2 General Purpose Outputs The display 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 the PC or controller and software commands.
Figure 17: Clamping a Relay 3 Displaying Text This chapter describes the various text display commands in detail. Before issuing commands to the VK162-12 please read sections 7.2 and 7.3. 3.1 General Text is displayed on the LK16-12 using the built in 5x7 dot matrix font, in addition to up to 8 user defined characters. 3.2 The built in Character Font The display includes a built in 5x7 dot matrix font with the full range of ASCII characters plus a variety of extended characters.
Figure 18: 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 display 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.
in the following section. 3.4 Text Commands In this section commands are identified by their names and decimal values. 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. 3.4.1 Auto Line Wrap On (254 67) (R) Enables automatic line wrapping. Note that this is not ’word wrapping’ and wraps may occur in the middle of a word. 3.4.2 Auto Line Wrap Off (254 68) (R) Disables automatic line wrapping.
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.1 General The display keypad interface processes the keypad row / column matrix into a serial (RS-232 or I 2 C) data byte stream. Aside from this processing, the keypad has no effect on the display. To send keystrokes to the display, they must be routed through the controller. Whenever a columns and a row pin are shorted together, a keystroke will be generated and either held in the buffer (I 2 C) or send over the serial line to the host (RS-232).
Table 6: Keypad Layout Columns 1 Rows 2 3 1 ’A’ 41 Hex ’B’ 42 Hex ’C’ 43 Hex 2 ’F’ 46 Hex ’G’ 47 Hex ’H’ 48 Hex 3 ’K’ 4A Hex ’L’ 4B Hex ’M’ 4C Hex 4 ’P’ 50 Hex ’Q’ 51 Hex ’R’ 52 Hex NOTE The keypad connector must be wired with columns on one side and rows on the other side of the center of the connector. In situations where the keypad isn’t wired this way an adapter will need to be made, or the user should rewire the connector to meet this requirement. 4.
4.5.1 Auto Repeat Mode On (254 126 [mode]) (R) [mode] = 0x00 gives “Resend Key Code” mode [mode] = 0x01 gives “Key down / key up” code mode. Two modes of auto repeat are available and are set via the same command. 1. Resend Key Code: This mode is similar to the action of a keyboard on a PC. In this mode, when a key is held down, the key code is transmitted immediately followed by a 1/2 second delay. After this delay, key codes will be sent via the RS-232 interface at a rate of about 5 codes per second.
4.5.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. 4.5.5 Clear Key Buffer (254 69) This command clears any unread keypresses.
5.1 Command List This chapter describes various graphic commands. 5.1.1 Initialize Wide Vertical Bar Graph (254 118) This command defines the 8 special / user characters to be blocks suitable for use in drawing wide (5 pixel) vertical bar graphs. Any previously existing definitions will be lost. Once this command has been issued, any number of vertical bar graphs may be drawn unless the characters are redefined by another command. 5.1.
5.1.6 Define Custom Character (254 78 [c] [8 bytes]) The dislay allows up to 8 user defined (custom) characters. These characters occupy the first 8 (0x00 to 0x07) places in the character set. Custom characters occupy a 5x7 pixel matrix. Built in characters are 5x7: 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.
' ; # - 2/% % &%< = 8> EGFHEIA0BC !3.4/ ,3*J! K# - #K!3 -L!%, * *7#% & ' ; # - 2/% % &%< = 8>2 %' KA5BC ! .7/ ,3*M!3K# - # ! -N6 # + .K O P ' ; # - 2/% % &%< = 8>3 A0BQ RS = K/T ,U! - # ' ; # - 2/% % &%< = 8>3 R A0BQ % K V!3.
Table 9: Command Example Decimal 254 147 1 254 81 Hex FE 93 01 FE 51 254 147 0 FE 93 00 Function Turn on "remember" function Turn on auto scroll. Since "remember" is ON, this setting will be saved in non-volatile memory Turn off "remember" function Any number of commands may be entered between the ’remember ON’ and ’remember OFF’ commands, and all settings will be memorized. 6.1.
Table 10: Default Screen Matrix Orbital VK162-12 The 40 characters define the two 20 character rows of the screen. Table 11: Default Screen Character1 Character21 6.1.6 Character16 Character 32 Set brightness (254 89 [brightness]) This command sets the display brightness to [brightness], where [brightness] is a value between 0x00 and 0x03 (between 0 and 3) according to the Table below. Table 12: Brightness Settings Hex Value 0x00 0x01 0x02 0x03 6.1.
6.1.9 Set I2 C Address 254 51 [address]) This command sets the I2 C write address of the module. This value must be an even number and the read address is one higher. For example if the I2 C write address is set to 0x50, then the read address is 0x51. The change in address is immediate. This address is 0x50 by default, and is reset temporarily back to that value when the ’manual over-ride’ jumper is used on power up. 6.1.
6.1.12 Read Version Number 254 54) Modules may be delivered with the serial number blank. In this case the user may set the desired 2 byte serial number using this one time only command. Upon the execution of this command, the module will echo these two bytes back over the RS-232 interface. The serial number may be set only once. Any future attempt to execute this command will result in no change and the module will return to the originally set serial number. 6.1.
size of the FIFO. The reason for this is that the FIFO may be full when the host system receives 0xFE. In the case of 16550 UART the size at its maximum is 16, therefore the value of should be set to 16 or greater. 6.2.2 Exit Flow Control Mode (254 59) This command turns off flow control. Bytes may overflow the buffer without warning. 6.2.3 GPO or Keypad Mode (254 126 [mode]) The display shares GPO and keypad pins, you can use one of the other but not both at the same time.
in the BASIC program. Or, with C the user could (using Zcomm serial library) ` a ,3* *b %P%c d -7 a , * * < = b> ' " KA0B ` a ,3* *b %P%c d -7 a , * * < = b> fE egEhA0B 7.3 On Numbers Like all computerized devices, the display operates with commands and values in the form of binary numbers. These binary numbers are arranged in 8 digit (i.e., 8 bit) groups called bytes. The decimal value of a byte may have any value from 0 to 255.
Table 16: Example of an ASCII Table The letter The letter The number The number A a 0 9 has a value of has a value of has a value of has a value of 65 decimal or 97 decimal or 48 decimal or 57 decimal or 41 hex 61 hex 30 hex 39 hex This gives rise to the possibility of confusion when parameters are being set on the display For example, the GPO ON and OFF commands use a number to indicate which GPO is being controlled. We’re told that acceptable values are 0 to 6.
Command Set cursor position Syntax FE 47 [col] [row] 254 71 [col] [row] 254 ’G’ [col] [row] Send cursor home FE 48 254 72 254 ’H’ Underline cursor on FE 4A 254 74 254 ’J’ FE 4B 254 75 254 ’K’ FE 53 254 83 254 ’S’ FE 54 254 84 254 ’T’ FE 4C 254 76 254 ’L’ Underline cursor off Block cursor on Block cursor off Cursor left Cursor right Matrix Orbital Default N/A Off R R Turns off the underline cursor. On R Turns on the blinking block cursor. Turns off the blinking block cursor.
7.
7.6 Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters.
Command Remember Syntax FE 93 [0|1] 254 147 Default off Clear Display FE 58 254 88 254 ’X’ N/A Load Startup Screen FE 40 [32 char] 254 64 [32 char] 254 ’@’ [32 char] Matrix Orbital VK162-12 GPO or Keypad Interface Mode FE 25 [mode] 254 37 [mode] 254 % [mode] 0 General Purpose Output Off FE 56 [gpo #] 254 86 [gpo #] 254 ’V’ [gpo #] Off General Purpose Output On FE 57 [gpo #] 254 87 [gpo #] 254 ’W’ [gpo #] Off Set I2 C Address FE 33 [address] 254 51 [address] 254 ’3’ [address] 0x50 Read M
Command Read Serial Number Syntax FE 35 254 53 254 ’5’ FE 36 254 54 254 ’6’ Default Enter Flow Control Mode FE 3A [full] [empty] 254 58 [full] [empty] 254 ’:’ [full] [empty] Off Exit Flow Control Mode FE 3B 254 59 254 ’;’ Read Version Number 8 Notes Reads the two byte serial number of the module. Reads the firmware version number of the module. Sets "full" and "empty" marks for the 80 byte display buffer. When buffer reaches [full] display will return 0xFE to host.
Table 26: Electrical Specifications Supply Voltage Supply Current (all pixels off) Supply Current (all pixels on) Supply Current (power up) 4.75 - 5.25 Vdc (optional 7 - 15 Vdc) 10 mA typical 160 mA typical 220 mA typical Table 27: Optical Characteristics Number of Characters Matrix format Display Area Character Size Character Pitch Line pitch Dot Size Dot Pitch Luminance Color of Illumination Matrix Orbital 32 (16 characters by 2 lines) 5 x 7 with underline 51.36 x 11.4 mm XxY 2.46 x 4.
Figure 21: Physical Layout Matrix Orbital VK162-12 37
8.2 Options Table 28: Options Available on VK162-12 Extended Temperature Wide Voltage 9 -E -V Appendix: Glossary Table 29: Appendix: Glossary ASCII Backlight Binary Number Bit Bitmap Byte CCFL Configuration Contrast Matrix Orbital 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.
Controller DB-9 Firmware Font Font Metric Hexadecimal I2 C Interface LCD Module Type Value Pixel Pre-Generated Fonts Primitive RS-232 Matrix Orbital The micro-controller or PC used to control the Matrix Orbital display unit. The designation of a connector used in the RS-232 interface: 9 pin connector. Software (programs or data) that has been written onto read-only memory (ROM). Firmware is a combination of software and hardware.
Scroll Serial Number Serial Port Version Number Volatile Memory Matrix Orbital To view consecutive lines of data on the display screen. The term scroll means that once the screen is full, each new line appears at the bottom edge of the screen and all other lines move up one position. A number that is one of a series and is used for identification of the module. A port, or interface, that can be used for serial communication, in which only 1 bit is transmitted at a time.