RS232_Dolby Cinema Processor

Status
Not open for further replies.

nobody3

Member
Hello!
This is my first post to the forum, so apologies if I get something wrong with the format. I am hoping to get help figuring out why I am unable to control a Dolby CP750 Cinema Processor over Serial RS232 (D-Sub 9 pin). I think I am close (since I am able to receive data and print it out in the Serial Monitor, but sending data seems to be my problem.

Some quick background:
I am programing a Teensy LC in the Arduino IDE and am using a Sparkfun RS232 transceiver module. When I power up the Dolby I receive a bunch of serial status data, but when I try to send a command nothing happens.

My setup looks a bit like this (excerpt):

Code:
#define CP750 Serial2
String rs232RX = 0;

void setup() { 
CP750.begin(9600, SERIAL_8N1);
}

And a snippet from my loop looks like this:

Code:
CP750.print("cp750.sys.input_mode dig_1");
Serial.print("Tx Cp750: ");
Serial.println("cp750.sys.input_mode dig_1");


Some specifications from the Dolby manual:

* Full control of the CP750 is available through a set of ASCII commands and queries. No error correction (CRC), sync bytes, or protocol is applied to this interface.

* The RS-232 connector supports standard 9‐pin serial connections to PC serial ports and other RS‐232 devices. It operates at 9600 baud with 8 data bits, 1 stop bit, no parity, and no flow control. It cannot be invoked while the serial data port is in use by the CP750 setup program.

I'd be happy to supply more info and details, but I don't want to overwhelm possible readers...

What have I tried so far?
1) I tried using both
Code:
Serial.write();
and
Code:
Serial.print();
2) I probed the Tx line with my DSO and was able to decode the serial commands easily. It looked like the logic level coming out of the max232 module was from zero to +12 volts.
3) In starting the Serial object I've tried the following:

Code:
CP750.begin(9600, SERIAL_8N1);
CP750.begin(9600, SERIAL_8N1_RXINV);
CP750.begin(9600, SERIAL_8N1_TXINV);
CP750.begin(9600, SERIAL_8N1_RXINV_TXINV);
4) I contacted Dolby and received a circuit diagram on the unit's serial port, but that didn't tell me what the minimum voltage threshold is.

Please let me know if you have any ideas!
 
Last edited:
I see that I am supposed to post complete source code. Here is the complete test program designed just to get the Serial com aspect of my project up and running.

Code:
#include <IRremote.h>

// set this to the hardware serial port you wish to use
#define CP750 Serial2


int recvPin = 17;
IRrecv irrecv(recvPin);
decode_results  results;

int greenPin = 21;

elapsedMillis RStime;
unsigned long Time;

String rs232RX = "0";


void setup() {
  irrecv.enableIRIn();
  Serial.begin(9600);
  CP750.begin(9600, SERIAL_8N1);
  irrecv.enableIRIn();
  
  pinMode(greenPin, OUTPUT);
  digitalWrite(greenPin, HIGH);
  delay(10);
}

void loop() {
Time = millis();

  if (irrecv.decode(&results)) {
    irrecv.resume();
    digitalWrite(greenPin, LOW);
    delay(100);
    CP750.print("help");
    Serial.println("Tx");
    delay(100);
    digitalWrite(greenPin, HIGH);
  }
  
  if (CP750.available() > 0) {
    rs232RX = CP750.read();
    Serial.print(rs232RX);
    if (Time - RStime >= 320) {
      Serial.println(" ");
    }
  }  
}
 
@nobody3: Do you know if the CP750 is expecting CR, LF, or CR/LF at the end of the serial stream ?? Which these different options for line termination have you tried ??

Mark J Culross
KD5RXT
 
I would first verify that your side is working correctly. Test loop-back where you connect your TX to your RX. Send something and see if you can receive it. I would do this both for the Teensy TX/RX pair and then with the SFT transceiver.

You have to do a "crossover" connection - TX on your side connected to RX on the Dolby side. And RX to TX. Don't connect TX to TX, RX to RX.

Once you are sure your side works correctly, then I would look for the simplest command you can send that either generates a response or changes the target device in some discernible way. I think you could try "cp750.sysinfo.version ?". If there is an input error, it looks like it sends a blank line back. They use the term "new line" so maybe they follow the Linux convention of \n as an end of line character. Like Mark says, try all three possibilities.
 
@nobody3: Do you know if the CP750 is expecting CR, LF, or CR/LF at the end of the serial stream ?? Which these different options for line termination have you tried ??

Mark J Culross
KD5RXT

From here, looks like you need a CR (0x0D or /r): http://www.film-tech.com/ubb/f16/t003312.html

Try these, one should work.
Code:
    CP750.print("help\r");
    CP750.print("help\n");
    CP750.print("help\r\n");
    CP750.print("help\n\r");

Don't worry about the RS232 voltages, that should be fine with the chip you selected.

Make sure your tx line is connected properly to the dsub. A trick is to measure voltage on the TX & RX lines, neither one should be 0V. Both signals should be -5V to -15V sitting still.
 
Thank you to all who offered their advice here. Some really good suggestions, and I did finally figure it out. The CP750 wants to see either a "\n" or a "\r" at the end of each command. From what I can tell either work interchangeably. Hopefully I can figure out why it still seems intermittent. I'd say 1/3 or my commands get dropped and the 2/3 go through successfully.
 
Status
Not open for further replies.
Back
Top