This document contains technical information relating to computer control of the Biamp
Advantage SPM522D Stereo Preamp/Mixer. This information is intended for advanced
users - in particular for those who wish to develop their own computer programs to
control the SPM522D. It is assumed that the reader is an experienced programmer and
has some familiarity with standard programming practices, binary and hexadecimal
numbers, the ASCII character set, asynchronous serial data communications, and RS-232
interfaces.
Hexadecimal, ASCII-Hex, and "Pseudo-Hex" Numbers
Throughout this document, hexadecimal numbers shall be represented by preceding the
number with "0x". For example: the hexadecimal equivalent of the decimal number 255
is 0xFF.
Individual ASCII characters, except control characters, will be enclosed in single quotes.
For example: the ASCII character 'A' has the hexadecimal value 0x41. The ASCII
"carriage return" control character shall be represented as . An ASCII code chart is
included with this document for your convenience.
When an 8-bit binary data value is being transmitted over a serial data communications
link, it is a common practice to transmit the byte as two "ASCII-hex" characters - one
character represents the most significant nibble of the data value and the other character
represents the least significant nibble (a nibble is 4-bits; half of a byte). Each ASCII-hex
character is in the range of '0' thru '9' or 'A' thru 'F' (from the ASCII code chart, 0x30 thru
0x39 or 0x41 thru 0x46). For example, the hexadecimal equivalent of the decimal
number 61 is 0x3D. To transmit this in an ASCII-hex format, first transmit the ASCII
character '3' (whose hex value is 0x33), followed by the ASCII character 'D' (whose hex
value is 0x44). This is the standard way to transmit an ASCII-hex value. In some cases,
the lower case characters 'a' thru 'f' (0x61 thru 0x66) are accepted in addition to the upper
case letters 'A' thru 'F'.
The Advantage SPM522D does not utilize standard ASCII-hex format. The SPM522D
computer commands implement what I call "pseudo-hex" notation (also sometimes
referred to as a "poor man's" ASCII-hex notation). Instead of representing the
hexadecimal value using the ASCII characters '0' thru '9' and 'A', 'B', 'C', 'D', 'E', and 'F',
the pseudo-hex format uses the ASCII characters '0' thru '9' and the characters ':', ';', '<',
'=', '>', and '?'. As you can see by studying the ASCII code chart, a binary nibble may be
converted to its equivalent pseudo-hex character by simply adding 0x30.
A binary/decimal/hexadecimal/pseudo-hex conversion chart is included at the end of this
manual for your convenience.
Computer Control of the Advantage SPM522Dpage 1
Serial Interface - Data Communications Parameters
The SPM522D communicates through its serial interface at a data rate ("baud" rate) of
2400 bits per second with 8 data bits, 1 stop bit, and no parity. Although this is currently
the only supported data rate, 9600 bits per second may be supported in the future - contact
the factory for details. The SPM522D utilizes a subset of the standard 7-bit ASCII
character set. The eighth data bit (bit 7 - the most significant bit) of each character
transmitted by the computer should always be 0. The computer should not echo the
characters it receives from the SPM522D.
Since the SPM522D only has a single-character input buffer for its incoming serial data, a
form of flow control must be implemented by the computer in order to guarantee that no
characters are lost. Neither hardware (DTR) nor XON/XOFF (also known as DC1/DC3
or control-S/control-Q) handshaking is supported by the SPM522D. However, each
character which the SPM522D receives will be "echoed" back to the computer through
the SPM522D's serial interface. Flow control may be implemented by the computer
software by simply waiting for each character's echo from the SPM522D before
transmitting the next character, since the SPM522D doesn't retrieve and echo an
incoming character until it has finished processing the previous character.
Computer Control
The Advantage SPM522D has an RS-232-compatible serial interface which allows it to
be controlled by a computer. The SPM522D offers two methods of computer control:
Control Button Emulation. This method of computer control allows the computer to
emulate Biamp's standard infrared remote control transmitter or wall-mount remote
control panel. Using this method, the computer outputs ASCII characters which are
equivalent to the characters generated by the remote control. Control Button
Emulation is simple to perform, however, it only provides "one-way" control of the
SPM522D - it allows the computer to send simple commands to the SPM522D, but it
does not provide any mechanism for requesting status information from the
SPM522D.
Advanced Computer Control. This method of computer control provides advanced
commands which allow "two-way" control of the SPM522D. Using Advanced
Computer Control commands, the computer may request status information from the
device as well as send commands to the device. Advanced Computer Control and
Control Button Emulation are not mutually exclusive - both methods may be freely
intermixed.
page 2Computer Control of the Advantage SPM522D
Control Button Emulation
Control Button Emulation is the simplest form of computer control of the Advantage
SPM522D. This method of operation allows the computer to emulate the operation of a
standard Biamp remote control transmitter.
The SPM522D provides two rear-panel remote control ports plus a remote translator port
in addition to the internal front-panel infrared receiver. The signals from these four
inputs are routed to a proprietary infrared decoder IC for translation before being sent on
to the SPM522D's main microprocessor. When the decoder IC detects a proper bitstream
which indicates that a button is being pressed on one of the remote control devices, it
converts the button code into a standard ASCII character and transmits it to the main
microprocessor's serial port. This is a shared serial port - the same serial port which is
used for computer control. When the microprocessor receives a character through its
serial port, it doesn't know (and doesn't care) whether that character came from a remote
control device or whether it came from the computer. So, in order for the computer to
emulate the operation of a remote control transmitter, all it has to do is transmit the same
ASCII characters that the decoder IC transmits for each detected button press.
The following table summarizes the ASCII characters corresponding to each of the 40
remote control buttons supported by the SPM522D. These button codes are also
summarized on the ASCII code chart provided at the end of this manual. The Advantage
PC Control Software Package also indicates on its button definition screen the equivalent
ASCII character for each of the 40 individual remote control buttons. The remote control
buttons on the standard Biamp transmitter are numbered from left to right going from
bottom to top with the lower left-hand button being button number 1.
button 21'V' (0x56)Main recall preset A
button 22 'W' (0x57)Main recall preset B
button 23'X' (0x58)Main recall preset C
button 24'Y' (0x59)Main select source 5
button 25'Z' (0x5A)Main select source 1
button 26'[' (0x5B)Main select source 2
button 27'\' (0x5C)Main select source 3
button 28']' (0x5D)Main select source 4
button 29'^' (0x5E)NOP (no operation)
button 30'_' (0x5F)NOP (no operation)
button 31'`' (0x60)NOP (no operation)
button 32'b' (0x62)NOP (no operation)
button 33'c' (0x63)NOP (no operation)
button 34'd' (0x64)NOP (no operation)
button 35'e' (0x65)NOP (no operation)
button 36'f' (0x66)NOP (no operation)
button 37'g' (0x67)NOP (no operation)
button 38'h' (0x68)NOP (no operation)
button 39'i' (0x69)NOP (no operation)
button 40'j' (0x6A)NOP (no operation)
When a remote control button is first pressed, the decoder IC sends the character which
corresponds to that button to the SPM522D's main microprocessor. If the button is
Computer Control of the Advantage SPM522Dpage 3
pressed for longer than 110 milliseconds, the decoder IC will then send a "repeat code" to
the main microprocessor and will continue to send additional repeat codes every 110
milliseconds for as long as the button is being pressed. The ASCII character
corresponding to the repeat code is '@' (0x40).
Device Select Prefix Characters
When using Advanced Computer Control, up to eight SPM522Ds may be linked together
and individually controlled by the computer (if each device is first assigned a unique
device number). When using Control Button Emulation, a limited subset of device
addressing may be performed, which allows individual control of up to four SPM522Ds
(with device numbers 1 thru 4). This is accomplished by transmitting a device select
prefix code immediately prior to each control button ASCII character code. The device
select prefix code is inspected by each device to determine whether or not the device
should react to the button code which immediately follows. (Note: do not transmit prefix
codes prior to repeat codes.) If a button code is not immediately preceded by a device
select prefix character, then all SPM522Ds in the system will react to that button code.
The following table summarizes the ASCII characters to use for selecting various devices.
This information is also summarized in the ASCII code chart provided at the end of this
manual.
Note: Device select prefix codes are not supported (and will be ignored) by SPM522Ds
with firmware versions earlier than July 2, 1995.
page 4Computer Control of the Advantage SPM522D
Advanced Computer Control
The Advanced Computer Control command set includes commands which allow the
SPM522D to return information about the system to the computer, unlike Control Button
Emulation which is basically a one-way control mechanism. The following list
summarizes the commands available using Advanced Computer Control, including the
ASCII command character associated with each command:
!
virtual-buttonperform the specified button actions.
"
button-definitiondefine or retrieve the definition for the specified button.
#
source-settingsdefine or retrieve the stereo source settings (tone, balance).
$
preset-definitiondefine or retrieve the definition for the specified preset.
%
do-miscmiscellaneous functions.
&
do-buttonperform button actions for specified button.
'
do-preset-actionperform the specified preset action.
(
do-volume-actionperform the specified volume or balance action.
(
set-volumeset the volume for the specified fader.
)
do-tone-actionperform the specified bass or treble or balance action.
*
do-source-selectperform the specified stereo source selection action.
+
sleep-for-10-sec.sleep for 10 seconds, ignoring all commands.
,
read-memoryretrieve data from non-volatile configuration memory.
-
write-memorystore data in non-volatile configuration memory.
.
set-factory-defaultsresets configuration parameters to factory defaults.
/
get-versionretrieve the model information and firmware version date.
Each Advanced Computer Control command requires at least two parameter bytes (four
pseudo-hex nibbles) to be sent prior to the command character. Each command will be
explained in detail on the following pages.
Some of the commands cause the SPM522D to return information to the computer. For
each string of information returned to the computer, the SPM522D terminates the string
by transmitting the ASCII carriage return character (0x0D - represented in this document
as ). An internal dip-switch may be set to cause the SPM522D to append an ASCII line
feed character (0x0A) after each carriage return. This dip-switch is labelled "Opt. X".
When the Opt. X dip-switch is off, the option is disabled (no line feed); when the dipswitch is on, the option is enabled (a line feed follows each carriage return). The factory
default setting is Opx. X disabled (no line feed).
As mentioned earlier, the Advantage SPM522D will echo all characters it receives,
regardless of whether or not the characters are valid commands or parameters. Characters
greater than 0x7F are reserved and should not be transmitted by the computer. The
SPM522D utilizes a subset of the standard ASCII character set. The following characters
have meaning to the SPM522D:
Computer Control of the Advantage SPM522Dpage 5
characterhexadecima
operation
l
ASCII control characters(0x00 - 0x1F)no operation
SPACE
ASCII
!
thru
0
thru
@
A
B
thru
a
b
thru
k
thru
{
thru
0x80 thru 0xFF(0x80 - 0xFF)RESERVED
character
/
?
`
j
z
DEL
(0x20)no operation
(0x21 - 0x2F)Advanced Computer Control
commands
(0x30 - 0x3F)pseudo-hex parameters for Advanced
Computer Control commands
(0x40)Control Button Emulation Repeat Code
(0x41)no operation
An ASCII code chart showing all SPM522D commands and codes is provided later in
this document for your convenience. One key point to observe is that the computer may
feel free to transmit spaces, tabs, carriage returns, line feeds, or any other control
characters at any time (even between two nibbles of a pseudo-hex parameter byte)
without having any affect on the operation of the SPM522D. The SPM522D will simply
echo them and then ignore them.
Device Type Bitmask and Device Number Bitmask
In a system which has more than one Advantage product connected to the computer, the
Device Type Bitmask and Device Number Bitmask command parameters provide a
mechanism for the computer to individually address a particular device (or a combination
of devices). Every command in the Advanced Computer Control command set requires
that a Device Type Bitmask and a Device Number Bitmask be transmitted as the last two
parameter bytes before the computer transmits the command character itself. These two
bitmask parameters bytes provide a device addressing capability to specify which of the
devices in the system should execute the command. All devices which are not
specifically addressed by these two bitmask values will ignore the command.
page 6Computer Control of the Advantage SPM522D
The Device Type Bitmask parameter byte supports up to eight distinct device types - one
bit per device type. The eight device types are:
0x01(bit 0) Biamp Advantage DRC 4+4 digital remote control
0x02(bit 1) Biamp Advantage EQ28X digitally-controlled graphic equalizer
0x04(bit 2) Biamp Advantage SPM522D stereo preamp/mixer
0x08(bit 3) Biamp Advantage PMX84 programmable matrix switch
0x10(bit 4) (reserved for future product)
0x20(bit 5) (reserved for future product)
0x40(bit 6) (reserved for future product)
0x80(bit 7) (reserved for future product)
The Advantage SPM522D will only respond to Advanced Computer Control commands
if bit 2 of the Device Type Bitmask parameter byte is a '1'. A command may be directed
to more than one device type in the system by setting all of the corresponding bits in the
Device Type Bitmask to '1's.
The Device Number Bitmask parameter byte supports up to eight distinct device numbers
- one bit per device number. The eight device numbers are:
0x01(bit 0) Select Device Number 1
0x02(bit 1) Select Device Number 2
0x04(bit 2) Select Device Number 3
0x08(bit 3) Select Device Number 4
0x10(bit 4) Select Device Number 5
0x20(bit 5) Select Device Number 6
0x40(bit 6) Select Device Number 7
0x80(bit 7) Select Device Number 8
A particular Advantage SPM522D will only respond to Advanced Computer Control
commands if the bit in the Device Number Bitmask parameter byte corresponding to its
device number is a '1'. A command may be directed to more than one device number in
the system by setting all of the corresponding bits in the Device Number Bitmask to '1's.
The Advanced Computer Control command set supports, in theory, up to sixty-four
devices in a system - eight devices of each of the eight device types. In order for any
particular device in the system to respond to an Advanced Computer Control command,
the appropriate bit in both the Device Type and Device Number bitmask parameter bytes
must be set to '1'.
Computer Control of the Advantage SPM522Dpage 7
Preset Data Structure
The SPM522D firmware maintains data structures for 12 presets:
5-byte array with elements numbered preset[0] thru preset[4]
preset[4]
(transmitted first)
preset[3]
preset[2]]
preset[1]
preset[0]
(transmitted last)
(msb)(lsb)
Mute
Mic 2
Pri
Room
Comb
Mic 1
Pri
Ch5
OV
Mic 2
EN
LAST RECALLED
Mix
Mod
MIC 2 VOLUMEMute
MIC 1 VOLUMEMute
OUTPUT VOLUME
Mic 1
OV
EN
EN
PRESET
SELECTED
01234567
Note: This value is
only significant for presets
0 and 6 (power-up mixes)
SOURCE
Ch. 5 OVERRIDE ENABLED
MIC 1 ENABLED
MIC 2 ENABLED
MIC 1 PRIORITY
MIC 2 PRIORITY
The volume levels are 5-bit values which range from 0x00 (step 0 - minimum volume) to
0x1F (step 31 - maximum volume). Bit 7 of the volume bytes indicates whether or not
that particular fader is muted. If the fader is muted, the actual volume level sent to the
VCA is 0x00, but the volume level specified in the 5 least significant bits of the volume
byte indicates the volume level which will be restored when that fader becomes unmuted.
The fifth byte of the preset data structure (preset[4]) is used only for presets 0 and 6, the
power-up presets. The SPM522D periodically stores its current mix status in its nonvolatile configuration memory as preset 0 (Main) and preset 6 (Zone). Unless configured
otherwise, the SPM522D will recall presets 0 and 6 upon power-up.
page 8Computer Control of the Advantage SPM522D
Stereo Source Data Structure
The SPM522D maintains data structures for 6 stereo sources. Source 0 is not used.
Sources 1 thru 5 correspond to the five stereo inputs. These data structures contain the
Main treble, Main bass, Main balance, Zone treble, Zone bass, and Zone balance
information for each of the five stereo sources. Please note that the tone and balance
information is directly associated with each stereo source and not associated with presets.
SPM522D Stereo Source Data Structure
4-byte array with elements numbered source[0] thru source[3]
source[3]
(transmitted first)
source[2]
source[1]
source[0]
(transmitted last)
(msb)(lsb)
ZONE BALANCE VALUERL
ZONE BASS VALUEZONE TREBLE VALUE
RL
MAIN BALANCE VALUE
MAIN BASS VALUEMAIN TREBLE VALUE
01234567
Bass and Treble values range from 0x00 (maximum cut -12 dB) to 0x0C (maximum
boost +12 dB), with the value 0x06 corresponding to a "flat" response (no cut, no boost).
To best understand how the Balance control works, visualize two separate faders - one
which affects the volume level of the left channel and one which affects the right channel.
Each fader has a range of 0x08 (-24 dB) to 0x14 (0 dB). When the balance is centered,
both faders are set at their maximum values of 0x14. To shift the balance to the right,
decrease the left fader value. To shift the balance from the right back to the left, increase
the left fader value until it once again reaches maximum (0x14) and then continue to shift
to the left by decreasing the right fader value. At any given time, one or the other fader
will be at its maximum value (and they will both be at maximum when the balance is
centered). Since one value is always at maximum, there is no point in allocating space in
the data structure to store two fader values to represent one balance setting. Instead, only
one value is stored along with a flag bit to indicate whether the value is the left fader (bit
7) or the right fader value (bit 6). When the balance is centered, both fader values will be
maximum (0x14) and it doesn't matter whether you specify the left fader value or the
right fader value (the SPM522D will always report the value as if it is the left fader
value).
Computer Control of the Advantage SPM522Dpage 9
Button Definition Data Structure
The SPM522D maintains data structures for 41 buttons (button 0 thru button 40 - button
0 is not used). Each button definition data structure consists of eight bytes - four bytes for
Main button actions and four bytes for Zone button actions. The following illustration
indicates which bit fields of which bytes are used for each type of action.
SPM522D Button Data Structure
8-byte array with elements numbered button[0] thru button[7]
button[7]
(transmitted first)
button[6]
(msb)(lsb)
TREBLE
ACTION
MIC 2 VOL ACTION
BASS
ACTION
BALANCE ACTION
MIC 1 VOL ACTION
01234567
ZONE
button[5]
button[4]
button[3]
button[2]
OUTPUT VOL ACTION
TREBLE
ACTION
MIC 2 VOL ACTION
BASS
ACTION
SOURCE SELECT
ACTION
PRESET NUMBERPRESET ACTION
BALANCE ACTION
MIC 1 VOL ACTION
MAIN
button[1]
button[0]
(transmitted last)
OUTPUT VOL ACTION
SOURCE SELECT
ACTION
PRESET NUMBERPRESET ACTION
The bit patterns for the various button action codes are shown in the following tables:
Preset action codes:
0000NOP (no operation)
0001Recall Preset
0010Store Preset
0011Enter Combined Mode then Recall
0100(reserved)
0101Cancel Combined Mode then Recall
0110(reserved)
0111(reserved)
1000Toggle Combined Mode then Recall
page 10Computer Control of the Advantage SPM522D
Source Select action codes:
0000NOP (no operation)
0001select channel 1
0010select channel 2
0011select channel 3
0100select channel 4
0101select channel 5
0110(reserved)
0111toggle channel 5 Override
1000channel 5 Override
1001cancel channel 5 Override
1010enable mic 1
1011disable mic 1
1100toggle mic 1 enable
1101enable mic 2
1110disable mic 2
1111toggle mic 2 enable
Mic 1, Mic 2, and Output Volume action codes:
0000NOP (no operation)
0001volume down
0010volume up
0011toggle mute
0100mute
0101un-mute
0110minimum volume
0111maximum volume
1000(reserved)
1001set volume to predefined level
Balance action codes:
0000NOP (no operation)
1101shift to the Left
1110shift to the Right
1111set balance to center
Bass and Treble action codes:
00NOP (no operation)
01cut
10boost
11set to flat
Computer Control of the Advantage SPM522Dpage 11
Advanced Computer Control Command Notation
For the following descriptions of the Advanced Computer Control command set, the
following conventions will be used:
Each ASCII character which represents a pseudo-hex nibble will be shown in italics, with
the following letters representing certain types of parameters:
aa pseudo-hex nibble specifying an action code.
bone of the pseudo-hex nibbles specifying a button data structure. Also used to as a
pseudo-hex nibble to specify a bass action or to select a memory bank.
ca pseudo-hex nibble specifying a checksum value.
done of the pseudo-hex nibbles in the device number bitmask which indicates which
device numbers should accept the following command.
ea pseudo-hex nibble specifying a memory address in the non-volatile configuration
memory of the SPM522D (the ending address of a range of addresses).
fa pseudo-hex nibble specifying a fader selection.
na pseudo-hex nibble specifying a preset number, button number, or stereo source number.
oa pseudo-hex nibble specifying a command option byte.
pone of the pseudo-hex nibbles specifying a preset data structure.
ra pseudo-hex nibble specifying the "room" selection (Main vs. Zone).
sa pseudo-hex nibble specifying a memory address in the non-volatile configuration
memory of the SPM522D (the starting address of a range of addresses). Also used as
one of the pseudo-hex nibbles specifying a stereo source data structure.
tone of the pseudo-hex nibbles specifying a treble action code.
va pseudo-hex nibble specifying a volume level
xa pseudo-hex nibble specifying a generic data value.
page 12Computer Control of the Advantage SPM522D
! virtual-button
Description:
The virtual-button command causes the specified button actions to be immediately
performed. The actions are defined using the Button Definition Data Structure. The
button definition is not stored in the SPM522D's nonvolatile memory, nor is the button
definition associated with a button number. Normally, when the SPM522D receives a
control button command, it looks-up the control button definition for that button number
in its control button definition table and then performs the actions defined for that button.
The virtual-button command allows the computer to specify the actions to be performed
without having the SPM522D look-up an entry in its control button definition table. This
command essentially provides the SPM522D (when under computer control) with an
unlimited number of button definitions.
Syntax of Command:
bbbbbbbbbbbbbbbb04dd!
where:
bbbbbbbbbbbbbbbb=Button Definition Data Structure (pseudo-hex)
04=SPM522D Device Type Bitmask
dd=Device Number Bitmask (pseudo-hex)
!=virtual-button command character (0x21)
Syntax of Response:
(no response)
Example:
00455300004452000420!
This example causes SPM522D number 6 to immediately execute the following button
actions:
Main - un-mute the output, select stereo source 2, mute Mic 1, mute Mic 2
Zone - un-mute the output, select stereo source 3, un-mute Mic 1, mute Mic 2.
Comments:
Computer Control of the Advantage SPM522Dpage 13
" define-button
Description:
The define-button command provides a new definition for the specified button number.
The SPM522D will store this new button definition in its control button definition lookup
table, replacing the definition that was there.
Syntax of Command:
bbbbbbbbbbbbbbbbnn04dd"
where:
bbbbbbbbbbbbbbbb=Button Definition Data Structure (pseudo-hex)
nn=Button Number + 128 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
"=define-button command character (0x22)
Syntax of Response:
(no response)
Example:
0000000000000031940408"
This example causes SPM522D number 4 to redefine button number 20 (0x14) to enter
Room Combining mode and recall preset mix 'A'.
Comments:
The decimal value 128 must be added to the Button number. This indicates to the
SPM522D that this is the define-button form of the button-definition command.
page 14Computer Control of the Advantage SPM522D
" get-button-definition
Description:
The get-button-definition command causes the SPM522D to return the definition of the
specified button. The button definition will be returned in the Button Definition Data
Structure format.
Syntax of Command:
nn04dd"
where:
nn=Button Number + 64 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
"=get-button-definition command character (0x22)
Syntax of Response:
bbbbbbbbbbbbbbbb
where:
bbbbbbbbbbbbbbbb=Button Definition Data Structure (pseudo-hex)
Example:
command:response:
5;0401"0002000000020000
This example causes SPM522D number 1 to retrieve its button definition for control
button number 27 (0x1B) and return it to the computer. In this example, the button
definition was: increment the volume of Mic 1 in both the Main and Zone outputs.
Comments:
The decimal value 64 must be added to the Button number. This indicates to the
SPM522D that this is the get-button form of the button-definition command.
Computer Control of the Advantage SPM522Dpage 15
# define-source-settings
Description:
The define-source-settings command provides new treble, bass, and balance settings for
the specified stereo source. This command includes the settings for both Main and Zone.
The new settings are stored in the SPM522D's non-volatile configuration memory. If the
specified source is the currently selected source for either the Main or Zone output, the
new settings become effective immediately.
Syntax of Command:
ssssssssnn04dd#
where:
ssssssss=Stereo Source Data Structure
nn=Source number + 128 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
#=define-source-settings command character (0x23)
Syntax of Response:
(no response)
Example:
94669457820401#
This example causes SPM522D number 1 to change its settings for stereo source 2 to:
Main : bass boosted one step and treble cut one step, balance centered
Zone : bass and treble flat, balance centered
Comments:
The decimal value 128 must be added to the Source number. This indicates to the
SPM522D that this is the define-source-settings form of the source-settings command.
page 16Computer Control of the Advantage SPM522D
# get-source-settings
Description:
The get-source-settings command causes the SPM522D to return the treble, bass, and
balance settings for the specified stereo source. The settings will be returned in the
Stereo Source Data Structure format. This includes the settings for both Main and Zone.
Syntax of Command:
nn04dd#
where:
nn=Source number + 64 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
#=get-source-settings command character (0x23)
Syntax of Response:
ssssssss
where:
ssssssss=Stereo Source Data Structure (pseudo-hex)
Example:
command:response:
420401#94669466
This example causes SPM522D number 1 to retrieve its treble, bass, and balance settings
for stereo source number 2 and return them to the computer. In this example, the source
settings were:
Main : bass and treble flat, balance center
Zone : bass and treble flat, balance center
Comments:
The decimal value 64 must be added to the Source number. This indicates to the
SPM522D that this is the get-source-settings form of the source-settings command.
Computer Control of the Advantage SPM522Dpage 17
$ define-preset
Description:
The define-preset command provides settings for the specified preset. If either preset 5
(the Main "current mix") or preset 11 (the Zone "current mix") are specified, the new
settings immediately go into effect. Otherwise, the new settings are simply stored in the
SPM522D's non-volatile configuration memory for future recall.
Syntax of Command:
ppppppppppnn04dd$
where:
pppppppppp=Preset data structure
nn=Preset number + 128 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
$=define-preset command character (0x24)
Syntax of Response:
(no response)
Example:
00191?1<79830401$
This example causes SPM522D number 1 to change its settings for Main Preset 'C' to:
Stereo Source 1 selected
Mics 1 and 2 both enabled, with Mic 1 priority
Main output volume set to volume step 28
Mic 1 volume set to maximum (volume step 31)
Mic 2 volume set to volume step 25
Comments:
The decimal value 128 must be added to the Preset number. This indicates to the
SPM522D that this is the define-preset form of the preset-definition command. Preset
numbers 1, 2, 3, 4 correspond to Main Presets 'A', 'B', 'C', 'D'. Preset numbers 7, 8, 9, 10
correspond to Zone Presets 'E', 'F', 'G', 'H'.
page 18Computer Control of the Advantage SPM522D
$ get-preset-definition
Description:
The get-preset-definition command causes the SPM522D to return the settings for the
specified preset. The settings will be returned in the Preset Data Structure format. Preset
number 5 refers to the Main "current mix" and preset number 11 refers to the Zone
"current mix".
Syntax of Command:
nn04dd$
where:
nn=Preset number + 64 (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
$=get-preset-definition command character (0x24)
Syntax of Response:
pppppppppp
where:
pppppppppp=Preset Data Structure (pseudo-hex)
Example:
command:response:
4;0401$18001?1?14
This example causes SPM522D number 1 to return its settings for the Zone "current mix"
to the computer. In this example, the settings were: Stereo Source 4 selected, Ch.5
Override not allowed, Mic 1 enabled, Zone output volume and Mic 1 volume both set to
maximum (step 31), Mic 2 volume set to minimum (step 0), the most recently recalled
Zone preset was 'F' (8).
Comments:
The decimal value 64 must be added to the Preset number. This indicates to the
SPM522D that this is the get-preset-definition form of the preset-definition command.
Preset numbers 1, 2, 3, 4 correspond to Main Presets 'A', 'B', 'C', 'D'. Preset numbers 7, 8,
9, 10 correspond to Zone Presets 'E', 'F', 'G', 'H'.
Computer Control of the Advantage SPM522Dpage 19
% do-misc-ch5-override
Description:
The do-misc-ch5-override command allows the computer to allow or disallow the
Channel 5 Override feature for the Main or Zone "current mix".
Syntax of Command:
xxaa04dd%
where:
xx=01 = Ch5 Override allowed. 00 = not allowed.
aa=Action code: 81 = Main. 82 = Zone.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)%=do-misc command character (0x25)
Syntax of Response:
(no response)
Example:
01810402%
This example causes SPM522D number 2 to allow Channel 5 Override for the Main
output.
Comments:
page 20Computer Control of the Advantage SPM522D
% do-misc-mic-priority
Description:
The do-misc-mic-priority command allows the computer to specify the mic priority for
the Main or Zone "current mix".
Syntax of Command:
xxaa04dd%
where:
xx=Priority: 00 = None, 01 = Mic 1, 02 = Mic 2.
aa=Action code: 83 = Main. 84 = Zone.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)%=do-misc command character (0x25)
Syntax of Response:
(no response)
Example:
02840401%
This example causes SPM522D number 1 to assign priority to Mic 2 for the Zone output
"current mix".
Comments:
Computer Control of the Advantage SPM522Dpage 21
% do-misc-mic-enable
Description:
The do-misc-mic-enable command allows the computer to enable or disable ("assign" or
"un-assign") Mic 1 or Mic 2 for the Main or Zone "current mix".
Syntax of Command:
xxaa04dd%
where:
xx=01 = Enable. 00 = Disable.
aa=Action code: 85 = Mic 1 Main. 86 = Mic 2 Main.
87 = Mic 1 Zone. 88 = Mic 2 Zone.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)%=do-misc command character (0x25)
Syntax of Response:
(no response)
Example:
01850401%01870401%
This example consists of two commands, causing SPM522D number 1 to enable Mic 1
for both the Main and Zone "current mixes".
Comments:
page 22Computer Control of the Advantage SPM522D
& do-button
Description:
The do-button command causes the SPM522D to look-up and perform the actions for the
specified button number.
Syntax of Command:
nn04dd&
where:
nn=Button Number (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
&=do-button command character (0x26)
Syntax of Response:
(no response)
Example:
28040?&
This example causes SPM522D numbers 1, 2, 3, and 4 to look-up and perform the actions
defined in their respective control button definition tables for button number 40 (0x28).
Comments:
Button number must be 01 to 40 (0x01 to 0x28), otherwise the command will be ignored.
Computer Control of the Advantage SPM522Dpage 23
' do-preset-action
Description:
The do-preset-action command causes the SPM522D to perform the specified preset or
room-combining action.
Syntax of Command:
an04dd'
where:
a=Action code (pseudo-hex nibble)
1 = Recall.2 = Store.
3 = Combine then Recall.
5 = Cancel Combining then Recall.
8 = Toggle Combining then Recall.
n=Preset Number (pseudo-hex nibble)
1, 2, 3, 4 = Main Preset 'A', 'B', 'C', 'D'
7, 8, 9, : = Zone Preset 'E', 'F', 'G', 'H'
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
'=do-preset-action command character (0x27)
Syntax of Response:
(no response)
Example:
120401'
This example causes SPM522D number 1 to recall preset 'B'.
Comments:
page 24Computer Control of the Advantage SPM522D
( do-volume-action
Description:
The do-volume-action command causes the SPM522D to perform the specified volume
action.
Syntax of Command:
aaff04dd(
where:
aa=Action code. 01 = Volume Down.
02 = Volume Up. 03 = Toggle Mute. 04 = Mute.
05 = Un-mute. 06 = Minimum Vol. 07 = Max Vol.
ff=Fader Selection Bitmask (pseudo-hex)
01 = Mic 1 Zone. 02 = Mic 2 Zone.
04 = Mic 1 Main. 08 = Mic 2 Main.
10 = Main Output. 20 = Zone Output.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
(=do-volume-action command character (0x28)
Syntax of Response:
(no response)
Example:
04100401(
This example causes SPM522D number 1 to Mute the Main output.
Comments:
Multiple faders may be addressed simultaneously by combining bit values in the fader
selection bitmask. For example, 04300401( mutes both the Main and the Zone outputs
of SPM522D number 1. Another example: 010?0401( turns down the volume (by one
step) of both Mic 1 and Mic 2 in both the Main and Zone outputs.
Computer Control of the Advantage SPM522Dpage 25
( set-volume
Description:
The set-volume command causes the SPM522D to set the specified "fader" to a new
volume level. The volume level is a 5-bit value which ranges from 0x00 (step 0 minimum volume) to 0x1F (step 31 - maximum volume). Bit 7 of the volume byte
indicates whether or not that particular fader should be muted. When bit 7 indicates that
the fader should be muted (bit 7 = '1'), the 5 least significant bits (bits 0 - 4) indicate the
volume level which will be restored by the SPM522D if that fader subsequently becomes
un-muted.
Syntax of Command:
vv09ff04dd(
where:
vv=Volume level (pseudo-hex).
09=set-volume action code.
ff=Fader Selection Bitmask (pseudo-hex)
01 = Mic 1 Zone. 02 = Mic 2 Zone.
04 = Mic 1 Main. 08 = Mic 2 Main.
10 = Main Output. 20 = Zone Output.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
(=set-volume command character (0x28)
Syntax of Response:
(no response)
Example:
1709100401(
This example causes SPM522D number 1 to set its Main Output volume to
approximately 75% of maximum (volume step 0x17, or 23 decimal).
Comments:
This command is not implemented in firmware versions prior to 23-Aug-95. Multiple
faders may be addressed simultaneously by combining bit values in the fader selection
bitmask. This is a variation of the do-volume-action command, and hence has the same
command character as the do-volume-action command.
page 26Computer Control of the Advantage SPM522D
( do-balance-action
Description:
The do-balance-action command causes the SPM522D to perform the specified balance
action.
40 = Main. 80 = Zone. <0 = both Main and Zone.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
)=do-tone-action command character (0x29)
Syntax of Response:
(no response)
Example:
33<00401)
This example causes SPM522D number 1 to set both the Treble and Bass "flat" for the
currently selected stereo source for the both the Main and Zone outputs.
Comments:
page 28Computer Control of the Advantage SPM522D
* do-source-select
Description:
The do-source-select command causes the SPM522D to perform the specified stereo
source/channel selection.
40 = Main. 80 = Zone. <0 = both Main and Zone.
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
*=do-source-select command character (0x2A)
Syntax of Response:
(no response)
Example:
03800401*
This example causes SPM522D number 1 to select stereo source (channel) 3 for the Zone
output.
Comments:
The channel 5 Override functions will be executed regardless of whether or not the
channel 5 Override feature is enabled or disabled in the "current" mix.
Computer Control of the Advantage SPM522Dpage 29
+ sleep-for-10-seconds
Description:
The sleep-for-10-seconds command causes the SPM522D to "go to sleep" for 10 seconds,
ignoring all data communications, including Control Button commands as well as
Advanced Computer Control commands. During this time, characters received will be
ignored and will not be echoed. Also, during this time, all remote control devices will be
ignored. This command was implemented to facilitate remote computer control of the
SPM522D via modem (with an auto-answer modem at the SPM522D). When an on-line
session with a modem is finished and one modem or the other decides to disconnect or
"hang up the phone", typically a spurt of unwanted spurious garbage characters occurs on
the line. The SPM522D has no way of distinguishing between "garbage" characters and
real characters. The last thing the computer should do before telling its modem to hang
up is to issue the sleep-for-10-seconds command. This will allow plenty of time for the
line to disconnect and the SPM522D will ignore all characters which it might receive
during this hang-up process.
Syntax of Command:
ttdd+
where:
tt=Device Type Bitmask (pseudo-hex) 04 = SPM522D
dd=Device Number Bitmask (pseudo-hex)
+=sleep-for-10-seconds command character (0x2B)
Syntax of Response:
(no response)
Example:
????+
This example causes all Advantage devices in the system to sleep for 10 seconds,
ignoring all data communications.
Comments:
Note that the command character '+' is typically also the character used to return a Hayescompatible modem to its command mode.
, read-memory
page 30Computer Control of the Advantage SPM522D
Description:
The read-memory command allows the computer to read the contents of one or more
locations of the SPM522D's non-volatile configuration memory. The SPM522D has 512
bytes of configuration memory, which is arranged as two banks of 256 bytes each.
Syntax of Command:
bbeess04dd,
where:
bb=memory Bank select. 00 = bank 0. 01 = bank 1.
ee=Ending memory address (pseudo-hex)
ss=Starting memory address (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
,=read-memory command character (0x2C)
Syntax of Response:
xx...(up to 256 data values)...
where:
xx=Data byte (pseudo-hex). Value in end addr is sent first.
Example:
command:
0006000401,
response:
03020;05020401
This example causes SPM522D number 1 to return the data values which are currently
stored in locations 00 thru 06 of bank 0 of the configuration memory. In this example,
memory location 00 contains the pseudo-hex value 01 and memory location 06 contains
the pseudo-hex value 03.
Comments:
Computer Control of the Advantage SPM522Dpage 31
To read the contents of only one location, set both the starting and ending address to the
same value (the desired address). The starting address should always be less than or
equal to the ending address. Valid addresses for each bank are 0x00 thru 0xFF (pseudohex 00 thru ??). The data is sent in reverse order (last location first).
Contents of Bank 0:
0x00 - 0x3FGlobal Configuration Parameters
0x40 - 0x57Stereo Source Tone and Balance Settings
0x58 - 0x93Main and Zone Configuration Presets
0x94 - 0xB7(reserved - currently unused)
0xB8 - 0xFFButton Definitions for Buttons 0 thru 8 (button 0 is unused)
Contents of Bank 1:
0x00 - 0xFFButton Definitions for Buttons 9 thru 40
page 32Computer Control of the Advantage SPM522D
- write-memory
Description:
The write-memory command allows the computer to store one or more data values in the
SPM522D's non-volatile configuration memory beginning at a specified location. The
SPM522D has 512 bytes of configuration memory, which is arranged as two banks of 256
bytes each. Each memory-write command may include up to 16 data values to be stored
in a contiguous range of memory locations for the specified memory bank. This
command provides the computer with a mechanism for setting or changing the global
configuration parameters for the device. It also provides the computer with a method for
totally messing things up.
Syntax of Command:
xx...(up to 16 data values)...ssoocc04dd-
where:
xx..=up to 16 data values (pseudo-hex). The values are sent
in reverse order (highest memory address first)
ss=starting (lowest) memory address (pseudo-hex)
oo=options & byte count (pseudo-hex)
bits 0, 1, 2, 3 = number of data values - 1
bit 4 - reserved (must be 0)
bit 5 - memory Bank select. 0 = Bank 0. 1 = Bank 1.
bit 6 - reserved (must be 0)
bit 7 - 1 = activate new global config params now.
cc=computed checksum value (pseudo-hex)
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
-=write-memory command character (0x2D)
Syntax of Response:
(no response)
Example:
03020138823?0401-
This example causes SPM522D number 1 to store the values 0x01, 0x02, 0x03 in
configuration memory bank 0 beginning at address 0x38 and causes the unit to retrieve
and activate its global configuration parameters.
Computer Control of the Advantage SPM522Dpage 33
Comments:
In order to insure data integrity, a checksum value is included with this command. The
checksum is computed by performing a simple 8-bit (modulo 256) sum of all of the data
values plus the starting address value plus the option byte value and then performing a 1's
complement of the sum. Note that the checksum calculation is performed on the actual 8bit binary values, before any values are converted to pseudo-hex format for transmission.
The SPM522D will perform the same calculation on the data values which it receives and
compare its computed checksum to the received checksum. If the two values do not
match, the SPM522D will ignore the entire command.
The SPM522D normally retrieves and activates its global configuration parameters from
the non-volatile configuration memory only during its power-up sequence. If you use the
write-memory command to change a global configuration parameter (which is why the
command was provided), the SPM522D has to specifically be told to re-load and activate
its configuration parameters after the new value is stored in its memory. Bit 7 of the
options & byte count parameter may be set to tell the unit to automatically retrieve and
activate its configuration parameters after the memory write operation is complete.
page 34Computer Control of the Advantage SPM522D
. set-factory-defaults
Description:
The set-factory-defaults command may be used to force the SPM522D to reset some or
all of its configuration information to the factory default settings. The first two
parameters for this command (< and >) are dummy parameters which were implemented
to help prevent an accidental restoration of the factory defaults due to an error in data
transmission.
Syntax of Command:
<>oo04dd.
where:
<=the ASCII character < (0x3C)
>=the ASCII character > (0x3E)
oo=Option byte (pseudo-hex):
bit 0 - 1 = set Button Definition defaults
bit 1 - 1 = set Preset defaults
bit 2 - 1 = set Global Config Parameter defaults
bit 3 - 1 = set Stereo Source Tone/Balance defaults *
bit 7 - 1 = activate new Global Config Params now
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
.=set-factory-defaults command character (0x2E)
Syntax of Response:
(no response)
Example:
<>84040?.
This example causes SPM522D numbers 1, 2, 3, and 4 to restore their global
configuration parameters to the factory default settings and to retrieve and activate those
new settings.
Comments:
Firmware versions prior to July 2, 1995 have a bug relating to the set Stereo
Tone/Balance Defaults option - attempting to set bit 3 to activate this option will result in
the SPM522D ignoring the entire command.
Computer Control of the Advantage SPM522Dpage 35
/ get-version
Description:
The get-version command causes the SPM522D to return its model identification code
and firmware version to the computer. The firmware version number is simply the
release date of the firmware, in a slightly modified standard American format of
mm:dd:yy. These values are decimal digits, not pseudo-hex notation. For example, May
23, 1995 would be represented as 05:23:95. The colon character (:) is used as a separator
instead of the more conventional slash character, since the slash character is used as a
computer command character by the SPM522D.
Syntax of Command:
04dd/
where:
04=Device Type Bitmask (pseudo-hex)
dd=Device Number Bitmask (pseudo-hex)
/=get-version command character (0x2F)
Syntax of Response:
01 mm:dd:yy
where:
01=initial model i.d. (0x30 followed by 0x31)
=ASCII space character (0x20)
mm=2-digit decimal month number
:=ASCII character : (0x3A)
dd=2-digit decimal day of the month
:=ASCII character : (0x3A)
yy=2-digit decimal year number
Example:
command:response:
0401/01 05:23:95
This example causes SPM522D number 1 to return its model identification code and
firmware version.
aa pseudo-hex nibble specifying an action code.
bone of the pseudo-hex nibbles specifying a button data structure. Also used to as a pseudo-hex nibble to specify a
bass action or to select a memory bank.
ca pseudo-hex nibble specifying a checksum value.
done of the pseudo-hex nibbles in the device number bitmask which indicates which device numbers should accept
the following command.
ea pseudo-hex nibble specifying a memory address in the non-volatile configuration memory of the SPM522D (the
ending address of a range of addresses).
fa pseudo-hex nibble specifying a fader selection.
na pseudo-hex nibble specifying a preset number, button number, or stereo source number.
oa pseudo-hex nibble specifying a command option byte.
pone of the pseudo-hex nibbles specifying a preset data structure.
ra pseudo-hex nibble specifying the "room" selection (Main vs. Zone).
sa pseudo-hex nibble specifying a memory address in the non-volatile configuration memory of the SPM522D (the
starting address of a range of addresses). Also used as one of the pseudo-hex nibbles specifying a stereo source
data structure.
tone of the pseudo-hex nibbles specifying a treble action code.
va pseudo-hex nibble specifying a volume level
xa pseudo-hex nibble specifying a generic data value.
Computer Control of the Advantage SPM522Dpage 37
.
ASCII Code Chart
with Decimal & Hexadecimal Equivalents and Advantage SPM522D Commands