Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Roborio labview RS-232 port issue (http://www.chiefdelphi.com/forums/showthread.php?t=135713)

sanelss 12-03-2015 11:38

Roborio labview RS-232 port issue
 
X-post: http://www.chiefdelphi.com/forums/sh...=1#post1456937

Trying to get an arduino to talk to roborio over the serial port and having some issues.

on the arduino side i have:

Serial.write(0);
Serial.write(1);
Serial.write(2);
Serial.write(8);


and on roborio side I get:

0
253(0b11111101)
251(0b11111011)
239(0b11101111)

as far as i'm aware the arduino uses 8 data bits, no flow control, and 1 stop bit, in labview I have the same configuration on the serial>open vi

it seems as though the bits are inverted and off by one place. This is not the first time I've run into a communication issue, the i2c interface also has a very similar issue where the address bits are shifted the wrong way and was able to work around that. on here it looks like it can also be worked around but looks like 1 bit of data will be lost...

Anyone have any ideas how to fix this?

Edit:Looks like it's just an issue with the logic levels, the rs-232 port is not ttl compatible and needs a level shifter circuit. In my case since it's only 1 way communication I can just use an inverter and should work

NI_Brian 18-03-2015 14:06

Re: Roborio labview RS-232 port issue
 
Hi sanelss,

Yep, your edit is correct. The RS-232 port on the roboRIO adheres to RS-232 standards, also known as TIA/EIA-232-F (Page 5 of the specifications document found here). This means that a logic 0 is represented by a voltage between 3 and 15V and a logic 1 is represented by a voltage between -3 and -15V.

It looks like the Arduino is only able to output Serial TTL which is just TTL logic, not TIA/EIA-232-F logic. Sparkfun actually has a good article on the differences and a solution to this problem located here.


All times are GMT -5. The time now is 07:39.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi