Overview, General protocol specifications, Command string structure – Contemporary Research 232-FMA User Manual

Page 7: Rs-232 control protocol

Advertising
background image

Contemporary Research

7

232-FMA FM Stereo Tuner

RS-232 Control Protocol

Overview

The 232-FMA full duplex RS-232 scheme enables a system programmer to control all FM Tuner functions as well

as monitor 3 groups of FM Tuner status. All commands are sent as ASCII strings. No delays between characters

or commands are required, as data is interrupt driven and buffered.

The 3 status groups are: Frequency/Source Seek, Audio Levels/Mode and Front Panel. The Mute A/V button-

function status from the 232-FMA front panel has been grouped with the Frequency/Source for simplicity in the

most common modes of operation. Each of the groups has one ASCII status response string containing all of

the status data for that group. The current status string of a group is sent from the 232-FMA whenever a valid

command for that group is received by the 232-FMA RS-232 port or front panel. A group's status may be

requested (without making a change) via the RS-232 port. Status of all 3 groups is sent at power up. The

format of each group's status response string remains the same always.

Up to 3 232-FMAs may be cabled together and addressed for individual control from a single RS232 port. Each

232-FMA is assigned a unique unit code (Front Panel Mode 2).

Communications parameters (Front Panel Mode 1) are 300 to 9600 baud, 8 data bits, No parity, and 1 stop bit.

Factory default is 9600 baud, Unit#1.

All settings are saved to NVRAM in the 232-FMA.

General protocol specifications

Characters in command strings to the 232-FMA are common ASCII keyboard characters.

Command strings sent to the 232-FMA begin with the ASCII > (greater than symbol) as an 'Attention' character

and end with the ASCII CR (carriage return) as an 'End-of-command' character.

Responses from the 232-FMA begin with the ASCII < (less than symbol) as an 'Attention' character and end

with the ASCII CR (carriage return) followed by an ASCII LF (line feed) as 'End-of-command' characters.


ASCII CR (carriage return) is required at the end of each command and is assumed in all examples

.

Command String Structure

[Attention] (Unit#) [Command] (Parameters) [CR]

Attention

Single character (>) starts the string

Unit #

The Unit# is expressed as an ASCII 1 2 or 3 when used in multi 232-FMA applications.

It may be omitted for a default of Unit#1 for a single 232-FMA set as Unit#1.

Command

A two-character command

Parameter

Added attributes to command

Return

A carriage return ends the command string, you may use ASCII CR, Hex $0D, or keyboard

‘Enter’ in programming. For simplicity, the programming examples in the manual will not show

the ‘CR’ – so remember, you’ll need to add it in your control code.

Advertising