VK202-25 Technical Manual Revision: 3.
Contents Contents ii 1 Introduction 1.1 What to Expect From the VK202-25 . . . 1.2 What Not to Expect From the VK202-25 . 1.3 Keypad Interface . . . . . . . . . . . . . 1.4 Setup for Testing . . . . . . . . . . . . . 1.5 Trying Out the VK202-25 . . . . . . . . . 1.6 Trying Out a Keypad . . . . . . . . . . . 1.6.1 Here’s what to Do . . . . . . . . 1.7 Manual Over-ride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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) . 4.5.
7 1-Wire Commands 7.1 Device Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 ROM Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Display 1-Wire Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Transaction command (254 C8 1 [flags] [Send Bits] [Recieve bits] [Send data]) 7.4.
1 Introduction The VK202-25 comes equipped with the following features: • • • • • • • • • • • • • • • 20 column by 2 line text vacuum fluorescent display Built in font with provision for up to 8 user defined characters Speeds from 1200 bps to a lighting fast 19.
any aspect of the operation of the display, which acts simply as a matrix to serial converter. To use the keypad to control the display, the controller must be programmed accordingly. 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.
1.5 Trying Out the VK202-25 The unit should be connected to power. The PC and display 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.
NOTES • The keypad connector must be wired with columns on one side and rows on the other side of the center of the connector. If the keypad isn’t wired this way an adapter must be made or the connector must be rewired to meet this requirement. • The connector is reversible. Reversing the connector will not damage the keypad or the display, but it will change the ASCII character map. 3. Press a key on the keypad. An upper case ASCII character (A-Y) should appear on the PC screen.
1-Wire Connector Keypad Connector GPOs Configuration Jumpers Power/Data Connector DB9 Connector Figure 2: Electrical Connections The display has four connectors: Table 2: Connectors & Functions Connector 12 pin dual header 4 pin 12 pin header DB-9F Matrix Orbital Function General purpose outputs (6) Power (5.
2.1.1 Power Connections Power is applied via pin1 and ground via pin 4 as shown in the figure below. Power requirement is +5 VDC ±0.25V. As an alternate power conncetion, power may also be supplied via the RS-232 connector as described in section 2.1.4. 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 4: Wiring for 5V Modules Matrix Orbital can supply an adapter cable designed for use with the display when it’s installed in a PC. The cable is wired as shown in the Figure below. Note that this cable does not provide connections for I2 C. Figure 5: 5V 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.
Figure 6: Wiring for 12V Modules Matrix Orbital can supply an adapter cable designed for use with the display module when it’s installed in a PC. The cable is wired as shown in the Figure below. Figure 7: 12V Power Cable 2.2 Communication Connection 2.2.1 RS-232 Communications A standard DB-9F is provided for RS-232 communications. This unit is set to RS232 communication by factory default. WARNINGS • Do not apply any voltage other than the specified voltage.
Figure 8: RS-232 and Power Connector Figure 9: Power Applied via DB9 The RS-232 connector on the PC cable is wired so that a standard ‘straight through’ 9 pin D-sub cable may be used to connect the module to a standard serial port such as COM ports on PCs. Please see the figure below for pinout configuration. NOTE This device 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 with out modification.
5 32 9 Figure 10: DB9 Pinout For RS232 communication via the 4 pin connector, please see the figure and table below. 1234 1234 Figure 11: Power Connector Table 5: Connector Pinout Pin 1 Pin 2 Pin 3 Pin 4 2.2.2 +5.0 VDC (+7 to +15 VDC with wide voltage option) Rx Tx Ground TTL Communications A standard DB-9F or 4 pin power connector/communication (female) connector is needed for TTL communications. Power may also be supplied via this connector if desired.
Figure 12: TTL Select Note that this device uses signal levels from 0V to + 5V on the TTL setting.
Table 7: Connector Pinout Pin 1 Pin 2 Pin 3 Pin 4 2.2.3 +5.0 VDC (+7 to +15 VDC with wide voltage option) Rx (receive data) Tx (transmit data) Ground I2 C Communications The display I2 C communications runs at 100 Kbps and supports up to 127 units on a single communications line. The I2 C data line operates on 5 volt CMOS levels. One modification is required for I2C. The RS232 selection jumpers must be removed and placed on the I2C selection jumpers.
Table 8: Connector Pinout Pin 1 Pin 2 Pin 3 Pin 4 2.2.4 +5.0 VDC (+7 to +15 VDC with wide voltage option) I2 C SDL (clock) I2 C SDA(data) Ground ACK 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. Clearly, this is of limited usefulness and even less so with Matrix Orbital modules.
GND Data +5V Figure 16: 1-Wire Pinout 2.3 General Purpose Outputs The display 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 the PC or controller and software commands. Each output is wired as shown in the Figure below. 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.
Figure 18: Bypassing 240 ohm Resistor NOTE The GPOs do not have any over current or over / under voltage protection so care must be taken when using them. For instance if the external device is a relay it must be fully clamped (using a diode and capacitor) to absorb any generated back electro-motive force (EMF). Suggestions for clamping a relay: Figure 19: Clamping a Relay 3 Displaying Text This chapter describes the various text display commands in detail.
3.1 General Text is displayed on the VK202-25 using the built in 5x7 dot matrix font. In addition, there are 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, as shown in the Figure below.
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. Characters are drawn using the built in font, and only characters defined in the font are actually displayed. Characters that are not defined by the built in font print as a space (i.e., the cursor is advanced for the next character).
3.4.5 Set cursor position (254 71 [column] [row]) This command sets the cursor position (text insertion point) to the [column] and [row] specified. Columns have values from 1 to 20 (0x01 to 0x14) and rows have values of 1 and 2 (0x01 and 0x02). 3.4.6 Send cursor home (254 72) This command moves the cursor position (text insertion point) to the top left of the display area. 3.4.7 Turn on underline cursor (254 74) (R) Turns on the underline cursor. The cursor shows the current text insertion point.
NOTE This command moves the text insertion point even if the cursor is turned off. 4 Keypad Interface This chapter describes the keypad interface and associated commands in detail. 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. 4.
Table 9: Keypad Layout Rows 1 2 3 4 5 1 A F K P U Columns 2 3 B C G H L M Q R V W 4 D I N S X 5 E J O T Y 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.3 I2 C Interface The keypad can be read by I2 C master read.
function. 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 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. This mode has no effect if polling or if using the I2 C interface. 2.
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 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 display 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.
5.1.7 Initialize Medium Digits (254 109) This command defines the 8 special characters to be blocks suitable for use in drawing medium digits. Any previous definitions will be lost. Once this command has been issued, any number of medium characters may be placed until the characters are redefined by another command. 5.1.8 Draw Medium Digits (254 111 [row][column][digit]) Draws a medium digit in [row] and [column] using the specified [digit]. Medium digits occupy two rows.
6.1.3 Set brightness (254 89 [brightness]) (R) This command sets the display’s 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 Values 0x00 0x01 0x02 0x03 Brightness 25% 50% 75% 100% Lighting conditions will affect the actual value used for optimal viewing. Brightness is set to 100% by default. Brightness cannot be ’remembered’ and must be set each time a change is required. 6.1.
Table 13: Default Screen Matrix Orbital VK202-25 The 40 characters define the two 20 character rows of the screen. Table 14: Default Screen Character 1 Character 21 Character 20 Character 40 If sending more than 10 characters to be stored, add in a ~10ms per character delay. Predefined custom characters can be used in the “Start up Screen” as well, by using 0x00 through 0x07 characters. 6.1.8 General purpose output off (254 86 [gpo #]) This command turns OFF any of the general purpose outputs.
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.12 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. Values for various modules at the time of this publication are as follows: Table 15: Module Values LCD0821 - 0x01 LCD4021 - 0x06 LK204-25 - 0x09 VFD2041 - 0x0C VK204-25 - 0x0F GLK24064-25 - 0x15 6.
6.1.15 Read Serial Number (254 53) This command will return a 2 byte hex value, over the RS-232 interface only, the serial number of the module as it was previously stored. 6.1.16 Read Version Number (254 54) This command will return the firmware version number of the display as a 1 byte hex value over RS-232 only. 6.2 Flow Control The display 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.
7 1-Wire Commands The 1-wire bus is capable of communicating with many devices over a single wire plus a ground reference. This chapter deals with the capabilities of the display and a brief introduction to the 1-Wire standard. +*,# '- .*0/ !12! 34* For more detail consult 7.1 Device Identification Each 1-wire device contains a unique 64-bit address in which to identify them with.
• Match ROM [55h]: To single out a device, the Match ROM command is used. After this command has been issued the 64-bit target address is transmitted in LSB to MSB order. Any device with an address that doesn’t match will ignore all further communication until the next bus reset. • Skip ROM [CCh]: After this command, all devices will continue to listen and process the transaction. This is equivalent to broadcasting to all devices.
Table 17: 1-Wire Transaction Offset (Bytes) 0 Length (Bytes) 1 Name Description Flags The flags byte controls the optional components of the transaction. The number of bits that will be transmitted onto the bus. The actual bits to be transmitted are held in the Send Data section. The number of bits to read off the bus after the data to be put on the bus has been sent. The data to be transmitted onto the bus. The data is transmitted MSB to LSB in the order that they are received.
7.4.2 Search command (254 200 2) This is used to find the addresses of all 1-Wire devices on the bus. After this command the display will return one or more “Display return protocol” packets containing either an error code or addresses of 1-wire packets.
For example (using BASIC in a test setup), the user could issue the command to clear the screen on the display by including the line; 5 6-748 9 :- ;.!4 < =?>2 @-ACB.! 2F F A In the BASIC program. Or, with C the user could (using Zcomm serial library) G H 34* *1 %/%I J <- H 3 * * K L 1> ' " DACB G H 34* *1 %/%I J <- H 3 * * K L 1> OM NPMQACB 8.3 On Numbers Like all computerized devices, the display operates with commands and values in the form of binary numbers.
Table 22: 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 1 to 6.
Command Set cursor position Syntax FE 47 [col] [row] 254 71 [col] [row] 254 ’G’ [col] [row] Default N/A Send cursor home FE 48 254 72 254 ’H’ N/A 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’ Off R Notes Moves cursor to the specified column and row. The cursor marks the text insertion point in this and all commands. This command moves the cursor to the top left of the display area. Turns on the underline cursor.
8.
8.6 Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters.
Command Draw medium digits Syntax FE 6F [r][c][digit] 254 111 [r][c][digit] 254 ’o’ [r][c][digit] Notes Draws a medium digit in [row] and [column] using the specified [digit]. Medium digits occupy two rows. When the [row] is specified to be “1”, the medium digit will be displayed correctly. When the [row] is specified to be “2”, only the top part of the medium digit will be displayed. When [row] is specified to be “0”, only the bottom part of the medium digit will be displayed. 8.
Command Remember Syntax FE 93 [0|1] 254 147 Default Off Set brightness and save FE 91 [brightness] 245 145 [brightness] 0x03 R Display on FE 42 [minutes] 254 66 [minutes] 254 ’B’ [minutes] On R Display off FE 46 254 70 254 ’F’ FE 40 [40 char] 254 64 [40 char] 254 ’@’ [40 char] Off R General purpose output off FE 56 [gpo #] 254 86 [gpo #] 254 ’V’ [gpo #] Off R General purpose output on FE 57 [gpo #] 254 87 [gpo #] 254 ’W’ [gpo #] Off R Remember general purpose output FE C3 [gpo#][gpo value
Command Remember Syntax FE 93 [0|1] 254 147 Default Off Set I2 C address FE 33 [address] 254 51 [address] 254 ’3’ [address] 0x50 Read module type FE 37 254 55 254 ’7’ FE 39 [speed] 254 57 [speed] 254 ’9’ [speed] FE 34 [byte1][byte2] 254 52 [byte1][byte2] 254 ’4’ [byte1][byte2] see table FE 35 254 53 254 ’5’ FE 36 254 54 254 ’6’ N/A Enter flow control mode FE 3A [full] [empty] 254 58 [full] [empty] 254 ’:’ [full] [empty] Off R Exit flow control mode FE 3B 254 59 254 ’;’ Off R Set RS-232 port
9 Appendix: Specifications and Options 9.1 Specifications Table 31: Environmental Specifications Operating Temperature Storage Temperature Operating Relative Humidity Vibration (non-operating) Shock (Non-operation) Standard Temperature -20◦C to +70◦C -40◦C to +80◦C 20 to 80% non condensing 10 to 55 to 10 Hz (Frequency) 1.
Figure 23: Physical Layout 9.2 Options Table 34: Options Available on VK202-25 Extended Temperature Wide Voltage 10 E V Appendix: Glossary Table 35: Appendix: Glossary ASCII 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.
Backlight Binary Number Bit Bitmap Byte CCFL Configuration Contrast Controller DB-9 Firmware Font Font Metric Hexadecimal Matrix Orbital A backlit display is illuminated from behind to provide nighttime and improved daytime readability. The (data and signaling) bit transmission rate of an RS232 device. A number written using binary notation which only uses zeros and ones. A representation, consisting of rows and columns of dots, of a graphics image in computer memory.
I2 C Interface LCD Module Type Value Pixel PLED Pre-Generated Fonts Primitive RS-232 Scroll Serial Number Serial Port Version Number Volatile Memory Matrix Orbital Short for Inter-IC, a type of bus designed by Phillips Semiconductors in the early 1980s, which is used to connect integrated circuits (ICs). I2 C is a multi-master bus, which means that multiple chips can be connected to the same bus and each one can act as a master by initiating a data transfer. A means by which two systems interact.