Optoelectronics, Inc. OptoScan535 Serial Interface Specification Interface Version 1.0 April 22, 1995 INTRODUCTION This document describes the serial interface of the OptoScan535, an add-in circuit board for the Realistic PRO-2035 Scanning VHF/UHF Receiver. The OptoScan535 provides a serial computer interface, as well as built-in circuitry to decode Continuous Tone-Controlled Squelch System (CTCSS) sub-audible tones, Digitally-Coded Squelch (DCS) codes, and Dual-Tone Multi-Frequency (DTMF) digits. A Realistic PRO-2035 receiver equipped with an OptoScan535, along with a personal computer and the appropriate application software, forms a complete computer-aided scanning system capable of receiving VHF/UHF signals in the range 25 - 520 MHz, 760 - 823.995 MHz, 849 - 868.995 MHz, and 894 - 1300 MHz. AM, FM-narrowband, and FM-wideband modes are supported. This document was written to assist the programmer in developing software applications for the OptoScan535. In this document, the terms receiver or OptoScan535 receiver generally refer to a PRO-2035 receiver with an OptoScan535 board installed. Optoelectronics, Inc. assumes no responsibility for the accuracy of the information contained in this document. Optoelectronics, Inc. is under no obligation to provide technical support on matters pertaining to this document, or to provide notification of changes or corrections to this document. To inquire about possible revisions, or to order copies of this document, contact the factory. A nominal fee may be charged to cover printing and shipping costs. OPTOELECTRONICS, INC. 5821 N.E. 14th Avenue Fort Lauderdale, FL 33334 Phone: (305) 771-2050 FAX: (305) 771-2052 ABOUT CI-V The serial interface on the OptoScan535 conforms to the Icom CI-V interface standard. The CI-V interface is an asynchronous, half-duplex, Transistor Transistor Logic (TTL) serial interface connected in a wire-OR (bussed) configuration. Several different devices can be connected to the bus simultaneously, and each device has its own unique address. Software developers are strongly encouraged to obtain a copy of the Icom Communication Interface - V Reference Manual from Icom, Inc. for detailed information on the CI-V interface protocol. The communications parameters for the serial interface are listed in Table 1 below. Table 1. Communications Parameters. DATA RATE DIP switch selectable START BITS 1 DATA BITS 8 PARITY NONE STOP BITS 1 One important thing to note about the CI-V interface is that, as mentioned above, it is connected in a wire-OR configuration. This means that the transmit data signal and the receive data signal are connected together. Therefore, when a command is transmitted by the computer, it is automatically echoed back as received data, followed by the response to the command, if any. For example, if an eleven-byte command is transmitted to a device on the bus, which returns a six-byte response, the computer will receive a total of seventeen bytes. This configuration allows devices on the bus to monitor their own transmissions in order to detect interface collisions. A collision occurs when two or more devices transmit simultaneously. If a collision occurs, the command must be re-transmitted. The OptoScan535 includes a built-in CI-V - to - RS-232C interface converter. Its purpose is to convert the CI-V interface voltage levels to RS-232C levels compatible with most personal computers. This feature eliminates the need for an external interface converter box. The RS-232C interface is available on the 9-pin female "D"-type connector located on the rear panel. In addition, the RS-232C interface provides two optional interface signals, RTS and DCD, which can be used to significantly increase the scanning speed of the OptoScan535. These signals and their functions are not a part of the Icom CI-V interface specification. The use of these signals is described later. For multiple-receiver applications, such as connection of one or more OptoScan535 receivers to one or more Icom receivers, two standard CI-V miniature phone jacks are provided on the rear panel. In this configuration, one or more CI-V devices can be connected to the OptoScan535 by using one or both of the two CI-V jacks provided. If more than two additional devices are to be connected, external cabling such as common 3.5mm Y-adapters can be used to connect multiple devices. DIP SWITCH SETTINGS There are two DIP switches located on the OptoScan535 circuit board. S1 selects the CI-V interface address. Sixteen different addresses are available. In order to communicate with the OptoScan535, the computer software must specify the address selected by S1. The CI-V address switch settings are listed in Table 2 below. All addresses are specified in hexadecimal notation. The factory default setting, address 80, is shown in bold type. Table 2. CI-V Interface Address Dip Switch (S1) Settings. 1 2 3 4 ADDRESS 1 2 3 4 ADDRESS OFF OFF OFF OFF 80 OFF OFF OFF ON 88 ON OFF OFF OFF 81 ON OFF OFF ON 89 OFF ON OFF OFF 82 OFF ON OFF ON 8A ON ON OFF OFF 83 ON ON OFF ON 8B OFF OFF ON OFF 84 OFF OFF ON ON 8C ON OFF ON OFF 85 ON OFF ON ON 8D OFF ON ON OFF 86 OFF ON ON ON 8E ON ON ON OFF 87 ON ON ON ON 8F S2 selects the CI-V interface data rate. In order to communicate with the OptoScan535, the data rate of the computer serial port must match the data rate selected by S2. The CI-V data rate settings are listed in Table 3 below. The factory default setting, 9600 bps, is shown in bold type. The 9600 bps data rate is strongly recommended, as a lower data rate will impair scanning speed. Table 3. CI-V Interface Data Rate Dip Switch (S2) Settings. 1 2 3 4 DATA RATE 1 2 3 4 DATA RATE OFF OFF OFF OFF 75 bps OFF OFF OFF ON 9600 bps ON OFF OFF OFF 110 bps ON OFF OFF ON 19200 bps OFF ON OFF OFF 150 bps OFF ON OFF ON 38400 bps ON ON OFF OFF 300 bps ON ON OFF ON unused OFF OFF ON OFF 600 bps OFF OFF ON ON unused ON OFF ON OFF 1200 bps ON OFF ON ON unused OFF ON ON OFF 2400 bps OFF ON ON ON unused ON ON ON OFF 4800 bps ON ON ON ON unused CTCSS/DCS/DTMF DECODER The OptoScan535 contains built-in circuitry to decode Continuous Tone-Controlled Squelch System (CTCSS) sub-audible tones, Digitally-Coded Squelch (DCS) codes, and Dual-Tone Multi-Frequency (DTMF) digits. The CTCSS/DCS/DTMF decoder operates whether the receiver is under REMOTE control or LOCAL control. However, decoding only takes place when the squelch is open and FM-narrowband mode is selected. If CTCSS/DCS/DTMF decoding is to be performed while the receiver is under LOCAL control, then FM-narrowband mode must be selected from the front panel under LOCAL control. The OptoScan535 is capable of decoding 52 CTCSS tones. The specified acquisition time of the CTCSS decoder is 200 milliseconds (0.2 seconds). At times it may be faster, or, if the incoming signal is weak or noisy, it may be slower. The specific CTCSS tones decoded by the OptoScan535 are listed in Table 4 below. Table 4. CTCSS tones. 60.0 100.0 151.4 192.8 67.0 103.5 156.7 196.6 69.3 107.2 159.8 199.5 71.9 110.9 162.2 203.5 74.4 114.8 165.5 206.5 77.0 118.8 167.9 210.7 79.7 120.0 171.3 218.1 82.5 123.0 173.8 225.7 85.4 127.3 177.3 229.1 88.5 131.8 179.9 233.6 91.5 136.5 183.5 241.8 94.8 141.3 186.2 250.3 97.4 146.2 189.9 254.1 The OptoScan535 is capable of decoding 106 DCS codes. The specified acquisition time of the DCS decoder is 350 milliseconds (0.35 seconds). At times it may be faster, or, if the incoming signal is weak or noisy, it may be slower. The specific DCS codes decoded by the OptoScan535 are listed in Table 5 below. Table 5. DCS codes. 017 125 251 411 565 023 131 252 412 606 025 132 255 413 612 026 134 261 423 624 031 143 263 431 627 032 145 265 432 631 036 152 266 445 632 043 155 271 446 654 047 156 274 452 662 050 162 306 454 664 051 165 311 455 703 053 172 315 462 712 054 174 325 464 723 065 205 331 465 731 071 212 332 466 732 072 223 343 503 734 073 225 346 506 743 074 226 351 516 754 114 243 356 523 115 244 364 526 116 245 365 532 122 246 371 546 The OptoScan535 is capable of decoding 16 DTMF digits. The specified maximum digit rate of the DTMF decoder is 10 digits per second. The specific DTMF digits decoded by the OptoScan535 are listed in Table 6 below. Table 6. DTMF digits. 1 2 3 A 4 5 6 B 7 8 9 C * 0 # D PIPELINED TUNING Perhaps the most significant feature of the OptoScan535 is its ability to pipeline the tuning operation. This is important because it significantly increases the maximum possible scanning speed of the PRO-2035 receiver. By making use of this feature, scanning speeds of up to 80 channels per second are possible. In non-pipelined computer-aided scanning systems, scanning each frequency involves three main steps performed in sequence. First, the command or commands to tune the receiver to the new frequency and/or mode must be issued. The amount of time required by this step depends on the number of bytes in the command or commands and their responses, and the serial interface data rate. The second step involves the settling time of the receiver, once the new frequency and/or mode command or commands have been received. The receiver settling time includes the time necessary for the synthesizers to slew and re-acquire lock, the time necessary for the preselector filters to settle, and the time necessary for the squelch detection circuitry to respond. The settling time of the PRO-2035 receiver with the OptoScan535 installed is 12 milliseconds (0.012 seconds). Third, the command to request squelch status must be issued and the response returned. The amount of time required by this step is again dependent on the length of the command and its response, and the serial interface data rate. To increase scanning speed, the overall time required for the three steps outlined above must be reduced. Receiver settling time is generally a function of the hardware architecture. Therefore, nothing much can be done to reduce the settling time, short of a fairly major re-design of the receiver hardware. The remaining area of concern is the transit time of commands and responses on the serial interface. One obvious way to reduce the serial interface transit time is to simply increase the data rate. However, even at 19,200 bps, the practical limit of most PC-based serial ports, the collective transit time of the necessary commands and responses is several milliseconds. The most desirable solution is to completely eliminate the serial interface transit time from impacting the scanning speed. This can be accomplished by the use of pipelining. The basic concept of the OptoScan535 pipelined tuning scheme is to take advantage of the otherwise wasted receiver settling time by sending the next frequency and mode to the receiver while it is still settling on the current frequency and mode. A special command, TRANSFER NEXT FREQUENCY/MODE, is provided in which the next frequency and mode are sent to the receiver, but do not take effect until commanded to do so. Therefore, the transit time of the command is totally transparent, as long as it is completed within the settling time of the receiver. This can be easily accomplished at an interface data rate of 19,200 bps. In fact, there is no advantage to increasing the data rate beyond 19,200 bps, since the limiting factor is the 12 millisecond receiver settling time. To complete the operation, two hardware interface signals are added. First, the Request To Send (RTS) RS-232C interface signal is used as a hardware tuning command. Once the next frequency and mode have been sent to the receiver using the TRANSFER NEXT FREQUENCY/MODE command, the receiver is commanded to tune to the next frequency and mode by simply changing the state of the RTS signal. If it was previously negated, it is asserted. If it was previously asserted, it is negated. The receiver immediately begins settling on the next frequency and mode, which have now become the current frequency and mode. Second, the Data Carrier Detect (DCD) RS-232C interface signal is used as a hardware squelch indicator. This eliminates the need to send a command over the serial interface to request squelch status, and wait for the response. The steps involved in implementing a fully pipelined computer-aided scanning system are summarized below: Step 1: Command the receiver to select REMOTE control. Step 2: Send the next frequency and mode to the receiver using the TRANSFER NEXT FREQUENCY/MODE command. Step 3: Change the state of the RTS interface signal to cause the next frequency and mode to become the current frequency and mode, and the receiver to begin settling. Step 4: While the receiver is still settling on the current frequency and mode, send the next frequency and mode to the receiver using the TRANSFER NEXT FREQUENCY/MODE command. Step 5: Wait for the receiver to finish settling. The total settling time, including sending the next frequency and mode, is 12 milliseconds (0.012 seconds). Step 6: Check the squelch status by reading the DCD interface signal. If the squelch is open, scanning is stopped. Otherwise, scanning continues. Optionally, the status of the CTCSS/DCS/DTMF decoder can be checked, and the appropriate action taken. Step 7: Continuously repeat steps 3 through 6 above. Of course, either of the two hardware interface signals can be used without the other, but maximum scanning speed is achieved when both are used. It should be noted that the implementation of the RTS and DCD interface signals by the OptoScan535 is not a part of the Icom CI-V interface specification, which specifies only the serial interface protocol. If more than one OptoScan535 receiver is connected on the bus, then special hardware provisions must be made to provide RTS and DCD signals for each receiver. However, the details are beyond the scope of this specification. Alternatively, the appropriate serial interface commands can be used in place of the two hardware signals, but maximum scanning speed will be degraded. COMMAND REFERENCE As mentioned earlier, the OptoScan535 conforms to the Icom CI-V interface standard. In this section, all CI-V command and response bytes are expressed in hexadecimal notation. The OptoScan535 recognizes twenty-five different commands. The first nine commands are standard CI-V commands compatible with receivers such as the Icom R-7100. The remaining "7F" series commands are special OptoScan535 commands provided to access features, such as CTCSS/DCS/DTMF decoding, not generally found on other receivers. The commands, along with their corresponding responses, are summarized in Table 7 below. Following the table is a detailed description of each of the commands, including examples illustrating their use. In the command descriptions, "ra" refers to the RECEIVE ADDRESS, and "ta" refers to the TRANSMIT ADDRESS. The RECEIVE ADDRESS is the address of the OptoScan535. DIP switch S1 is used to select any address in the range 80 through 8F. Each device on the CI-V bus must have its own unique address. The OptoScan535 will not process any command in which the RECEIVE ADDRESS does not match the address selected by S1. However, the OptoScan535 will process commands with a RECEIVE ADDRESS of 00, but all command responses will be suppressed. A RECEIVE ADDRESS of 00 has special meaning. It provides a means for a device on the CI-V bus to transmit a command to all other devices simultaneously. However, since several simultaneous responses would cause a collision, the responses are suppressed. The TRANSMIT ADDRESS is the address of the device which is transmitting the command to the OptoScan535. In most cases, this device is a personal computer executing application software, usually referred to as the CONTROLLER. The standard address for the CONTROLLER is E0, but any address can be used for the TRANSMIT ADDRESS. However, the TRANSMIT ADDRESS must be in the range 01 to EF. Also, the OptoScan535 will not process any command in which the TRANSMIT ADDRESS matches its own address selected by S1. Table 7. OptoScan535 CI-V Interface Command Summary. COMMAND SUB-COMMAND DESCRIPTION 00 - Transfer frequency, no response. 01 - Transfer mode, no response. 02 - Read upper/lower-edge frequency. 03 - Read frequency. 04 - Read mode. 05 - Write frequency. 06 - Write mode. 15 01 Read squelch status. 15 02 Read signal strength. 7F 01 Select LOCAL control (front panel). 7F 02 Select REMOTE control (computer interface). 7F 03 Enable tape recorder. 7F 04 Disable tape recorder. 7F 05 Read status. 7F 06 Read CTCSS tone. 7F 07 Read DCS code. 7F 08 Read DTMF digit. 7F 09 Read identification 7F 0A Enable speaker audio. 7F 0B Disable speaker audio. 7F 0C Enable 5 kHz search window. 7F 0D Disable 5 kHz search window. 7F 0E Transfer next frequency/mode, no response. 7F 0F Enable search mode. 7F 10 Disable search mode. TRANSFER FREQUENCY Command: FE FE ra ta 00 frequency FD Example: 437.162500 MHz FE FE 80 E0 00 00 25 16 37 04 FD Response: NONE Description: This command selects the operating frequency of the receiver. However, no response is returned under any condition. This command is only valid when the unit is under REMOTE control. The frequency data is in the form of five bytes, each consisting of two BCD digits. The order of the ten BCD digits is as follows: 10 Hz digit, 1 Hz digit, 1 kHz digit, 100 Hz digit, 100 kHz digit, 10 kHz digit, 10 MHz digit, 1 MHz digit, 1 GHz digit, 100 MHz digit. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, or if the received frequency is not in the range 25 - 520 MHz, 760 - 823.995 MHz, 849 - 868.995 MHz, or 894 - 1300 MHz, or is not an even multiple of 5 kHz or 12.5 kHz, the command is ignored. TRANSFER MODE Command: FE FE ra ta 01 md FD md is a BCD value representing the desired operating mode. BCD values are encoded as follows: 02: AM 05: FM-narrowband 06: FM-wideband Example: FM-narrowband FE FE 80 E0 01 05 FD Response: NONE Description: This command selects the operating mode of the receiver. However, no response is returned under any condition. This command is only valid when the unit is under REMOTE control. The mode data is in the form of one byte, consisting of two BCD digits. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, or if the received mode data is not valid, the command is ignored. READ UPPER/LOWER-EDGE FREQUENCY Command: FE FE ra ta 02 FD Example: FE FE 80 E0 02 FD Response: FE FE ta ra 02 lower frequency 2D upper frequency FD Example: 25.000000 - 1300.000000 MHz FE FE E0 80 02 00 00 00 25 00 2D 00 00 00 00 13 FD Description: This command instructs the unit to send the upper and lower edge of the operating frequency range. This command is valid at any time. The frequency data is in the form of five bytes, each consisting of two BCD digits. The order of the ten BCD digits is as follows: 10 Hz digit, 1 Hz digit, 1 kHz digit, 100 Hz digit, 100 kHz digit, 10 kHz digit, 10 MHz digit, 1 MHz digit, 1 GHz digit, 100 MHz digit. See the example shown above. If the command length is incorrect, the command is ignored, and the error response is returned. READ FREQUENCY Command: FE FE ra ta 03 FD Example: FE FE 80 E0 03 FD Response: FE FE ta ra 03 frequency FD Examples: 162.550000 MHz FE FE E0 80 03 00 00 55 62 01 FD Error FE FE E0 80 FA FD Description: This command instructs the unit to send the current operating frequency. This command is only valid when the unit is under REMOTE control. The frequency data is in the form of five bytes, each consisting of two BCD digits. The order of the ten BCD digits is as follows: 10 Hz digit, 1 Hz digit, 1 kHz digit, 100 Hz digit, 100 kHz digit, 10 kHz digit, 10 MHz digit, 1 MHz digit, 1 GHz digit, 100 MHz digit. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. READ MODE Command: FE FE ra ta 04 FD Example: FE FE 80 E0 04 FD Response: FE FE ta ra 04 md FD md is a BCD value representing the currently selected operating mode. BCD values are encoded as follows: 02: AM 05: FM-narrowband 06: FM-wideband Examples: AM FE FE E0 80 04 02 FD Error FE FE E0 80 FA FD Description: This command instructs the unit to send the current operating mode. This command is only valid when the unit is under REMOTE control. The mode data is in the form of one byte, consisting of two BCD digits. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. WRITE FREQUENCY Command: FE FE ra ta 05 frequency FD Example: 162.550000 MHz FE FE 80 E0 05 00 00 55 62 01 FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command selects the operating frequency of the receiver. This command is only valid when the unit is under REMOTE control. The frequency data is in the form of five bytes, each consisting of two BCD digits. The order of the ten BCD digits is as follows: 10 Hz digit, 1 Hz digit, 1 kHz digit, 100 Hz digit, 100 kHz digit, 10 kHz digit, 10 MHz digit, 1 MHz digit, 1 GHz digit, 100 MHz digit. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, or if the received frequency is not in the range 25 - 520 MHz, 760 - 823.995 MHz, 849 - 868.995 MHz, or 894 - 1300 MHz, or is not an even multiple of 5 kHz or 12.5 kHz, the command is ignored, and the error response is returned. WRITE MODE Command: FE FE ra ta 06 md FD md is a BCD value representing the desired operating mode. BCD values are encoded as follows: 02: AM 05: FM-narrowband 06: FM-wideband Example: FM-wideband FE FE 80 E0 06 06 FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command selects the operating mode of the receiver. This command is only valid when the unit is under REMOTE control. The mode data is in the form of one byte, consisting of two BCD digits. See the example shown above. If the command length is incorrect, or if the unit is under LOCAL control, or if the received mode data is not valid, the command is ignored, and the error response is returned. READ SQUELCH STATUS Command: FE FE ra ta 15 01 FD Example: FE FE 80 E0 15 01 FD Response: FE FE ta ra 15 01 sd FD Examples: Squelch closed FE FE E0 80 15 01 00 FD Squelch open FE FE E0 80 15 01 01 FD Description: This command instructs the unit to send the current squelch status. This command is valid at any time. The squelch status data is in the form of one byte, consisting of two BCD digits. See the examples shown above. If the command length is incorrect, the command is ignored, and the error response is returned. READ SIGNAL STRENGTH Command: FE FE ra ta 15 02 FD Example: FE FE 80 E0 15 02 FD Response: FE FE ta ra 15 02 sd FD Examples: - 20 dBm FE FE E0 80 15 02 00 20 FD - 67 dBm FE FE E0 80 15 02 00 67 FD - 137 dBm FE FE E0 80 15 02 01 37 FD Description: This command instructs the unit to send the current signal strength. This command is valid at any time. The signal strength data is in the form of two bytes, each consisting of two BCD digits. The signal strength is reported in units of absolute dBm as measured at the antenna connector. The reported signal strength ranges from a maximum signal of - 20 dBm to a minimum signal of - 137 dBm. A minus sign is implied. See the examples shown above. If the command length is incorrect, the command is ignored, and the error response is returned. SELECT LOCAL CONTROL Command: FE FE ra ta 7F 01 FD Example: FE FE 80 E0 7F 01 FD Response: OK FE FE ta ra FB FD Example: OK FE FE E0 80 FB FD Description: This command selects LOCAL control. This command is valid at any time. When the unit is under LOCAL control, the OptoScan535 board relinquishes control of the receiver hardware to the PRO-2035 processor. However, the operating parameters are retained for use when the unit is under REMOTE control. If the command length is incorrect, the command is ignored, and the error response is returned. SELECT REMOTE CONTROL Command: FE FE ra ta 7F 02 FD Example: FE FE 80 E0 7F 02 FD Response: OK FE FE ta ra FB FD Example: OK FE FE E0 80 FB FD Description: This command selects REMOTE control. This command is valid at any time. When the unit is under REMOTE control, the OptoScan535 board shuts down the PRO-2035 processor, and takes control of the receiver hardware. If the command length is incorrect, the command is ignored, and the error response is returned. ENABLE TAPE RECORDER Command: FE FE ra ta 7F 03 FD Example: FE FE 80 E0 7F 03 FD Response: OK FE FE ta ra FB FD Example: OK FE FE E0 80 FB FD Description: This command enables a tape recorder connected to the TAPE PAUSE output. This command is valid at any time. The TAPE PAUSE output provides a pair of isolated relay contacts which are closed when the tape recorder is enabled, and open when the tape recorder is disabled. The power-up default mode is tape recorder disabled. If the command length is incorrect, the command is ignored, and the error response is returned. DISABLE TAPE RECORDER Command: FE FE ra ta 7F 04 FD Example: FE FE 80 E0 7F 04 FD Response: OK FE FE ta ra FB FD Example: OK FE FE E0 80 FB FD Description: This command disables a tape recorder connected to the TAPE PAUSE output. This command is valid at any time. The TAPE PAUSE output provides a pair of isolated relay contacts which are closed when the tape recorder is enabled, and open when the tape recorder is disabled. The power-up default mode is tape recorder disabled. If the command length is incorrect, the command is ignored, and the error response is returned. READ STATUS Command: FE FE ra ta 7F 05 FD Example: FE FE 80 E0 7F 05 FD Response: FE FE ta ra 7F 05 s1 s2 s3 FD s1 is a hexadecimal byte representing composite status information. Individual bits are encoded as follows: bit 0: 1 = Remote control bit 1: 1 = DTMF digit/s pending bit 2: 1 = DTMF buffer overrun bit 3: Unused, always 0 bit 4: 1 = Squelch open bit 5: 1 = CTCSS tone active bit 6: 1 = DCS code active bit 7: Unused, always 0 s2 is a hexadecimal byte representing composite status information. Individual bits are encoded as follows: bit 0: 1 = Tape recorder enabled bit 1: 1 = Speaker audio enabled bit 2: 1 = 5 kHz search window enabled bit 3: Unused, always 0 bit 4: 1 = Audio present bit 5: 1 = Search mode enabled bit 6: Reserved bit 7: Unused, always 0 s3 is a hexadecimal byte representing composite status information. Individual bits are encoded as follows: bit 0: 1 = Frequency command received bit 1: 1 = Mode command received bit 2: 1 = Pipelined frequency/mode command received bit 3: Unused, always 0 bit 4: Reserved bit 5: Reserved bit 6: Reserved bit 7: Unused, always 0 Example: Remote mode, DTMF digit pending, squelch open, DCS code active, Audio enabled, Audio present FE FE E0 80 7F 05 53 12 00 FD Description: This command instructs the unit to send the current operating status. This command is valid at any time. If the command length is incorrect, the command is ignored, and the error response is returned. The current operating status contains all pertinent information about the receiver and CTCSS/DCS/DTMF decoder, including squelch status. Therefore, the READ SQUELCH STATUS command is optional. The following is a discussion of the use of the status bits contained in the READ STATUS command. Note that the CTCSS/DCS/DTMF decoder is only enabled when the squelch is open. Therefore, the appropriate status bits should be checked frequently while the squelch is open. s1, bit 0: REMOTE CONTROL. This bit is set when the receiver is under REMOTE control, and cleared when the receiver is under LOCAL control. It is a good idea to check this bit periodically, in case the receiver has been turned off and back on, and has therefore reverted back to LOCAL control. s1, bit 1: DTMF PENDING. This bit is set if one or more DTMF digits are waiting in the 31-digit DTMF buffer. One or more READ DTMF DIGIT commands should then be issued to read the new digits. The DTMF PENDING bit is automatically cleared when the last digit is read from the DTMF buffer. The READ DTMF DIGIT command will always return the next DTMF digit in the order received. In other words, the DTMF buffer works like a FIFO. Once the DTMF buffer is empty, the READ DTMF DIGIT command will return a "99" code to indicate that the buffer is empty. This feature eliminates the need to check the DTMF PENDING bit after each digit has been read from the buffer. s1, bit 2: DTMF OVERRUN. This bit is set if one or more new DTMF digits are received after the DTMF buffer is full. It is an indication that one or more DTMF digits have been lost. Any digits received after the DTMF buffer becomes full are discarded. The DTMF OVERRUN bit is cleared when a READ DTMF DIGIT command is issued. The maximum supported DTMF digit rate is approximately 10 per second. Therefore, the DTMF PENDING bit should be checked at least every two to three seconds to avoid losing digits. s1, bit 3: UNUSED. This bit will always be zero. s1, bit 4: SQUELCH OPEN. This bit is set when the squelch is open, and cleared when the squelch is closed. This bit provides that same information as the READ SQUELCH STATUS command. s1, bit 5: CTCSS ACTIVE. This bit is set when a valid CTCSS tone is currently being received. A READ CTCSS TONE command should then be issued to read the CTCSS tone. The READ CTCSS TONE command will always return the most recent CTCSS tone, even if the tone is no longer being received, so the command should only be issued while the CTCSS ACTIVE bit is set. Note that the CTCSS ACTIVE bit does not function the way the DTMF PENDING bit does. The CTCSS ACTIVE bit is only set while a valid CTCSS tone is being received. It does not store the previous occurrence of a CTCSS tone. s1, bit 6: DCS ACTIVE. This bit is set when a valid DCS code is currently being received. A READ DCS CODE command should then be issued to read the DCS code. The READ DCS CODE command will always return the most recent DCS code, even if the code is no longer being received, so the command should only be issued while the DCS ACTIVE bit is set. Note that the DCS ACTIVE bit does not function the way the DTMF PENDING bit does. It is only set while a valid DCS code is being received. It does not store the previous occurrence of a DCS code. s1, bit 7: UNUSED. This bit will always be zero. s2, bit 0: TAPE ENABLED. This bit is set when the tape recorder is enabled, and cleared when the tape recorder is disabled. The tape recorder is enabled using the ENABLE TAPE RECORDER command. The tape recorder is disabled using the DISABLE TAPE RECORDER command. s2, bit 1: SPEAKER ENABLED. This bit is set if the speaker audio is enabled, and cleared if the speaker audio is disabled. The speaker audio is enabled using the ENABLE SPEAKER AUDIO command. The speaker audio is disabled using the DISABLE SPEAKER AUDIO command. s2, bit 2: 5 KHZ SEARCH. This bit is set if the 5 kHz search window is enabled, and cleared if the 5 kHz search window is disabled. The 5 kHz search window is enabled using the ENABLE 5 KHZ SEARCH WINDOW command. The 5 kHz search window is disabled using the DISABLE 5 KHZ SEARCH WINDOW command. s2, bit 3: UNUSED. This bit will always be zero. s2, bit 4: AUDIO PRESENT. This bit is set when audio is present on the current frequency, and cleared when no audio is present. This bit allows the programmer to make use of the SOUND SQUELCH feature of the PRO- 2006/5 receiver, which provides a means to skip over dead carrier signals. s2, bit 5: SEARCH MODE. This bit is set if the search mode is enabled, and cleared if the search mode is disabled. The search mode is enabled using the ENABLE SEARCH MODE command. The search mode is disabled using the DISABLE SEARCH MODE command. s2, bit 6: RESERVED. This bit is reserved for future use. s2, bit 7: UNUSED. This bit will always be zero. s3, bit 0: FREQUENCY RECEIVED. This bit is set upon successful reception of a valid TRANSFER FREQUENCY or WRITE FREQUENCY command. It provides a means to determine if a frequency command transmitted by the controller was executed by the receiver. This bit is automatically cleared after a READ STATUS command. s3, bit 1: MODE RECEIVED. This bit is set upon successful reception of a valid TRANSFER MODE or WRITE MODE command. It provides a means to determine if a mode command transmitted by the controller was executed by the receiver. This bit is automatically cleared after a READ STATUS command. s3, bit 2: PIPELINE RECEIVED. This bit is set upon successful reception of a valid TRANSFER NEXT FREQUENCY/MODE command. It provides a means to determine if a pipelined frequency/mode command transmitted by the controller was executed by the receiver. This bit is automatically cleared after a READ STATUS command. s3, bit 3: UNUSED. This bit will always be zero. s3, bit 4: RESERVED. This bit is reserved for future use. s3, bit 5: RESERVED. This bit is reserved for future use. s3, bit 6: RESERVED. This bit is reserved for future use. s3, bit 7: UNUSED. This bit will always be zero. READ CTCSS TONE Command: FE FE ra ta 7F 06 FD Example: FE FE 80 E0 7F 06 FD Response: FE FE ta ra 7F 06 sd FD Examples: 82.5 Hz FE FE E0 80 7F 06 08 25 FD 103.5 Hz FE FE E0 80 7F 06 10 35 FD Description: This command instructs the unit to send the most recent CTCSS tone. This command is valid at any time. The CTCSS data is in the form of two bytes, each consisting of two BCD digits. The order of the four BCD digits is as follows: 100 Hz digit, 10 Hz digit, 1 Hz digit, 0.1 Hz digit. See the examples shown above. A complete list of the CTCSS tones decoded by the OptoScan535 is given in Table 3. It should be noted that this command will always return the most recent CTCSS tone, even if the tone is no longer being received. Therefore, the CTCSS ACTIVE bit should first be checked to determine whether or not a CTCSS tone is currently being received. The CTCSS ACTIVE bit is accessed through the READ STATUS command. If the command length is incorrect, the command is ignored, and the error response is returned. READ DCS CODE Command: FE FE ra ta 7F 07 FD Example: FE FE 80 E0 7F 07 FD Response: FE FE ta ra 7F 07 sd FD Examples: 023 FE FE E0 80 7F 07 00 23 FD 732 FE FE E0 80 7F 07 07 32 FD Description: This command instructs the unit to send the most recent DCS code. This command is valid at any time. The DCS data is in the form of two bytes, each consisting of two BCD digits. The order of the four BCD digits is as follows: unused digit (always 0), 100's digit, 10's digit, 1's digit. See the examples shown above. A complete list of the DCS codes decoded by the OptoScan535 is given in Table 4. It should be noted that this command will always return the most recent DCS code, even if the code is no longer being received. Therefore, the DCS ACTIVE bit should first be checked to determine whether or not a DCS code is currently being received. The DCS ACTIVE bit is accessed through the READ STATUS command. If the command length is incorrect, the command is ignored, and the error response is returned. READ DTMF DIGIT Command: FE FE ra ta 7F 08 FD Example: FE FE 80 E0 7F 08 FD Response: FE FE ta ra 7F 08 sd FD sd is a BCD value representing the next DTMF digit. BCD values are encoded as follows: 00: "0" 08: "8" 99: DTMF Buffer Empty 01: "1" 09: "9" 02: "2" 10: "A" 03: "3" 11: "B" 04: "4" 12: "C" 05: "5" 13: "D" 06: "6" 14: "*" 07: "7" 15: "#" Examples: "3" FE FE E0 80 7F 08 03 FD "A" FE FE E0 80 7F 08 10 FD DTMF Buffer Empty FE FE E0 80 7F 08 99 FD Description: This command instructs the unit to send the next DTMF digit waiting in the 31-digit DTMF buffer. This command is valid at any time. The DTMF data is in the form of one byte, consisting of two BCD digits. The BCD digits are encoded as shown above. Each issuance of the READ DTMF DIGIT command causes the next digit in the DTMF buffer to be sent in the order it was received, in a First-In-First-Out (FIFO) fashion. Once the DTMF buffer is empty, the READ DTMF DIGIT command returns the DTMF Buffer Empty code. See the examples shown above. If the command length is incorrect, the command is ignored, and the error response is returned. READ IDENTIFICATION Command: FE FE ra ta 7F 09 FD Example: FE FE 80 E0 7F 09 FD Response: FE FE ta ra 7F 09 id sv iv FD Example: OptoScan535, software version 1.0, interface version 1.0 FE FE E0 80 7F 09 35 33 35 10 10 FD Description: This command instructs the unit to send the identification information. This command is valid at any time. The identification data is in the form of five bytes, each consisting of two BCD digits. The first six BCD digits uniquely identify the device. The next two BCD digits indicate the current software version. The last two BCD digits indicate the current interface version. If the command length is incorrect, the command is ignored, and the error response is returned. ENABLE SPEAKER AUDIO Command: FE FE ra ta 7F 0A FD Example: FE FE 80 E0 7F 0A FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command enables the speaker audio. This command is only valid when the unit is under REMOTE control. The speaker audio can be enabled and disabled under software control to facilitate selective scanning. This feature allows the software to mute the speaker audio unless a certain CTCSS tone, or DCS code, or DTMF digit sequence is detected on a particular frequency. The power-up default mode is speaker audio enabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. DISABLE SPEAKER AUDIO Command: FE FE ra ta 7F 0B FD Example: FE FE 80 E0 7F 0B FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command disables the speaker audio. This command is only valid when the unit is under REMOTE control. The speaker audio can be enabled and disabled under software control to facilitate selective scanning. This feature allows the software to mute the speaker audio unless a certain CTCSS tone, or DCS code, or DTMF digit sequence is detected on a particular frequency. The power-up default mode is speaker audio enabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. ENABLE 5 KHZ SEARCH WINDOW Command: FE FE ra ta 7F 0C FD Example: FE FE 80 E0 7F 0C FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command enables the 5 kHz search window. This command is only valid when the unit is under REMOTE control. The search mode can be enabled by the software when a limit search is conducted. When search mode is enabled, a squelch open indication is only given if the currently recieved signal is centered on the receiver's tuned frequency. This provides more selective squelch operation, which helps prevent the receiver from stopping 5 or 10 kHz away from the actual transmitter frequency. In addition, the 5 kHz search window can be enabled to make the squelch indication even more selective. When 5 kHz channel spacing is used, the 5 kHz search window should be enabled. When 12.5 kHz or wider channel spacing is used, the 5 kHz search window should be disabled. When the search mode is disabled, the setting of the 5 kHz search window has no effect. The power-up default mode is search mode disabled and 5 kHz search window disabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. DISABLE 5 KHZ SEARCH WINDOW Command: FE FE ra ta 7F 0D FD Example: FE FE 80 E0 7F 0D FD Response: FE FE ta ra FB or FA FD Example: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command disables the 5 kHz search window. This command is only valid when the unit is under REMOTE control. The search mode can be enabled by the software when a limit search is conducted. When search mode is enabled, a squelch open indication is only given if the currently recieved signal is centered on the receiver's tuned frequency. This provides more selective squelch operation, which helps prevent the receiver from stopping 5 or 10 kHz away from the actual transmitter frequency. In addition, the 5 kHz search window can be enabled to make the squelch indication even more selective. When 5 kHz channel spacing is used, the 5 kHz search window should be enabled. When 12.5 kHz or wider channel spacing is used, the 5 kHz search window should be disabled. When the search mode is disabled, the setting of the 5 kHz search window has no effect. The power-up default mode is search mode disabled and 5 kHz search window disabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. TRANSFER NEXT FREQUENCY/MODE Command: FE FE ra ta 7F 0E frequency md FD md is a BCD value representing the desired operating mode. BCD values are encoded as follows: 02: AM 05: FM-narrowband 06: FM-wideband Examples: 435.162500 MHz, FM-narrowband FE FE 80 E0 7F 0E 00 25 16 35 04 05 FD 99.500000 MHz, FM-wideband FE FE 80 E0 7F 0E 00 00 50 99 00 06 FD Response: NONE Description: This command selects the next operating frequency and operating mode of the receiver. However, no response is returned under any condition. This command is only valid when the unit is under REMOTE control. The frequency data is in the form of five bytes, each consisting of two BCD digits. The order of the ten BCD digits is as follows: 10 Hz digit, 1 Hz digit, 1 kHz digit, 100 Hz digit, 100 kHz digit, 10 kHz digit, 10 MHz digit, 1 MHz digit, 1 GHz digit, 100 MHz digit. The mode data is in the form of one byte, consisting of two BCD digits. See the examples shown above. This command allows the software to make use of the OptoScan535 pipelined tuning feature. The next frequency and mode specified by this command are stored by the OptoScan535. However, the receiver is not tuned to the next frequency and mode until a transition is detected on the RTS interface signal. This feature allows the next frequency and mode to be sent to the receiver while waiting for the receiver to settle on the current frequency and mode. If the command length is incorrect, or if the unit is under LOCAL control, or if the received frequency is not in the range 25 - 520 MHz, 760 - 823.995 MHz, 849 - 868.995 MHz, or 894 - 1300 MHz, or is not an even multiple of 5 kHz or 12.5 kHz, or if the received mode data is not valid, the command is ignored. ENABLE SEARCH MODE Command: FE FE ra ta 7F 0F FD Example: FE FE 80 E0 7F 0F FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command enables the search mode. This command is only valid when the unit is under REMOTE control. The search mode can be enabled by the software when a limit search is conducted. When search mode is enabled, a squelch open indication is only given if the currently recieved signal is centered on the receiver's tuned frequency. This provides more selective squelch operation, which helps prevent the receiver from stopping 5 or 10 kHz away from the actual transmitter frequency. In addition, the 5 kHz search window can be enabled to make the squelch indication even more selective. When 5 kHz channel spacing is used, the 5 kHz search window should be enabled. When 12.5 kHz or wider channel spacing is used, the 5 kHz search window should be disabled. When the search mode is disabled, the setting of the 5 kHz search window has no effect. The power-up default mode is search mode disabled and 5 kHz search window disabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. DISABLE SEARCH MODE Command: FE FE ra ta 7F 10 FD Example: FE FE 80 E0 7F 10 FD Response: FE FE ta ra FB or FA FD Examples: OK FE FE E0 80 FB FD Error FE FE E0 80 FA FD Description: This command disables the search mode. This command is only valid when the unit is under REMOTE control. The search mode can be enabled by the software when a limit search is conducted. When search mode is enabled, a squelch open indication is only given if the currently recieved signal is centered on the receiver's tuned frequency. This provides more selective squelch operation, which helps prevent the receiver from stopping 5 or 10 kHz away from the actual transmitter frequency. In addition, the 5 kHz search window can be enabled to make the squelch indication even more selective. When 5 kHz channel spacing is used, the 5 kHz search window should be enabled. When 12.5 kHz or wider channel spacing is used, the 5 kHz search window should be disabled. When the search mode is disabled, the setting of the 5 kHz search window has no effect. The power-up default mode is search mode disabled and 5 kHz search window disabled. If the command length is incorrect, or if the unit is under LOCAL control, the command is ignored, and the error response is returned. OPTOELECTRONICS, INC. 5821 N.E. 14th Avenue Fort Lauderdale, FL 33334 Phone: (305) 771-2050 FAX: (305) 771-2052 8