Need Serial Help

I am new with Arduino and C++, I am creating a serial controller for a broadcast recorder, and its states that I need
1 start bit
8 data bits
1 stop bit
1 parity bit
odd parity
From researching it seems that the _8O2 configuration is what I am looking for.

Thanks for any help

SERIAL_8O1, surely?

so the 2 refers specifically to the number of stop bits and has nothing to do with the start bit?

If so is using a start bit standard and is that inferred without having to set that?

I don't think I've ever come across a protocol with more than one start bit.

And every transfer needs a start bit. It is not usually specified - just # of data bits (7-8-9), parity (None-odd-even), and stop bits (1-2, sometimes 1.5).

Thanks,

You guys are awesome!

just # of data bits (7-8-9),

Oi!
What about Baudot? :stuck_out_tongue_closed_eyes:

Awol the Baud rate is 38.4kBits/s but, I knew how to specify that. It was the configuration that I was having trouble with

Sorry, you misunderstood my geek-gag; Baudot is a five bit code, unlike ASCII which is seven bits.
Nothing to do with the line speed (baud rate)

Have either of you worked with RS422?

Here is the manual for the product that I am trying to interface with. Page 21-27 gives all of the information on the RS422 Commands, I am just interested in Record and Stop functions but am having a little trouble deciphering how to properly do this. Here is the start of my code so you may be able to get an idea for what I am trying to achieve.

//BM Recorder V1.0
int recordSw = 7;
int stopSw = 6;
int ledPin = 13;

void setup() {
  // put your setup code here, to run once:
  pinMode (ledPin, OUTPUT);
  pinMode (recordSw, INPUT_PULLUP);
  pinMode (stopSw, INPUT_PULLUP);
  Serial.begin (38400, SERIAL_8O1);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (recordSw == LOW)
  {if (Serial.available())
  (Serial.print (0x200x01));
  }
}

Arduino: 1.5.5-r2 (Windows 7), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard C:\Users\jbmurray\AppData\Local\Temp\1\build2026306514269995541.tmp\sketch_apr14a.cpp -o C:\Users\jbmurray\AppData\Local\Temp\1\build2026306514269995541.tmp\sketch_apr14a.cpp.o

sketch_apr14a.ino:18:18: error: invalid suffix "x01" on integer constant

Serial.print (0x200x01

Is that supposed to be in quotes?

 if (recordSw == LOW)

The value 7 is never going to be equal to zero.
You're missing a digitalRead.

Please use code tags when posting code.

The switch is set to PULLUP in reference to ground so that is looking for a specific Change on pins 7 and 6 for the stop and record buttons then I want it to perform the associated serial command

//BM Recorder V1.0
int recordSw = 7;
int stopSw = 6;
int ledPin = 13;

void setup() {
  // put your setup code here, to run once:
  pinMode (ledPin, OUTPUT);
pinMode (recordSw, INPUT_PULLUP);
  pinMode (stopSw, INPUT_PULLUP);
  Serial.begin (38400, SERIAL_8O1);
}