Hi folks,
I am stuck on implementing communication to an actuator that I have with my arduino. Here are the Specs for the line I need to commucate with.
Electrical: 0-5V nominal single wire with common ground between nodes
Pullups to 5V in nodes
Format: 10 bit NRZ (Non Return to Zero) (1 start, 8 data, 1 stop)
Speed: Default of 5208 bps; other options available
Protocol: Command/Response with SRA slaved to ECM
Checksum: 2’s complement of sum of other message bytes
Idle Time: 10 bit times
Update rate: once every 200 msec, minimum
I have tried using newsofserial with a baud of 5208 with no luck. Even when I set the arduino to 4800 baud and just connect the Rx port to the line I don't get any values (even gibberish). I was given a small program that communicates with my actuator at said baud rate. I know the actuator/communication is working because I can send/receive data using the program.
So my Ideal situation is to run the actuators UART line to digital2 running newsoftserial setting baud = 5208 and RX port on digital 2. Then running the Serial monitor using the default 0,1 pins on the UNO. Or just find a way to sniff the bus at 5208 baud so I can see the format of the messages being sent.
co1simba:
If I run a mega could I initiate Serial1 @ 5208 baud and Serial2 @ 9600 baud then use this?
if (Serial1.available()){
Serial2.println(Serial1.read());
}
Well the Arduino IDE's serial monitor is 'hardwired' to only monitor Serial port, but Serial1, Serial2, and Serial3 are avalible on a mega board for your external uart line. So:
if (Serial1.available()){ // Serial1 = external uart on pins 18 & 19 running at 5208 baud
Serial.println(Serial1.read()); // echo received data from serial1 channel to arduino's serial
// monitor on pins 0 and 1 running at 9600 baud
}