Vous êtes sur la page 1sur 6

REVISION 4 9/27/00

CD20 REMOTE CONTROL VIA SERIAL PORT

CD20 REMOTE CONTROL VIA SERIAL PORT 1.0 Scope: Lifestyle 20, Lifestyle 25, and Lifestyle 30 share a common music center known internally at Bose as CD20. This document describes how to control CD20 using its RS232 serial port. Introduction: The CD20 serial port is used for several different purposes, some of which have different protocols. To accommodate the various uses and protocols, there are seven different serial port modes. (See Table 1) Of the seven modes, only the TAP (Test Access Port) mode should be used for CD20 control in consumer applications. Serial Port Characteristics: Firmware Revision Number: Serial port remote control of CD20 is only available on CD20 units with rmware revisions 6.1 or later. To determine whether the version is correct : With the unit OFF, press and hold these three keys simultaneously: Skip down, Tune down, source select (press last). The display should respond with something like "Crev 6.1" If you get no response or you get Crev 6.0, then the software is denitely not the version you want.

2.0

3.0 3.1

3.2

Circuit access: The serial port access is made through SER-IN (RING) and SER-OUT (TIP) pins of a standard 3.5 mm stereo phone jack (labeled SERIAL DATA on the back panel of the CD20). These pins are connected to the microprocessor through a protection circuit (including a 330 ohm serial resistor). The SER-IN also has a 10 K ohm pull-up to the +5V, so if a signal is not connected then the serial input is in an idle mode. Physical layer: The electrical signal on the serial port is a 5V RS-232 signal (be careful not to connect directly to a PC RS232 port - use a RS232 to TTL converter). Idle state is 5V. The baud rate is switchable between 1200 or 9600 baud. (Default is 1200 baud after power-up, since there is no hardware UART in the Toshiba micro used in the CD20. The 1200 baud is the recommended baud rate - but the system can handle 9600 baud also, although the bit error rate is higher). Since the UART function is implemented by software (there is only one timer which can be assigned for this task) the communication is only HALF DUPLEX. The raw bitstream is: 1 start bit, 8 bits data, No parity, 1 stop bit. Power-up sequence: After each power-up (about 300 msec after the hardware reset) or after any software reset is applied to the CD20 (e.g., send RST command through the serial port, or give reset from the keypad -STORE+ERASE+ON) the serial port sends out an '*' (ASCII 0x2A) and goes to IDLE mode. The external controller must explicitly invoke the desired serial mode (see section 5). By monitoring the serial port any reset event or power break of CD20 always can be detected (watch for the '*').

3.3

3.4

CD20 Serial Control

REV 4

4.0

Serial Port Modes: Table 1 lists the seven different modes of the serial port. Only one of them can be selected and utilized at any time (the serial port modes are not concurrent).

MODE #

MODE NAME

INTENDED PURPOSE

INVOKING SEQUENCE

COMMENTS

0. 1. 2. 3. 4. 5. 6.

Idle Debugger TAP Chameleon Reserved Reserved DEMO

Default Debugger for microprocessor Test Access Port Accessory Reserved Reserved Store demos

'Bose' Not for eld use

Default state after power on or reset Not for eld use

'TAP',<CR> Factory test, serial (from idle mode only) control of unit Reserved Supports Bose CE1 accessory Reserved Not for eld use Reserved Not for eld use Reserved Not for customer use

TABLE 1: CD20 SERIAL MODES 4.1 Idle mode: After each reset the serial port goes to idle mode. In this mode it is monitoring the SER-IN input, after receiving any character it will echo that back to the SER-OUT pin. With this echo mode, it is very easy to check the operation of the serial port using any type of terminal emulator program with a PC. The following four-character sequences are always monitored in the Idle mode for switching to the desired mode:(Characters sent to the CD20 are in Chicago font Commands are case sensitive.) TAP<CR> (to switch to TAP mode) RST<CR> (to give a software system restart) <CR> means 0x0D (Carriage return). 4.1.1 Invoking Idle Mode: In any mode, if the serial port receives the Bose character sequence, the software switches back to the Idle mode (this is a sure way to go back to idle, if the external device does not know which mode the CD20 is in). TAP Mode: The Test Access Port mode is intended for factory access to the internal test functions. It is also used for serial data control of the CD20. (In the following discussion, the external controller is assumed to be a PC). TAP mode is invoked from Idle mode by the character sequence: TAP<CR> (to switch to TAP mode) 4.3 Other Modes: Serial port modes other than Idle and TAP are not for use in consumer applications and should not be used.

4.2

CD20 Serial Control

REV 4

ulation command which allows commands from the serial port to be placed in the remote control command queue. Commands in the queue will be processed in the order received regardless of where they originate ( remote control or the serial port ). 5.1 Invoking TAP Mode: From the idle mode, the TAP mode is invoked by sending: TAP<CR> (to switch to TAP mode) 5.2 Exit from TAP mode: When the external control device is nished with a control session, the controller should release the serial data port by sending: axxx (to exit from TAP mode)

5.3

Protocol: Except for the single byte TAP_COMMAND_ COMING preamble command (a), the TAP command format consists of three bytes; the command and two data bytes (d1 and d2). Although some commands do not have explicit data bytes, three bytes must be sent. For those cases send any two bytes for place holders, but three bytes must be sent. A Command sequence protocol is as follows: (Controller is assumed to be a PC.) PC sends until it receives Then PC sends where, command = ASCII character representing the command and, data1, data2 = ASCII characters representing the data bytes The CD20 then sends or X W (TAP_ACK) if command can be completed; (TAP_NAK) if command can not be completed example: CD Play is sent and there is no disc. a X from CD20

<command><data1><data2>

Commands can not be concatenated. Except for the a command, when a command is sent to the CD20, the controller must wait until the CD20 has sent an acknowledgment before sending another command.

Example command sequence: (send CD20 ON/OFF) PC sends a

CD20 Serial Control

REV 4

receivesX

from CD20

then PC sends E@@(CD20 ON/OFF) 5.4 TAP Mode Zone Setup: After The CD20 is in the TAP mode, it must be told which zone to control. The zone select format is different from the other commands in that the data must be in hex. TAP_SEL_ZONE_1 TAP_SEL_ZONE_2 5.5 A<0x1> A<0x2>

TAP Mode Remote Control: To control CD20 remotely via the serial port, select TAP mode and use the TAP_simul_remote command set: TAP_simul_remote byte) where, d1 bit 5,6,7=x,x,x; and bit 4..0 = REMOTE CODE For the TAP_simul_remote command the following remote codes are available: (Since bits 5,6,&7 are dont care and it is easier on a terminal to use visible characters, Table 2 lists a corresponding visible character that has the same bit pattern in bits 0...4 as the hex command) E<d1><d2> (send d1 as a remote command; d2 as ller

CD20 Serial Control

REV 4

FUNCTION ON/OFF VOL UP SKIP REV PLAY/PAUSE SKIP FWD VOL DN NEXT DISC VIDEO 1 VIDEO 2 AUX CD AM/FM TAPE STOP MUTE MUTE ALL RANDOM SUR VOL UP SUR VOL DN

HEX 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh 10h 11h 12h

ASCII @ A B C D E F G H I J K L M N O P Q R

FUNCTION SURROUND STEREO + CENTER STEREO 0 1 2 3 4 5 6 7 8 9 PLAY PAUSE FAST_REV FAST_FWD

HEX 13h 14h 15h 16h 17h 18h 19h 1Ah 1Bh 1Ch 1Dh 1Eh 1Fh 20h 21h 22h 23h

ASCII S T U V W X Y Z [ \ ] ^ _ a b c

TABLE 2: REMOTE SIMULATE CODE SET

CD20 Serial Control

REV 4