Reading data between video camera and controller.

At work we have Sony EX3 video cameras. Since it's sony everything is proprietary and cost about 8x as much as it should. We have successfully moved away from the sony 8 pin cable by making out own but now we want to make something wireless. The Sony protocol is RS422 at 38400baud. I found some code online and was able to connect the transmit pin to the receiving pin on the UNO. Below is the code I am using and the data I am receiving.....I believe it is being sent in ASCII but I am unsure how to convert it to see what the command is for each function on the controller. It moves quickly at 38400 and I believe I need to put some bits together for it to make sense. Anyone know how I can convert this to letters so I can determine what the command is when I am pressing a button? Any help of suggestions is appreciated. Thanks

int incomingByte = 0; // for incoming serial data

void setup() {
Serial.begin(38400);
}

void loop() {

// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();

// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
delay(100);
}
}


I received: 0
I received: 0
I received: 64
I received: 0
I received: 0
I received: 0
I received: 64
I received: 64
I received: 0
I received: 0
I received: 21
I received: 0
I received: 0
I received: 0
I received: 21
I received: 21
I received: 21
I received: 0
I received: 21
I received: 0
I received: 32
I received: 0
I received: 0
I received: 0
I received: 21
I received: 0

Get rid of the

I received

text and just print the codes

Print them as hex with leading zero

Don't put a new line after each character, send them in groups e.g 8 or 16 bytes

Does the camera constantly send data or only when you press a button ?

Take the data you record put it into a text editor on your PC, and look for patterns in the data e.g does it appear send the same data over and over again.

Note. If the protocol sends the current time, the pattern may be hard to find as the data will always be changing

If you are trying to figure out what data is being sent I suggest you read 100 or 200 bytes into an array and then print out the data from the array - perhaps 32 bytes per line on the screen. That will make it much easier to see patterns.

How are you reading the Sony device and displaying data on the Serial Monitor with an Uno?

If you are going to do serious stuff with your Sony equipment buy yourself a Mega which has 3 extra hardware serial ports so you can have one dedicated to the Sony stuff and another (the USB connection) for your PC.

...R

Currently I have the cable spliced and I am tapping into the wires. I am taking them into the 0 & 1 pin on the uno.

It appears it is doing some kind of handshake.....if I leave the controller alone i see data pass through but slowly(about every 500 to 1000ms) When I turn a knob on the controller I get a rush of data until I stop.

In my code: { Serial.println(incomingByte, DEC); } Does the println automatically create a line break each time it is written? I have the arduino software serial monitor set to no line break..

teedo757:
Currently I have the cable spliced and I am tapping into the wires. I am taking them into the 0 & 1 pin on the uno.

It appears it is doing some kind of handshake.....if I leave the controller alone i see data pass through but slowly(about every 500 to 1000ms) When I turn a knob on the controller I get a rush of data until I stop.

In my code: { Serial.println(incomingByte, DEC); } Does the println automatically create a line break each time it is written? I have the arduino software serial monitor set to no line break..

At the very least you need to use SoftwareSerial to take in the Sony data on pins other than 1 and 0. Those pins are used by the communication with the PC over the USB cable.

Serial.println() adds a carriage-return after the data. Serial.print() does not.

As I said earlier, read and save 100 or 200 bytes and then print it out.

I'm not sure you are using the word "handshake" correctly. Its usual meaning is that nothing will happen until there is a response from or a request from the receiving device. The idea is to prevent the receiving device from being swamped with data.

Your description of no data when nothing is happening and lots of data when it is sounds normal.

...R