Zektop MAS7.1 Service manual

Home Theater Solutions
RS-232 Serial Protocol Reference
MAS7.1

2MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
Table of Contents
RS-232 Port Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
RS-232 Pinout and Baudrate Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
MAS7.1 Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Command Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Acknowledgement Response . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Error Response . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 4
Query Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . 5
Checksums and CRC8’s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
MAS7.1 Quick Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table of MAS7.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
A Simple Control Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Powering On / Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Controlling the Front Panel Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Reading the Current Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
MAS7.1 Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
The MAS7.1 Command Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Error Response Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Command Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
‘B’ Button Emulation . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . 10
‘DZ’ Delay Settings (*) . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
‘FPC’ Front Panel Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
‘FS’ Restore Factory Default Settings (*) . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . 13
‘IR’ Query Last IR Code Received (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
‘IRC’ Set Learnable IR Code . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . .. . . 14
‘LI’ Front Panel Light Intensities and Mode (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
‘MCS’ Multi-Channel Split . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
‘MZ’ Mute (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . 16
P’ Power Control (*) . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
‘PSM’ Primary / Secondary Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . 16
‘‘Q’ Query Status (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
‘QZ’ Query for Zone Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . 18
‘SS’ Save States (*) . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . 18
‘SZ’ Set Input (*) . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . 19
‘V’ Version Query (*) . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . 20
‘XE’ Transmit Enable Settings (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . 20
‘XS’ Control Settings (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . 21
K.I.S.S.™ Keep It Simple Serial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
The K.I.S.S.™ Command Structure Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Using Bitmapped Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using Command Checksums and CRC-8 Checkcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Clearing the Command Buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Response Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Response String Checksums and CRC-8 Checkcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Master / Slave and Asynchronous Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Master / Slave Mode of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Asynchronous Mode of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Checksums and CRC-8 Checkcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Differences between a Checksum and a CRC-8 Checkcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Source Code Example of Calculating a Checksum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Source Code Example of Calculating a CRC-8 Checkcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 3
RS-232 Port Hardware
RS-232 Pinout and Baudrate Settings
The RS-232 port on the MAS7.1 is the same format, and pinout, as a PC modem, and uses the same type of
cable as a standard serial modem would, which is a standard straight through cable. Do not use a cable that is
marked as a “Null Modem” cable.
The MAS7.1 can also be used with any USB to RS-232 conversion cable, these are all typically straight
through cables. (Be sure to install any drivers that come with the USB to RS-232 cable you are using.)
The RS-232 port is a female type DE-9 connector (sometimes mistakenly referred to as a DB-9 connector) with
the following pinout:
Pin definitions:
1 - No Connect 6 - No Connect
2 - TX 7 - No Connect
3 - RX 8 - No Connect
4 - No Connect 9 - No Connect
5 - GND
The port settings used by the MAS7.1 are:
Baudrate: 9600
Data Bits: 8
Stop Bits: 1
Parity: NONE

4MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Quick Reference
Command Syntax
The MAS7.1 serial command set uses an ASCII based protocol and a terminal emulator, like Hyperterm, can
be used to test the serial port of the MAS7.1.
Each serial command is formatted as:
CMD param1,param2,...<CR>
Where:
CMD = The name of the command.
param = Any number of parameters can follow a command.
<CR> = The carriage return character, usually the character associated with the “Enter” key.
For instance the name of the command turn power on and off is ‘P’ (must be capitalized) therefore,
to turn on the MAS7.1 send a:
P 1<CR>
to turn off the MAS7.1 send a:
P 0<CR>
the commands will not be echoed back, but instead you will receive a command response string.
Command Responses
The MAS7.1 will always respond to a command, there are no “time-out” modes, if you send a command and
don’t get a response in 100ms, something’s wrong with the connection.
There are three different types of responses: Acknowledgements, Errors and Query Strings.
The Acknowledgement Response
Every command will get either an acknowledgement or error response.
Anytime you issue a command and there are no errors, you will receive the acknowledgement response.
Which is:
+<CR><LF>
which is the ‘+’ character followed by a carriage return (hex=0Dh) and a line feed (hex=0Ah).
The Error Response
Every command will get either an acknowledgement or error response.
If something is wrong with the command, you will get an error response. Which is
!<err><CR><LF>
which is the ‘!’ followed by an error number (in ASCII), followed by a carriage return and line feed.
For instance ‘2’ is not allowed as a parameter in the ‘P’ (power) command, so:
P 2<CR>
would cause the MAS7.1 to respond with:
!2<CR><LF>
the ‘2’ being the error code for “Parameter out of range”.
For the full listing of error codes, see: “Error Response Codes” on page 9

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 5
MAS7.1 Quick Reference
Command Responses (Continued)
Query Strings
A query string is a command string that you would normally send to the MAS7.1, proceeded by the ‘=’ charac-
ter, and with the parameters filled in to reflect the current state of the command. Commands return a query
string when a ‘?’ is used as a parameter.
For instance to find the current power on / off state of the MAS7.1 send:
P ?<CR>
and, assuming the power is on, it will respond with:
+<CR><LF>
=P 1<CR><LF>
The ‘+’ is the acknowledgement, indicating there were no errors in the command, the next line is the power
command’s current setting, the ‘1’ indicates the power is turned on.
You can setup the MAS7.1 to send query strings when something changes, for instance when the power is tog-
gled. See: “Master / Slave and Asynchronous Modes of Operation” on page 27
Checksums and CRC8’s
You can optionally append a checksum or a CRC8 checkcode to the end of any serial command and it will be
tested by the MAS7.1. If the checksum or CRC8 checkcode does not match, the command will be rejected with
a “!4” error response.
To add a checksum to a command, append a ‘;’ followed by the calculated checksum. For instance to turn on
the MAS7.1 using a checksummed command:
P 1;220<CR>
To add a CRC8 checkcode to a command, append a ‘:’ followed by the CRC8 checkcode. For instance to turn
on the MAS7.1 using a CRC8 checkcoded command:
P 1:221<CR>
By setting the proper control flags, you can also have the MAS7.1 append a CRC8 checkcode or a checksum
to all of its response strings. See: “‘XS’ Control Settings (*)” on page 21.
For more information on checksums and CRC8 checkcodes, and how they’re calculated, see: “Checksums
and CRC-8 Checkcodes” on page 28.

6MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Quick Reference
MAS7.1 Quick Command Reference
The quick reference tables and command descriptions refer to Inputs, Zones (or outputs) and Channels.
Inputs = The number of inputs a switch has. The MAS7.1 is a 3x1 switch and has 3 Inputs.
Zones = Number of Zones, or outputs, a switch has. The MAS7.1, a 3x1 switch, has 1 Zone.
Channels = The breakaway channels. These are signals that can be switched independently of each other.
They are referred to in the commands by a single letter.
The MAS7.1 has 4 channels:
M - Multichannel audio (the 5.1 audio connections).
A - Analog audio (the L&R stereo connections).
D - Digital audio.
H - HDMI video.
Some notes on using the tables:
• Each command is followed by a <CR> (not shown in the tables).
• The ‘Command’ column shows the syntax of the commands. The values in italics are variables and are
described in the ‘Comments’ column. The non-italic characters are literals and should be used as shown.
• Many commands allow a variable number of arguments, the examples shown here are common usages
of the commands, for more details refer to the complete command reference.
• All command names are case sensitive. The parameters used in commands are not case sensitive.
• Most commands can be queried by replacing their parameters with a ‘?’ character.
• The MAS7.1 is a 3x1 switch and has only one output zone. The command set used by the MAS7.1 is
designed to be compatible with our line of matrix switches, to make writing a “universal Zektor device
driver” easier. Because of this, many of the commands require you to supply an output zone, and for the
MAS7.1, the value can only be ‘1’.
The commands in this table that are marked with a ‘x’ in the ‘U’ column are universal throughout most of the
Zektor product line. By using only these commands a Zektor universal driver can be more easily written.
Table of MAS7.1 Commands
UCommand Description Comments
xPpPower control p=power state (0=off, 1=on, +=toggle).
xSZ1,nSet zone to input 1=Zone, n=Input (1-3,+,-).
xSZ1,Mn,An,Dn,HnSet inputs w/breakaway 1=Zone, n=Inputs (1-3,+,-). M=Multichannel, A=Stereo, D=Digital, H=HDMI
xMZ1,mMute zone 1 Mutes everything. 1=Zone, m=Mute (0=Normal, 1=Muted, +=Toggle).
xMZ1,Mm,Am,Dm,HmMute w/breakaway Mutes only the given chans. 1=Zone,m=Mute (0,1,+), M=Multi, A=Stereo, D=Digital, H=HDMI
xDZ1,Md,Ad,Dd,HdSet delays Set delay times for each chan. 1=Zone, d=Delay (in ms). M=Multi, A=Stereo, D=Digital, H=HDM
x V ? Get version string Returns: Product name and firmware version string.
xLImode,dim,bri Sets LED intensities mode=Mode (0=off, 1=dim, 2=bright, 3=auto), dim=Dim level (0-99), bri=Bright level (1-100).
x Q ? Query for status Returns: Operating status flags (see text).
x QZ ? Query for no. of zones & inputs Returns: Number of zones, number of inputs, and breakaway channel options.
x IR ? Read last IR code Returns: Last IR code received.
IRC cmd,ircode Set (learn) an IR code cmd=Command being set (see text), ircode=New IR code for command.
B b,b,... Emulate button presses b=Button Codes (up to 16 codes per ‘B’ command, see text).
x SS n,$ Save current settings Save current settings in EEPROM. n=Settings to save (see text).
x FS 246,$ Reset to factory settings Resets everything back to their factory default settings!
x XS flags Control settings Set / reset control options. flags=Control option flags (see text).
x XE flags Transmit enable flags Enable commands to asynchronously send there status . flags=Enable flags (see text).
FPC pri,sec,sync Front panel control pri=Primary setting (1-3,+), sec=Secondary setting (1-3,+), sync=Sync setting (0,1,+).
PSM flags Primary / secondary mapping Maps channelsto the primary or secondary buttons. flags=Map flags (see text).
MCS flags Multichannel split Maps split between multichannel and analog stereo connections. flags=Split flags (see text).

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 7
MAS7.1 Quick Reference
MAS7.1 Quick Reference (Continued)
A Simple Control Example
If you’re not looking to write a driver that will control this and all Zektor products, then here is an example of a
couple of commands that will most likely do everything you’ll need in a simple installation.
<CR> = A Carriage Return, all commands end with a <CR>.
<CR><LF> = A Carriage Return, Line Feed, all responses end with a <CR><LF>.
Powering On / Off
To power on the MAS7.1 issue the following command:
P 1<CR>
To power off the MAS7.1 issue this command:
P 0<CR>
Controlling the Front Panel Settings
To simulate the pressing of a Primary Button:
FPC pri<CR>
Where:
pri = A number between 1 and 3 indicating which primary button you’re pressing.
If the Sync LED is lit, the both the primary and secondary LEDs will change, if it is not lit, only the primary LEDs
will change, similar to pressing the front panel buttons 1-3.
To sequence through the inputs:
FPC +<CR>
The ‘+’ can be used in many cases to sequence or toggle a value. To sequence in the opposite order, use the
‘-’ character.
To simulate the pressing of a Secondary Button (S1 - S3):
FPC ,sec<CR>
Where:
sec = A number between 1 and 3 indicating which secondary button you’re pressing.
If the Sync LED is lit, the both the primary and secondary LEDs will change, if it is not lit, only the secondary
LEDs will change, similar to pressing the front panel buttons: S1-S3.
To simulate the pressing of the Sync Button:
FPC ,,+<CR>
This command will toggle the Sync LED on and off, similar to pressing the front panel ‘Sync’ button.

8MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Quick Reference
A Simple Control Example (Continued)
To turn on the Sync LED:
FPC ,,1<CR>
and to turn off the Sync LED:
FPC ,,0<CR>
To set the primary selection to 2, the secondary selection to 1, and to turn off the SYNC LED:
FPC 2,1,0<CR>
Reading the Current Settings
To query the MAS7.1 for its current state, use the ‘?’ as the only parameter and the MAS7.1 will respond with a
‘=’ followed by the command with the current settings as parameters.
To read the power on state of the MAS7.1
P ?<CR>
the MAS7.1 will respond with
+<CR><LF> This indicates the command was accepted with no errors
=P 1<CR><LF> This indicated the MAS7.1 is currently ON
To read the front panel settings:
FPC ?<CR>
the MAS7.1 will respond with:
+<CR><LF> Command accepted
=FPC 2,1,0<CR><LF> Indicates the primary is 2, the secondary is 1, and the SYNC LED is OFF

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 9
MAS7.1 Command Reference
The MAS7.1 Command Set
Examples are given for many of the ways a command can be issued. Most commands have a ‘set’ mode for
changing a parameter value, and a ‘query’ mode for reading the current value.
If the command has a query mode, the associated response string, it will be listed.
As described in the section on the K.I.S.S.™ protocol, whitespaces and commas are optional in many cases.
The format used here includes a single space after the command and commas, with no spaces, between
parameters. The format given here does not show the optional checksum or CRC-8 checkcodes that may be
appended to all commands, nor does it show the required <CR> that terminates all commands.
The response strings are the strings returned from MAS7.1, which use the same format as described above.
The format does not show the optional checksum or CRC-8 checkcodes that may be appended to all response
strings if enabled, nor does it show the <CR><LF> that terminates all Response Strings.
Error Response Codes
The following are the Error Response codes that can be returned by the MAS7.1:
!1 Unrecognized command.
!2 A parameter was out of range.
!3 Syntax error, a badly formed command.
!4 Checksum or CRC-8 error.
!5 Too many or too few parameters.
!6 Device busy, cannot process command.
!7 Buffer overflow.
And some more detailed descriptions of their meanings:
Error 1: The command given was not recognized as a MAS7.1 command. Commands are case sensitive and
in the MAS7.1, all commands are upper case.
Error 2: One of the parameters given was too large, or too small, the command will be ignored.
Error 3: Something was wrong with the command's syntax. There was possibly extra data at the end of the line,
or non-decimal data as part of a parameter. There cannot be whitespace before or after a checksum or CRC-8
checkcode, or this error will be returned.
Error 4: The ';' or ':' character was used to indicate a Checksum or CRC-8 Checkcode was appended to the
command string, but the Checksum or CRC-8 Checkcode did not match the calculated one. The command will
be ignored.
Error 5: The number of parameters given does not match the number allowed by this command.
Error 6: To prevent conflicts between the front panel Setup Mode and the serial port settings, when the MAS7.1
is in the Setup Mode, many parameters become read only and any attempt at writing them will return Error 6.
Issuing the “Button Emulation” command with button code ‘0’ can be used to exit the Setup Mode, at which
point the command can be re-issued without an Error 6 response.
Error 7: An internal buffer has overflowed, for instance more than 16 button codes were sent as part of the
“Button Emulation” command.

10 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
Command Definitions
The commands are defined in alphabetical order.
(*) In an effort to make “Zektor Universal Drivers” easier to write, Zektor has adopted a subset of “Universal
Commands”. By using only these commands, it should be possible to write a driver that works with all Zektor
products. Reducing the effort of writing drivers for multiple Zektor products. The commands that are part of the
Universal Command Set will be marked with a (*).
‘B’ Button Emulation
This command allows access to the internal keyboard handling of the MAS7.1, and is very hardware depen-
dent. Button values returned by the MAS7.1 may and most likely will be different than button values returned
by other Zektor devices.
Each button generates a value upon being pressed, and a different value upon release.
The Power toggle button also generates a unique value when held for 4 seconds, which is used to enter the
setup mode. Other combinations may also generate unique codes.
This command allows the controller to detect front panel button presses even when the front panel is disabled.
This allows the controller very tight control over the MAS7.1. By disabling the front panel (see: “‘XS’ Control
Settings (*)” on page 21), and by then processing the front panel button presses of the MAS7.1, the user can
redefine the operations of the MAS7.1.
When used in combination with the “Read Last IR Code” command, even IR commands can be handled by the
user, outside the MAS7.1’s firmware.
Because of the tight link between this command and the MAS7.1’s firmware, there are some caveats when
using this command. The Zektor firmware expects a button press code to always be followed by a button
release code. Sending these codes out of logical order will not harm the MAS7.1, but may result in unpredict-
able behavior (buttons codes ignored, or unexpected state changes).
B b1,bn... Send one or more button codes to the MAS7.1.
B ? Query for any buffered button presses.
BQuery for any buffered button presses.
Response String:
=B b1,bn...
Where:
b1,bn.. = A variable number of button codes (1 to 16 codes per command).
In the Master / Slave mode, only the last 16 button presses will be logged between queries, after that, new but-
ton presses overwrite the old ones in the internal buffer and will be lost to the controller.
The maximum number of button codes that can be sent is 16. If more than 16 button codes are sent a “param-
eter count error” will be returned and only the first 16 button codes will be accepted.

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 11
MAS7.1 Command Reference
‘B’ Button Emulation (Continued)
The Button Codes for the MAS7.1 are defined as follows:
Button Press Code Release Code
Power Toggle 1 9
1210
2311
3412
S1 5 13
S2 6 14
S3 7 15
SYNC 8 16
The “Press Code” is the value returned when a button pressed, and the “Release Code” is the value returned
when a button is released.
There are also a small number of codes that are unique to this command that cannot be generated by the key-
board. These extended codes allow for better control of the MAS7.1.
Some extended button codes are:
Code Description
0 When Issued: Exits any setup modes.
0 When returned by query: No buttons have been pressed since last the query.
100 Always toggle power (like ‘Power Toggle’ without the need of a release code).
101 Discrete power on (always turns on power).
102 Discrete power off (always turns off power).
103 Sequence through inputs.
104 Sequence through secondary inputs.
105 Turn SYNC on.
106 Turn SYNC off.
The ‘0’ code has special meaning. When returned in a Query Response string it means there are no keys wait-
ing in the buffer. When issue by the user, it acts like an exit key, used to exit setup modes, similar to pressing
the Power Toggle button, but it will be ignored if the MAS7.1 is not in a setup mode. By issuing ‘0’ codes, the
MAS7.1 can be returned to a known state, regardless of any possible setup state it might be in.
The ‘0’ button code is also device independent. Its use, and value, does not change between Zektor devices
like the other codes may (and most likely will).
‘DZ’ Delay Settings (*)
Allows setting of the switching delays. Switching delays refer to the amount of time the channel is muted when
switching from one input to another. This is sometimes called “Fade to Black” even though there is no “Fading”
involved. When switching from one channel to another, the MAS7.1 will mute the channel for a programmable
amount of time. For instance if the digital audio section is set to 200ms, then anytime the digital audio section
is switched, the digital audio will be muted for 200ms before being switched to the new channel. Each of the
channels operate independently and different times can be set for each of the channels.
Some receivers can “thump” if their digital audio is switched too fast, switching delays can help prevent this.
Some HDMI monitors require much longer than the 100ms required by the HDMI standard, setting the HDMI
switching delay can help with these monitors.
If the MAS7.1 is being used to switch component video, a delay that’s long enough to allow the monitor to
detect a signal loss, can prevent the “rolling” that sometimes occurs when switching component video.

12 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
‘DZ’ Delay Settings (Continued)
Matrix switches (switches with more than one zone) can have each zone set independently. The MAS7.1 has
only one zone. For compatibility with multi-zoned switches, the zone must be specified and must be ‘1’.
DZ 1,Mnn,Ann,Dnn,Hnn,$ Set new settings
DZ ? Query for current settings
Response String:
=DZ 1,Mnn,Ann,Dnn,Hnn
Where:
1 = Zone (Must be ‘1’).
Mnn = Multichannel switching delay in millisecond increments (nn=Number of milliseconds).
Ann = Analog audio switching delay in millisecond increments (nn=Number of milliseconds).
Dnn = Digital audio switching delay in millisecond increments (nn=Number of milliseconds).
Hnn = HDMI switching delay in millisecond increments (nn=Number of milliseconds).
$ = Optional, but if present settings are backed up in EEPROM.
The ‘M’, ‘A’, ‘D’ and ‘H’ characters are literals and are used to indicate which delay is being set. If no prefix is
used, all channels will be set to the given delay.
The ‘nn’ is a variable and indicates the delay time in milliseconds.
Not all parameters have to be present, and they do not have to appear in any particular order. For instance to
set only the digital audio delay to 200ms:
DZ 1,D200
To set the analog audio (the L&R inputs) to use a 100ms delay, and the multitchannel audio (the 5.1 audio) to
use a 200ms delay:
DZ 1,A100,M200
‘FPC’ Front Panel Control
This command is specific to the MAS7.1 and is used to control the front panel directly.
FPC pri,sec,sync
Response String:
=FPC pri,sec,sync
Where:
pri = Setting of the primary LEDs that are labeled 1-3. Value = 1-3.
sec = Setting of the secondary LEDs that are labeled S1-S3. Value = 1-3.
sync = Setting of the SYNC LED. Value = 0 or 1.
To sequence through inputs, or toggle the SYNC LED you can use the ‘+’ and ‘-’ characters in place of the ‘pri’,
‘sec’ and ‘sync’ settings.
To simulate the pressing of the 3 button:
FPC 3
If the Sync LED is lit, the both the primary and secondary LEDs will change, if it is not lit, only the primary LEDs
will change, similar to pressing the front panel buttons 1-3.

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 13
MAS7.1 Command Reference
‘FPC’ Front Panel Control (Continued)
To sequence through the primary inputs:
FPC +
To simulate the pressing of the S2 Button:
FPC ,2
If the Sync LED is lit, the both the primary and secondary LEDs will change, if it is not lit, only the secondary
LEDs will change, similar to pressing the front panel buttons: S1-S3.
To simulate the pressing of the Sync Button, use the toggle option:
FPC ,,+
This command will toggle the Sync LED on and off, similar to pressing the front panel ‘Sync’ button.
‘FS’ Restore Factory Default Settings (*)
To restore the MAS7.1 to its factory default settings:
FS 246$
This will set everything back to the programmed factory settings. This includes timings, IR codes (all learned
IR codes will be lost), front panel LED intensity settings, etc. Everything, means everything!
‘IR’ Query Last IR Code Received (*)
This command allows the user to read the values returned by Zektor’s IIR™ (Intelligent Infra-Red) decoding
firmware. Zektor’s IIR™ algorithm converts all IR codes it receives to a compressed, 72 bit value.
Each different key press of a remote control will generate a different but repeatable pattern.
This command returns a value for every IR code detected by the front panel IR sensor (or IR jack if enabled),
regardless as to whether the IR code detected was used to control the MAS7.1.
The uses for this command are two fold:
1. The value returned from this command are the same values used to teach the MAS7.1 new IR codes
over the serial port. (See the “Set Learnable IR Command Codes” command).
2. This command gives the controller full access to the MAS7.1’s IR sensor and Zektor’s IIR™ algorithm.
This is a very reliable way of adding IR control to any project. The IR codes generated by Zektor’s IIR™
algorithm are immune to timing differences between universal remote control manufacturers and to the
timing errors associated with condition of the remote control’s battery.
Note 1: The Zektor’s IIR™ algorithm works with any remote control code that is time modulated. This is pretty
much every type of IR code except the Phillips RC-5, and RC-6 codes.
Note 2: Because very few controllers could handle a 72 bit decimal value, and in an effort to keep the size of
the IR response small, this command sends the 72 bit IR code as an 18 digit hexadecimal value.
The format of the command is:
IR ? Query for the IR code of the last IR command received.
Response String:
=IR ircode
Where:
ircode = 18 hex digits (0-9, A-F), representing the most recent IR code received.
This command returns a single digit ‘0’ if there are no IR codes waiting to be read.

14 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
‘IRC’ Set Learnable IR Code
This command is used to set, or retrieve, the current IR codes associated with the learnable IR commands.
This could be useful for “cloning” the IR codes learned in one MAS7.1 into another MAS7.1.
IRC ircmd,ircode Set the ‘ircmd’ to use the IR code ‘ircode’.
IRC ircmd,? Query for a single IR command.
IRC ? Query for all ‘ircmd’ settings.
Response String:
=IRC ircmd,ircode
Where:
ircmd = IR command number being set / retrieved (See Table).
ircode = 72 bit (18 hex digits) IR code (See: “IR” command).
The value ‘ircmd’ refers to the IR commands that the MAS7.1 is able to learn, they are:
IRCmd Description
1 Toggle Power
2 Select Input 1
3 Select Input 2
4 Select Input 3
5 Select Input S1
6 Select Input S2
7 Select Input S3
8 Toggle SYNC
9 Discrete Power On
10 Discrete Power Off
11 Sequence through inputs
12 Sequence through secondary inputs
13 Turn on SYNC LED
14 Turn off SYNC LED
Setting an ‘ircmd’ to ‘ircode = 0’, causes that command to no longer respond to IR.
IR codes are always saved in EEPROM.
‘LI’ Front Panel Light Intensities and Mode (*)
Set the mode, dim and bright levels of the front panel LEDs:
LI mode,dim,bright Set the MODE, DIM, and BRIGHT.
LI mode,dim,bright,$Set levels, and backup settings in EEPROM.
LI ? Query for current settings.
Response String:
=LI mode,dim,bright
Where:
mode = MODE setting.
dim = DIM level setting.
bright = BRIGHT level settings.

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 15
MAS7.1 Command Reference
‘LI’ Front Panel Light Intensities and Mode (Continued)
Where ‘mode’ settings are:
0 = Turn off front panel lights.
1 = Front panel lights are always at dim level.
2 = Front panel lights are always at bright level.
3 = Front panel lights auto-dim after 4 seconds.
The dim and bright intensities range from 0=Off, to 100=Maximum brightness.
If the levels are set, but the ‘$’ suffix is not used, the levels the new levels will not be restored after a power fail-
ure. The ‘$’ suffix is used to backup the new settings in EEPROM, which will be restored after a power failure.
‘MCS’ Multi-Channel Split
The split between the multichannel connections and the analog audio connection is usually between the 5.1
connectors and the L & R stereo connectors, but this can be changed.
MCS flags Set the multichannel / analog audio split.
MCS flags,$ Set the multichannel / analog audio split, backup settings in EEPROM.
MCS ? Query for the current settings.
Response String:
=MCS flags
Where ‘flags’ is a bitmapped parameter defined as:
LF - Left Front connector
RF - Right Front connector
SUB- Subwoofer connector
CEN - Center channel connector
LR - Left Rear connector
RR - Right Rear connector
L - Left stereo audio connector
R - Right stereo audio connector
This command uses a bitmapped parameter. See: “Using Bitmapped Parameters” on page 24.
Each bit represents the mapping for one connector, as defined in the above table.
If a bit is set to a one, the corresponding connector is mapped to the multichannel audio channel and an fol-
lows the breakaway option of the ‘M’ channel.
If the bit is set to a zero, the connector becomes part of the analog audio channel and follows the breakaway
options of the ‘A’ channel.
The ‘Decimal Value’ in the table’s header, refers to the values added together to create the decimal parameter
used by the command. For instances if you only wanted the ‘CEN’ and ‘SUB’ to be considered part of the “mul-
tichannel audio”, then only those bits would be set to one, and the rest of the bits set to zero. The parameter
value would be calculated as: 8+4, making the parameter value: 12.
The command to directly map the ‘CEN’ and the ‘SUB’ connectors to multichannel audio, and set the rest of
the connectors to the analog audio channel would be:
MCS 12
If the settings are changed, but the ‘$’ suffix is not used, the new settings will not be restored after a power fail-
ure. The ‘$’ suffix is used to backup the new settings in EEPROM, which will be restored after a power failure.
Decimal Value +128 +64 +32 +16 +8 +4 +2 +1
Bit Position 7
Connector Name R L RR LR CEN SUB RF LF
FactorySetting00111111

16 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
‘MZ’ Mute (*)
This command is used to mute the outputs of the MAS7.1, either all at once, or just selected channels.
To mute or unmuted outputs:
MZ 1,mMute or unmute everything
MZ 1,Mm,Am,Dm,HmMute or unmute selected channels
Response String:
=MZ 1,Mm,Am,Dm,Hm
Where:
1 = Zone, must be 1.
m= Mute value, 0=Normal (unmute), 1=Mute.
Mm= Mute or unmute the multchannel audio channel.
Am= Mute or unmute the analog audio channel.
Dm= Mute or unmute the digital audio channel.
Hm= Mute or unmute the HDMI video channel.
The ‘M’, ‘A’, ‘D’ and ‘H’ characters are literals and are used to indicate which channel is being muted. If no pre-
fix is used, all channels will be affected.
The ‘m’ is a variable and indicates the mute setting (0=Not muted, 1=Muted).
Not all parameters have to be present, and they do not have to appear in any particular order. For instance to
mute only the digital audio:
MZ 1,D1
To mute the analog audio (the L&R inputs) and unmute the multitchannel audio (the 5.1 audio):
MZ 1,A1,M0
P’ Power Control (*)
Turn on / off, or toggle the power state of the MAS7.1:
P 0 Turn off power
P 1 Turn on power
P + Toggle power
P ? Query for current setting
Response String:
=P n
Where:
n= Current power status, 0=Off, 1=On.
‘PSM’ Primary / Secondary Mapping
This command allows you to map which channels switch with the primary buttons (1-3) and which channels
switch with the secondary buttons (S1-S3).
PSM flags
PSM flags,$
Response String
=PSM flags

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 17
MAS7.1 Command Reference
‘PSM’ Primary / Secondary Mapping (Continued)
Where ‘flags’ is a bitmapped parameter defined as:
DA - Digital audio
AA - Analog audio (Stereo)
MA - Multichannel audio (5.1)
HD - HDMI video
This command uses a bitmapped parameter. See: “Using Bitmapped Parameters” on page 24.
Each bit represents the mapping for one channel, as defined in the above table.
If a bit is set to a one, the corresponding channel is mapped to the primary selection buttons.
If a bit is set to a one, the corresponding channel is mapped to the primary selection buttons.
The ‘Decimal Value’ in the table’s header, refers to the values added together to create the decimal parameter
used by the command. For instances if you only wanted the ‘MA’ and ‘AA’ to be considered part of the primary
selection, then only those bits would be set to one, and the rest of the bits set to zero. The parameter value
would be calculated as: 4+2, making the parameter value: 6.
The command to map only the ‘MA’ and the ‘AA’ channels to the primary buttons, and to backup the new set-
tings in EEPROM, would be:
PSM 6,$
If the settings are changed, but the ‘$’ suffix is not used, the new settings will not be restored after a power fail-
ure. The ‘$’ suffix is used to backup the new settings in EEPROM, which will be restored after a power failure.
‘‘Q’ Query Status (*)
In the Master / Slave mode of operation, (see: “The Master / Slave Mode of Operation” on page 27), this com-
mand is used to poll for any pending state changes that are waiting to be read. By issuing this command and
testing the returned bitmapped value, the controller can determine what has changed in the MAS7.1 since the
last time it was polled.
This command allows the controller to quickly poll the MAS7.1, using only one command, instead of issuing a
string of commands to check if the power state has changed, or if a new input has been selected, a button
pressed, etc. The Query Status command is used to determine if anything has changed, and then based on the
results of the Query Status, only the query commands needed are issued to read the new states of the
MAS7.1.
Once the new state is read by issuing the proper query command, the associated flag will be reset.
Q ? Query for current flag values
Response String:
=Q flags
Decimal Value +128 +64 +32 +16 +8 +4 +2 +1
Bit Position 7
Connector Name HD MA AA DA
FactorySetting00000100

18 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
‘Q’ Query Status (Continued)
Where ‘flags’ is a bitmapped parameter:
PWR- 1=Power State has changed.
SEL - 1=Selection (Input / Output Mapping) has changed.
BTN - 1=One or more buttons have been pressed.
IRR - 1=A new IR code has been received.
LMI - 1=Lighting Mode or Intensity Level Settings have changed.
CTL - 1=Control Settings have changed.
DLY - 1=Switching delays have changed.
MUT- 1=Mute settings have changed.
FPC - 1=Front panel settings have changed.
PSM- 1=Primary / secondary mappings have changed.
This command uses a bitmapped parameter. See: “Using Bitmapped Parameters” on page 24.
‘QZ’ Query for Zone Information
Returns the number of Inputs, Zones, and Breakaway channels.
QZ ? Query for number of Inputs, Zones, and Breakaway channels
Response String:
=QZ inputs,zones,breakaway_opt_1,breakaway_opt_n,...
Where:
inputs = Number of inputs.
zones = Number of zones.
breakaway_opt_x = A variable number of breakaway options.
This command is used to determine the number of inputs, zones, and the different breakaway options available
to a device.
Its response string is static (it always returns the same string).
For a MAS7.1, the response string will always read:
=QZ 3,1,H,M,D,A
Which indicates 3 Inputs, 1 Zone, and the Breakaway options H,M,D,A.
‘SS’ Save States (*)
Backs up the current states of the MAS7.1 in EEPROM.
EEPROM is a type of memory that retains its data even when power is disconnected from the MAS7.1.
There are two types of data that this command can save in EEPROM.
The first is that data that is associated with all commands that can have a ‘$’ suffix added to them.
The second option is the power on state. By default, when power is first applied to the MAS7.1, it power on in
the standby mode. If the power button it pressed, it powers itself on, with all channels pointing to input 1. This
default behavior can be changed using this command.
Decimal Value +512 +256 +128 +64 +32 +16 +8 +4 +2 +1
Bit Position 9876543210
Name PSM FPC MUT DLY CTL LMI IRR BTN SEL PWR

MAS7.1 Supplemental Guide, Rev 1.1, 9/28/07 19
MAS7.1 Command Reference
‘SS’ Save States (Continued)
Command format:
SS states,$ Backup the selected states into EEPROM
Where:
states = States to backup.
1 = Backup the current configuration as the new power on settings.
2 = Backup all unsaved data from commands that can be suffixed with a ‘$’.
3 = Backup all unsaved data and save new power on settings.
This command can be use to delay the saving of data in commands that can have their data saved in
EEPROM.
For instance the LED mode settings can be changed using:
LI 3
This command will set the MAS7.1 to have its LED on bright all the time, but because the command was not
suffixed with the ‘$’ character, the setting is only valid until power is disconnected from the MAS7.1. Once
power is restored the settings used will be those that were previously saved in EEPROM.
To save the new LI settings you can issue the LI command with just a ‘$’
LI $
Or you can use the ‘SS’ command to save all unsaved data, which will include the LI setting:
SS 2,$
The ‘SS’ command is also used to change the initial power on settings.
For instance if when initially plugged in, you want the MAS7.1 to turn itself on and switch to input 2, you can:
P 1 Turn on the MAS7.1
SZ 1,2 Switch to input 2
SS 1,$ Save the current configuration as the new power on settings
‘SZ’ Set Input (*)
This is the command used to change inputs on the MAS7.1 in a Zektor universal way, meaning that this com-
mand will work on Zektor matrix switches as well as the MAS7.1. Using this command the MAS7.1 is treated
as a 3 input, 1 zone matrix switch.
SZ 1,in Switch all channels to new input
SZ 1,Min,Ain,Din,Hin Switch the breakaway channels’ inputs
SZ ? Read the current settings
Response String:
=SZ 1,in or,
=SZ 1,Min,Ain,Din,Hin
Where:
1 = Zone, must be 1.
in = Input 1-3.
M = Mutlichannel audio channel.
A = Analog audio (L & R stereo) channel.
D = Digital audio channel.
H = HDMI video channel.

20 MAS7.1 Suplemental Guide, Rev 1.1, 9/28/07
MAS7.1 Command Reference
‘SZ’ Set Input (Continued)
The command has two modes of operation, a non-breakaway and a breakaway mode.
If no breakaway channels are specified then it’s assumed all channels are to be switched, for instance:
SZ 1,3
will set everything to input 3
Whereas:
SZ 1,A3,D1,H2
will switch the analog audio ‘A’ to input 3, the digital audio ‘D’ to input 1 and the HDMI video ‘H’ to input 2.
When a response string is requested:
SZ ?
The response will depend upon the breakaway settings, if all of them are the same (like the first example) then
only the input will be returned. For instance the first example would return:
=SZ 1,3
If breakaway is in effect (different channels point to different inputs), then they will be listed separately. For
instance, assuming the Multichannel audio is currently switched to ‘2’, the second example would return:
=SZ 1,M2,A3,D1,H2
‘V’ Version Query (*)
Query for the current firmware version of the MAS7.1.
V ? Request version string
VRequest version string
Response String:
=V MAS7.1 firmware_ver firmware_serial_number
Where:
firmware_ver = Version number of the MAS7.1’s firmware.
firmware_serial_number= Internal serial number (does not match the product’s serial number).
‘XE’ Transmit Enable Settings (*)
In the Asynchronous mode of operation, the MAS7.1 will transmit state changes as they occur. This command
allows individual control over which state changes will be transmitted.
This MAS7.1 allows control over the following states:
• Power State changes (On / Off condition).
• Selection changes (input / output mapping changes).
• Front Panel modes and intensity changes
• Front Panel Button Presses.
• IR codes received.
• New IR codes learned.
• Control Settings changes.
Each of the above states can be selectively set to asynchronously transmit their state changes, or run in the
Master / Slave mode. If asynchronous transmit has been disabled for one of the options, then that option will
revert to the Master / Slave mode.
Table of contents