VK204-25 Technical Manual Revision: 1.
Contents Contents ii 1 Introduction 1.1 What to Expect From the VK204-25 . . . 1.2 What Not to Expect From the VK204-25 . 1.3 Keypad Interface . . . . . . . . . . . . . 1.4 Setup for Testing . . . . . . . . . . . . . 1.5 Trying Out the VK204-25 . . . . . . . . 1.6 Trying out a Keypad . . . . . . . . . . . 1.6.1 Here’s what to Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.5.7 Auto repeat mode on (254 126 [mode]) Auto repeat mode off (254 96) . . . . . Auto transmit keypresses on (254 65) . Auto transmit keypresses off (254 79) . Clear key buffer (254 69) . . . . . . . . Poll keypad (254 38) . . . . . . . . . . Set debounce time (254 85 [time]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Introduction The VK204-25 comes equipped with 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.
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 5V power supply. • A PC with a spare RS-232 port (COM1 or COM2). • A 9 or 25 pin RS-232 serial cable.
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. A few common ASCII control characters work as follows; Table 1: Common ASCII Control Characters Character CR Hex value 0x0D LF 0x0A FF 0x0C BS 0x08 Function Moves cursor to beginning of the current line. Moves cursor to beginning of the next ( or previous ) line.
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 will however, 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.
Table 2: Connectors & Functions Connector 14 pin dual header 4 pin 10 pin header DB-9F 2.1.1 Function General purpose outputs (6) Power (5.0 VDC) and I2 C communications Keypad RS-232 / Power Power and I2 C Connections Power is applied via pins 1 and 4. Power requirement is +5 VDC ±0.25V. Power may also be supplied via the RS-232 connector as described in the next section. WARNINGS • Do not apply any power with reversed polarization. • Do not apply any voltage other than the specified voltage.
2.1.2 Five Volt Modules If the display is used in a PC it becomes 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 display are different as shown in the Figure below. 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 This connector does not provide connections for I2 C.
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.1.4 RS-232 Communications A standard DB-9F is provided for RS-232 communications. Power may also be supplied via this connector if desired.
complies with the EIA-232 standard in that it uses signal levels from +/- 3V to +/- 12V. It will not operate correctly at TTL (0 to +5V) levels. Table 4: RS-232 Pinout Pin Number 2 3 5 2.1.5 Direction Data from VFD Data to VFD - Description Data out Data in Ground VFD Tx Rx gnd Host Rx Tx gnd Configuring RS-232 and I2 C RS-232 baud rate and I2 C address are configured by means of jumpers.
Table 5: Serial Baud Rates Baud Rate 1200 2400 9600 19200 1200 2400 9600 19200 Slave Address 50H 52H 54H 56H 58H 5AH 5CH 5EH 60H 62H 64H 66H 68H 6AH 6CH 6EH J3 out out out out out out out out in in in in in in in in J2 out out out out in in in in out out out out in in in in J1 out out in in out out in in out out in in out out in in J0 out in out in out in out in out in out in out in out in 2.
/ write bit. If we take a standard Phillips 7bit address of 45hex this would be in binary 1000101. This is 7bits. Matrix Orbital would describe the Phillips I2 C address of 45hex as 8Ahex. The read address would be 8Bhex. For more information on Phillips I2 C please visit; ! " #%$ ! & %'() * 2.3 General Purpose Outputs The display has six general purpose outputs. These are provided to control relays or other electronic devices.
Figure 11: 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). Figure 12: Clamping a Relay 3 Displaying Text This chapter describes the various text display commands in detail.
3.1 General Text is displayed on the VK204-25 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, as shown in the Figure below. Figure 13: 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.
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. 3.4.7 Turn on block (blinking) cursor (254 83) 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. 4.2 Connections Figure 14: Keypad Connector The connector is not ’keyed’ so the keypad will probably plug in either of two ways.
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 is read by I2 C master read. In short, this means that a read of the module will always return the first unread key press.
In this mode, when a key is held down, the key code is transmitted immediately and no other codes will be sent until the key is released. On the release of the key, the key release code transmitted will be a value equal to the key down code plus 20 hex. For example, the key code associated with key ’P’ (0x50) is pressed, the release code is ’p’ (0x70). In RS-232 polled mode or via the I2 C interface, the “Key down / key up codes” are used. However, the user should be careful of timing details.
4.5.6 Poll keypad (254 38) This command returns any unbuffered keypresses via the RS-232 interface. The host system must be set up to receive the key codes. When the display receives this command it will immediately return any unbuffered keypresses which may have not been read already. If there is more than one keypress buffered, then the high order bit (MSB) of this returned keycode will be set (1). If this is the only buffered keypress, then the MSB will be reset (0).
5.1.3 Draw vertical bar graph (254 61 [column] [height]) Draws a vertical bar graph in [column] having a height of [height] pixels. The height may range from 0 to 20 (0x00 to 0x14) pixels. The necessary characters must first be initialized by either of the commands shown in section 5.1.1 or 5.1.2, which will determine the width of the graph drawn. Graph may be erased by drawing a bar graph of height = 0 in the same column. 5.1.
Table 7: 8 Byte Map * * * * * * * * * * * * * * * * * * * * * * * * 1 6 11 16 21 26 31 36 MSB LSB 2 3 4 7 8 9 12 13 14 17 18 19 22 23 24 27 28 29 32 33 34 37 38 39 5 10 15 20 25 30 35 40 Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7 Data Byte 8 A "1" bit indicates an on (black) pixel, a "0" bit indicates an off (clear) pixel. Once defined, a character is displayed simply by issuing a value (0x00 to 0x07) corresponding to the character number.
5.1.8 Place large digit 254 35 [col] [digit] This command allows the large digits to be drawn on the LCD screen. Numbers of almost full display height may be placed along side regular text on four row displays. The column number has a maximum value which is less than the display width because the digits are all three columns wide. Before using this command the “Initialize large digits” command must be issued to define the blocks necessary to make up the digits.
6.1.3 Display on (254 66[minutes]) This command turns on the display for a time of [minutes] minutes. If [minutes] is zero (0), the display will remain on indefinitely. NOTE The factory default for display is on. 6.1.4 Display off (254 70) This command turns the display off. 6.1.5 General purpose output off (254 86 [gpo #]) This command turns OFF any of the general purpose outputs. [gpo #] is 1 to 6. NOTE OFF means that the output floats. 6.1.
6.1.8 Read Version Number (254 54) This command will return the firmware version number of the display. The command will return a 1-byte hex value. 7 Appendix: Command Summary 7.1 General The operation of the display 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. 7.
exactly two hexadecimal digits make up one byte, each hex digit representing 4 binary digits (4 bits) as shown here; Table 11: Hex Value Table Binary 0000 0001 0010 0011 0100 0101 0110 0111 Hex 0 1 2 3 4 5 6 7 Decimal 0 1 2 3 4 5 6 7 Binary 1000 1001 1010 1011 1100 1101 1110 1111 Hex 8 9 A B C D E F Decimal 8 9 10 11 12 13 14 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.
7.4 Text Commands Syntax in the tables below is given in hex, decimal and decimal with ASCII, in that order, one per line.
Command Cursor left Syntax FE 4C 254 76 254 ’L’ Cursor right FE 4D 254 77 254 ’M’ Default Notes 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 Moves the cursor one position to the right. If the cursor is already at the end of a line it will move to the beginning of the other line 7.
Command Auto transmit key presses on Syntax FE 41 254 65 254 ’A’ Default On Auto transmit key presses off FE 4F 254 79 254 ’O’ FE 45 254 69 254 ’E’ FE 26 254 38 254 ’&’ Off FE 55 [time] 254 85 [time] 2 54 ’U’ [time] 52ms Clear key buffer Poll keypad Set debounce time N/A N/A Notes Sets auto transmit mode for keypad. Key presses are transmitted to host without polling. Up to 10 key presses buffered until polled. Clear unread key presses. Returns buffered key presses to application.
Command Initialize horizontal bar graph Define custom character Draw vertical bar graph Syntax FE 68 254 104 254 ’h’ FE 4E [c][8 bytes] 254 78 [c][8 bytes] 254 ’N’ [c][8 bytes] FE 3D [col][length] 254 61 [col][length] 254 ’=’ [col][length] Draw horizontal bar graph FE 7C [c][r][d][length ] 254 124 [c][r][d][length] 254 ’|’ [c][r][d][length] Initialize large digits FE 6E 254 110 254 ’n’ FE 23 [col] [digit] 254 23 [col] [digit] 254 ’#’ [col] [digit] Place large digits Notes Initializes the user charact
Command Set brightness Syntax FE 59 [brightness] 254 89 [brightness] 254 ’Y’ [brightness] Default 0x00 0x00 Display on FE 42 [minutes] 254 66 [minutes] 254 ’B’ [minutes] On Display off FE 46 254 70 254 ’F’ FE 56 [gpo #] 254 86 [gpo #] 254 ’V’ [gpo #] On General purpose output off General purpose output on FE 57 [gpo #] 254 87 [gpo #] 254 ’W’ [gpo #] Read module type FE 37 254 55 254 ’7’ Read Version Number FE 36 254 54 254 ’6’ Matrix Orbital see table VK204-25 Notes Sets display brightnes
8 Appendix: Specifications and Options 8.1 Specifications Table 21: Environmental Specifications Operating Temperature Storage Temperature Operating Relative Humidity Vibration (non-operating) Shock (Non-operation) Standard Temperature Extended Temperature -20◦C to +70◦C -40◦ C to +85◦ C ◦ ◦ -40 C to +80 C -50◦ C to +85◦ C 20 to 80% non condensing 10 to 55 to 10 Hz (Frequency) 1.
WARNINGS • Heavy shock of more then 100G, thermal shock greater then 10◦ C/minute, direct hit with a hard material to the glass surface (especially to the exhaust pipe) may CRACK the glass. • Steady repetition of a static message displaying, longer then 5 hours in a day may cause a phosphor burnout problem.
Figure 16: Physical Layout Matrix Orbital VK204-25 32
8.2 Options Table 24: Options Available on VK204-25 Extended Temperature Wide Voltage Wide Voltage with Efficient Switching Power Supply 9 E V VPT Appendix: Glossary Table 25: 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.
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 RS232 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.