Matrix Orbital VK204-25 Скачать руководство пользователя страница 27

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 Hex Decimal Binary Hex Decimal

0000

0

0

1000

8

8

0001

1

1

1001

9

9

0010

2

2

1010

A

10

0011

3

3

1011

B

11

0100

4

4

1100

C

12

0101

5

5

1101

D

13

0110

6

6

1110

E

14

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.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. ASCII tables are readily

available from a number of sources. A few examples will do here;

Table 12: Example of an ASCII Table

The letter

A

Has a value of

65 Decimal or

41 Hex

The letter

A

Has a value of

97 Decimal or

61 Hex

The number

0

Has a value of

48 Decimal or

30 Hex

The number

9

Has a value of

57 Decimal or

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. All such parameters must use numeric values (i.e., the actual byte values). If

we send the ASCII number 0 by mistake it will actually give the value 48 decimal (30 hex) to the parameter,

which is wrong.

In the tables given in the following sections ASCII characters are shown as ’A’, with single quotes.

Matrix Orbital

VK204-25

24

Содержание VK204-25

Страница 1: ...VK204 25 Technical Manual Revision 1 0 ...

Страница 2: ... ACK 9 2 3 General Purpose Outputs 10 3 Displaying Text 11 3 1 General 12 3 2 The Built In Character Font 12 3 3 Writing Text to the Display 13 3 4 Text Commands 13 3 4 1 Auto line wrap on 254 67 13 3 4 2 Auto line wrap off 254 68 13 3 4 3 Auto scroll on 254 81 13 3 4 4 Auto scroll off 254 82 13 3 4 5 Set cursor position 254 71 column row 14 3 4 6 Send cursor home 254 72 14 3 4 7 Turn on block bli...

Страница 3: ...aracter 254 78 c 8 bytes 19 5 1 7 Initialize large digits 254 110 20 5 1 8 Place large digit 254 35 col digit 21 6 Miscellaneous Commands 21 6 1 Command List 21 6 1 1 Clear display 254 88 21 6 1 2 Set Brightness 254 89 Brightness 21 6 1 3 Display on 254 66 minutes 22 6 1 4 Display off 254 70 22 6 1 5 General purpose output off 254 86 gpo 22 6 1 6 General purpose output on 254 87 gpo 22 6 1 7 Read ...

Страница 4: ...is responsible for what is displayed on the screen of the display The display provides a simple command structure to allow text and bar graphs to be displayed on the screen Text fonts are built in and use standard ASCII mapping Provision is made for up to 8 user defined characters The screen is luminous for low light situations Display may be turned on or off under program control Brightness is ad...

Страница 5: ...Wire the connector to the power supply On most connectors the RED lead will go to 5V and the BLACK lead to GND NOTE The Manufacturer s Warranty becomes void if the unit is subjected to over voltage or reversed polarity 3 Connect the display to the PC using the serial cable and adapter if required Make sure the RS 232 cable includes the required ground lead There must be no voltage differential bet...

Страница 6: ...language such as Basic or C will need to be written in order to issue the required command strings Most terminal programs are unable to issue the 0xFE character needed as a command prefix 1 6 Trying out a Keypad Since a number of different keypad types can be connected to the display the results may be a little unpredictable At this point all we need to do is make sure that the keypad and interfac...

Страница 7: ...ASCII character map 3 Press a key on the keypad An upper case ASCII character A Y should appear on the PC screen Different keys should generate different characters To experiment reverse the connector and see if it generates a more logical set of characters Ultimately the program in the controller will have to map these characters to the ones marked on the keypad which will likely be different 2 C...

Страница 8: ...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 Do not apply voltage to the DB 9 connector AND power connector Do not apply more than 5Vdc to pin 9 on the DB 9 connector Connector pinout is as follows Figure 3 Power C...

Страница 9: ...n it s installed in a PC The cable is wired as shown in the Figure below NOTE This connector does not provide connections for I2C 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 The 12 volt power cable is designed for use...

Страница 10: ...able 2 1 4 RS 232 Communications A standard DB 9F is provided for RS 232 communications Power may also be supplied via this con nector if desired Figure 8 RS 232 and Power Connector 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 Note that this device Matrix Orbi...

Страница 11: ...ta in Rx Tx 5 Ground gnd gnd 2 1 5 Configuring RS 232 and I2C RS 232 baud rate and I2C address are configured by means of jumpers Figure 9 RS 232 Jumpers The module is supplied with jumpers J1 and J2 installed which gives an RS 232 baud rate of 19200 and an I2C address of 0x5C RS 232 port J0 J1 J2 control baud rate RS 232 format is 8N1 8 bits no parity one stop bit I2C port J0 J1 J2 J3 sets slave ...

Страница 12: ... that bytes transition They are only capable of failing to acknowledge the bytes following the byte which was not received To fully understand the reasons for this one needs to understand something about 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 fai...

Страница 13: ...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 10 General Purpose Outputs Maximum allowable current is 20 mA which is enforced by the current limiting resistor If the dev...

Страница 14: ...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 Matrix Orbital VK204 25 11 ...

Страница 15: ...uilt 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 The display does not have provision to download other Matrix Orbital VK204 25 12 ...

Страница 16: ... 4 Text Commands In this section commands are identified by their names and decimal values 3 4 1 Auto line wrap on 254 67 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 Disables automatic line wrapping Characters beyond the end of a line will be lost 3 4 3 Auto scroll on 254 81 When auto scrolling is o...

Страница 17: ...rsor 254 84 Turns off the blinking block cursor Does not affect the underline cursor 3 4 9 Cursor left 254 76 Moves the cursor one position to the left but does not erase any character that may be in that position Note that this command moves the text insertion point even if the cursor is turned off NOTE A destructive backspace which erases the character to the left of the original position may be...

Страница 18: ...than 10 pins it should be centered on the display connector The diagram shows the logical layout row 1 column 1 in upper left The connector for the keypad is a 10 pin 0 1 spacing male header Pins 1 through 5 are columns and pins 6 through 10 are rows The keypad is scanned whenever a key is pressed there is no continuous key scan This means that key presses are dealt with immediately without any ap...

Страница 19: ...7 set and the second read will return the key code with bit 7 clear The application must take into account this bit to keep up with user key presses If there are no keypresses detected the module will return zero 0x00 4 4 RS 232 Interface By default on any press of a key the module will immediately send out the key code at the selected baud rate This behavior can be modified using commands found i...

Страница 20: ...at 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 4 Auto transmit keypresses off 254 79 In this mode up to 10 keypresses are buffered until the unit is polled by the host system via the poll keypad ...

Страница 21: ...lows users to define up to eight special characters Eight characters ASCII values 0x00 to 0x07 are set aside for use with bar graphs user defined charac ters and big numbers Since the same 8 characters are used for each function the functions may not be used simultaneously The characters may be defined or redefined at any time by issuing the commands shown in this section Once defined they may be ...

Страница 22: ...ontal bar graph in row starting at column with a length of length pixels row may have a value of 0x01 or 0x02 column may range from 0x01 to 0x14 and length may be from 0x00 to 0x64 0 to 100 if the graph can extend the full width of the screen Each column is 5 pixels wide spaces between the columns don t count dir specifies the direction 0x00 goes from left to right 0x01 goes from right to left 5 1...

Страница 23: ...haracter will be laid out as follows Table 8 Character Values 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Cursor Line NOTE Custom characters will be erased if any of the Initialize bar graph commands are issued 5 1 7 Initialize large digits 254 110 This command defines the 8 special user characters to be blocks suitable for use in ...

Страница 24: ...on 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 digit has values from 0x00 to 0x09 0 to 9 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 6 1 Command List 6 1 1 Cle...

Страница 25: ... the general purpose outputs gpo is 1 to 6 ON means that the output is pulled low ground via 240 ohms 6 1 7 Read module type 254 55 This command will return over the RS 232 interface the 1 byte model type value of the module This command will return a 1 byte hex value Values for various modules at the time of this publication are as follows Table 10 Module Values LCD0821 0x01 LCD2021 0x03 LCD2041 ...

Страница 26: ...r 0xFE 254 decimal These commands are issued on the serial communications link I2C or RS 232 at the currently defined baud rate 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 0 1 2 34 0 5 6879 4 5 6 79 in the BASIC program Or with C the user could using Zcomm serial library A B C0 D E F G 5 B C H I D7 A B C0 D E F G...

Страница 27: ...versal the American Standard Code for Information Interchange or ASCII ASCII tables are readily available from a number of sources A few examples will do here Table 12 Example of an ASCII Table The letter A Has a value of 65 Decimal or 41 Hex The letter A Has a value of 97 Decimal or 61 Hex The number 0 Has a value of 48 Decimal or 30 Hex The number 9 Has a value of 57 Decimal or 39 Hex This gives...

Страница 28: ...y up one line to make room for new line Auto scroll off FE 52 254 82 254 R Off Disables auto scroll Text will wrap to top left and overwrite existing text 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 This command moves the cursor ...

Страница 29: ... of a line it will move to the beginning of the other line 7 5 Keypad Interface Commands NOTE The letter R in the Default column indicates that this state can be saved to nonvolatile memory with the Remember command Table 15 Keypad Interface Commands Command Syntax Default Notes Auto repeat mode on FE 7E 0x00 0x01 254 126 0 1 254 0 1 Off Applies to key pad only 0x00 200 ms type matic 0x01 key down...

Страница 30: ...igh order bit set unless this is the last only key press Set debounce time FE 55 time 254 85 time 2 54 U time 52ms Resolution 1 0 6554 ms time is a numeric mul tiplier 7 6 Bar Graphs and Special Characters The commands in this section are used to define and display bar graphs and special characters Table 17 Bar Graphs and Special Characters Command Syntax Notes Initialize thick vertical bar graph ...

Страница 31: ...4 c r d length Draws a horizontal bar graph start ing at column c on row r with di rection d 0 is right 1 is left of length length Length is measured in pixels 0x00 to 0x64 if starting in column 1 User must first use the h command to initialize characters Initialize large digits FE 6E 254 110 254 n Initializes the user character set to make large digits Place large digits FE 23 col digit 254 23 co...

Страница 32: ... value for minutes is 100 Display off FE 46 254 70 254 F On Turns the display off General purpose output off FE 56 gpo 254 86 gpo 254 V gpo Turns a general purpose output OFF gpo may be from 1 to 6 General purpose output on FE 57 gpo 254 87 gpo 254 W gpo Turns a general purpose output ON gpo may be from 1 to 6 Read module type FE 37 254 55 254 7 see table Reads the module type This com mand will r...

Страница 33: ...k Non operation 593 m S2 10 mS Table 22 Electrical Specifications Supply Voltage 4 75 5 25 Vdc optional 7 15 and 7 30VDC Supply Current 220 mA typical Supply Current power up Up to 550mA inrush Table 23 Optical Characteristics Number of Characters 40 20 characters by 2 lines Matrix format 5 x 7 with underline Display Area 70 8 x 20 9mm XxY Character Size 2 4 x 4 7mm XxY Character Pitch 3 6 x 5 4 m...

Страница 34: ...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 Matrix Orbital VK204 25 31 ...

Страница 35: ...Figure 16 Physical Layout Matrix Orbital VK204 25 32 ...

Страница 36: ...ime and improved daytime readability Binary Number The data and signaling bit transmission rate of an RS232 device Bit A number written using binary notation which only uses zeros and ones Bitmap A representation consisting of rows and columns of dots of a graphics image in computer memory The value of each dot whether it is filled in or not is stored in one or more bits of data Byte A grouping of...

Страница 37: ... consecutive hex adecimal digits It is easier for humans to read hex adecimal numbers than binary numbers I2C Short for Inter IC a type of bus designed by Phillips Semiconductors in the early 1980s which is used to connect integrated circuits ICs I2C 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...

Страница 38: ...Serial Number A number that is one of a series and is used for identi fication of the module Serial Port A port or interface that can be used for serial commu nication in which only 1 bit is transmitted at a time Version Number This refers to the firmware revision number of the module Volatile Memory Temporary memory Once the power supply is turned off volatile memory is then erased Matrix Orbital...

Отзывы: