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.
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).
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));
}
}
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