Appendix: Serial programming interface
Introduction
This section describes the remote control protocol for controlling the AVR250 via the RS232 interface.
Conventions
nAll values in this section are hexadecimal values, unless otherwise specified.
Data transfer format
nTransfer rate: 38,400bps.
n1 start bit, 8 data bits, 1 stop bit, no parity, no flow control.
Command and response formats
Communication between the remote controller (RC) and the AVR250 takes the form of sequences of ASCII characters, with all commands and responses having the same basic format. The AVR250 shall always respond to a received command, but may also send messages at other times (i.e.,
Each transmission by the RC is seven bytes long with the following format: <STR> <CC> <P1> <P2> <ETR>
nSTR (Start transmission): 0x50, 0x43, 0x5F (“PC_”)
nCC (Command code): the code for the command
nPx (Parameter code): the parameters for the command
nETR (End transmission): 0xd
Each response by the AVR250 is eight bytes long with the following format: <STR> <RC> <AC> <P1> <P2> <ETR>
nSTR (Start transmission): 0x41, 0x56, 0x5f (“AV_”)
nRC (Reply code): = command code
nAC (Answer code): answer code (see below)
nPx (Parameter code): the parameters for the reponse
nETR (End transmission): 0xd
The AVR250 responds to each command from the RC within three seconds. The RC may send further commands before a previous command response has been received.
Answer codes
The following answer codes are defined:
nCommand OK – ‘P’ (0x50): The command has been accepted and processed completely.
nCommand Error – ‘R’ (0x52): An error occurred relating to the command received. This may be either an invalid command (at this time), or a command formatting error.
State changes as a result of other inputs
It is possible that the state of the AVR250 may be changed as a result of user input via the front panel buttons or via the IR remote control. Changes resulting from these inputs is relayed to the RC using the appropriate message type.
For example, if the user changed the front panel display brightness using the DISPLAY button on the front panel, a display message (defined below) would be sent to the RC. A similar action would be taken for all other state changes (including decode mode changes).
Example command and response sequence
As an example, the command to be sent to bring the main zone out of
STR CC P1 P2 ETR
PC_ * 1 1 (0xd)
Assuming that the command was accepted by the AVR250, the AVR250 shall respond to this command with the following sequence:
STR RC AC P1 P2 ETR
AV_ * P 1 1 (0xd)
AVR250