Biamp SPM522D RS-232 User Manual

RS-232 Control
of the
Advantage SPM522D
________________________________________________________________________________________
Biamp Systems, 14130 N.W. Science Park, Portland, Oregon 97229 U.S.A. (503) 641-7287
an affiliate of Rauland-Borg Corp.
Introduction
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 SPM522D page 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 2 Computer 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.
Control Button Equivalent ASCII Codes (with factory default button definitions shown)
button 1 'B' (0x42) Mic 1 volume down button 2 'C' (0x43) Mic 2 volume down button 3 'D' (0x44) Zone volume down button 4 'E' (0x45) Main volume down button 5 'F' (0x46) Mic 1 volume up button 6 'G' (0x47) Mic 2 volume up button 7 'H' (0x48) Zone volume up button 8 'I' (0x49) Main volume up button 9 'J' (0x4A) Mic 1 toggle mute button 10 'K' (0x4B) Mic 2 toggle mute button 11 'L' (0x4C) Zone toggle mute button 12 'M' (0x4D) Main toggle mute button 13 'N' (0x4E) Zone recall preset E button 14 'O' (0x4F) Zone recall preset F button 15 'P' (0x50) Zone recall preset G button 16 'Q' (0x51) Zone select source 5 button 17 'R' (0x52) Zone select source 1 button 18 'S' (0x53) Zone select source 2 button 19 'T' (0x54) Zone select source 3 button 20 'U' (0x55) Zone select source 4
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 SPM522D page 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.
Device Select Prefix Codes
select device 1 'l' (0x6C) select device 2 'm' (0x6D) select devices 1 & 2 'n' (0x6E) select device 3 'o' (0x6F) select devices 1 & 3 'p' (0x70) select devices 2 & 3 'q' (0X71) select devices 1 & 2 & 3 'r' (0x72) select device 4 's' (0x73) select devices 1 & 4 't' (0x74) select devices 2 & 4 'u' (0x75) select devices 1 & 2 & 4 'v' (0x76) select devices 3 & 4 'w' (0x77) select devices 1 & 3 & 4 'x' (0x78) select devices 2 & 3 & 4 'y' (0x79) select devices 1 & 2 & 3 & 4 'z' (0x7A)
Note: Device select prefix codes are not supported (and will be ignored) by SPM522Ds with firmware versions earlier than July 2, 1995.
page 4 Computer 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-button perform the specified button actions.
"
button-definition define or retrieve the definition for the specified button.
#
source-settings define or retrieve the stereo source settings (tone, balance).
$
preset-definition define or retrieve the definition for the specified preset.
%
do-misc miscellaneous functions.
&
do-button perform button actions for specified button.
'
do-preset-action perform the specified preset action.
(
do-volume-action perform the specified volume or balance action.
(
set-volume set the volume for the specified fader.
)
do-tone-action perform the specified bass or treble or balance action.
*
do-source-select perform the specified stereo source selection action.
+
sleep-for-10-sec. sleep for 10 seconds, ignoring all commands.
,
read-memory retrieve data from non-volatile configuration memory.
-
write-memory store data in non-volatile configuration memory.
.
set-factory-defaults resets configuration parameters to factory defaults.
/
get-version retrieve 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 dip­switch 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 SPM522D page 5
character hexadecima
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
(0x42 - 0x60) Control Button Emulation commands
(buttons 01 - 31) (0x61) no operation
(0x62 - 0x6A) Control Button Emulation commands
(buttons 32 - 40)
(0x6B - 0x7A) Control Button Emulation Device Select
Prefix commands
(0x7B - 0x7F) 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 6 Computer 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 SPM522D page 7
Preset Data Structure
The SPM522D firmware maintains data structures for 12 presets:
preset 0 Main power-up preset preset 6 Zone power-up preset preset 1 Main preset 'A' preset 7 Zone preset 'E' preset 2 Main preset 'B' preset 8 Zone preset 'F' preset 3 Main preset 'C' preset 9 Zone preset 'G' preset 4 Main preset 'D' preset 10 Zone preset 'H' preset 5 Main "current mix" preset 11 Zone "current mix"
SPM522D Preset Data Structure
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 un­muted.
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 non­volatile 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 8 Computer 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 SPM522D page 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: 0000 NOP (no operation) 0001 Recall Preset 0010 Store Preset 0011 Enter Combined Mode then Recall 0100 (reserved) 0101 Cancel Combined Mode then Recall 0110 (reserved) 0111 (reserved) 1000 Toggle Combined Mode then Recall
page 10 Computer Control of the Advantage SPM522D
Source Select action codes: 0000 NOP (no operation) 0001 select channel 1 0010 select channel 2 0011 select channel 3 0100 select channel 4 0101 select channel 5 0110 (reserved) 0111 toggle channel 5 Override 1000 channel 5 Override 1001 cancel channel 5 Override 1010 enable mic 1 1011 disable mic 1 1100 toggle mic 1 enable 1101 enable mic 2 1110 disable mic 2 1111 toggle mic 2 enable
Mic 1, Mic 2, and Output Volume action codes: 0000 NOP (no operation) 0001 volume down 0010 volume up 0011 toggle mute 0100 mute 0101 un-mute 0110 minimum volume 0111 maximum volume 1000 (reserved) 1001 set volume to predefined level
Balance action codes: 0000 NOP (no operation) 1101 shift to the Left 1110 shift to the Right 1111 set balance to center
Bass and Treble action codes: 0 0 NOP (no operation) 0 1 cut 1 0 boost 1 1 set to flat
Computer Control of the Advantage SPM522D page 11
Loading...
+ 28 hidden pages