Extron Electronics Matrix 200 User Manual

Page 93

Advertising
background image

Extron • Matrix 200 • User’s Manual

Appendix B • Programming Guide

Advanced Instruction Set Command Structure

All advanced commands follow the same pattern:

1.

Command Specifier

2.

Data (if any)

3.

Checksum

4.

End of Transmission Mark

Command Specifier

The command specifier consists of one byte for short commands or two bytes for
long commands. The first byte is the Command Code (CMD) in the range 20 hex
thru 7F hex. The second byte of long commands is called the Subcommand
(SCMD) and is treated as data (ranging from 80 hex to FF hex). A list of
supported commands and detailed explanation are given later in this section.

Data

If present, data quantifies the commands. Their format is command-specific.
Data is the useful part of the information exchange - i.e., the reason for sending
and receiving commands. Data is in hexadecimal values, and bit 7 is always a
“1”, that is, the data bytes include 80h, plus 7 bits of information.

Checksum

The checksum (Cks) is a 2-byte field used to verify the integrity of the data that
precedes it. The Matrix is shipped with jumper (JMP3) installed to disable the
Checksum requirements. See page 2-7 to enable the Checksum feature.

_______ When Checksum is disabled, the Cks1 and Cks2 bytes must still be included.

They must each be data bytes (have a value between 80h and FFh).

The Checksum is built according to the following procedure:*

1. The binary sum (2-bytes wide) is calculated for all transmitted bytes starting

with the command code and ending with the byte preceding the checksum.
For example: The sum of transmitted bytes is A2B7h (41,655d), which
translates to:

1010 0010 1011 0111

(binary)

2. Bits 15 and 14 (2 most significant bits) of the above sum are dropped.

1010 0010 1011 0111

leaving

10 0010 1011 0111

3. Remaining 14 bits are split into two 7-bit fields.

Most significant remaining 7 bits

= 100 0101b (45h) (69d)

Least significant remaining 7 bits

= 011 0111b (37h) (55d)

4. The 7-bit fields are padded with a “1” in the most significant bit (MSB) position,

thus creating two “data type” bytes. The byte containing the most significant
bits of the sum (Cks1) is transmitted first, followed by Cks2 containing the
least significant bits (LSB).

Cks1 = 1100 0101b = C5h (197d)

Cks2 = 1011 0111b = B7h (183d)

* where ‘h’ is hexadecimal, ‘d’ is decimal, and ‘b’ is binary

End of Transmission

This is always the single character EOT (04 hex).

B-5

Decimal calculation of
Cks1 and Cks2:

1. Calculate the
Cks_remainder of the (sum
of transmitted bytes)/
16,384d. As an example,
where the sum of transmitted
bytes is 41,665d (A2B7h),
41,655/16,384 = the quotient
of 2 with the Cks_remainder
of 8,887d.

2. Cks1 = the quotient of
(Cks_remainder/128d) +
128d. In our example, Cks1
is (8,887/128) + 128 = the
quotient of 69 + 128 = 197d
(C5h).

3. Cks2 = the remainder of
(Cks_remainder/128d) +
128d. In our example, Cks2
is (8,887/128) + 128 = the
remainder of 55 + 128 =
183d (B7h).

4

Advertising
This manual is related to the following products: