01-10-2014 12:35 PM
Hi,
I need to interface a GPS module to my sbRIO. The GPS module sends data serially (UART-RS232). The RS-232 port available on sbRIO which is connected to RT side is already used by a wireless module I am using.
I have searched different threads and LV example implementing RS-232. Just for the sake of testing, I connected one DIO of my sbRIO to the Tx pin of arduino and tried receiving some data but nothing happens. The baud rate, parity bits and other parameters are all identical for both arduino and sbRIO.
Am I making some kind of blunder here. Help needed.
Thank you.
01-13-2014 10:11 AM
Hi NapDynamite,
You should be able to implement serial communication using the DIO pins on your sbRIO. I located an example that looks like it implements the serial communication on the FPGA using the DIO pins of an sbRIO:
http://www.ni.com/example/27164/en/
If that example isn't working for you, could you provide some details about your setup and how you have the Arduino wired to the sbRIO?
Best Regards,
01-13-2014 10:50 AM
I applied the same code to the FPGA but didn't work. I have wired the Tx pin of arduino to the Rx on sbRIO (DIO pin as dedicated). Matched the comm settings(baud rate, parity bits, flow control etc) on both sides.
When I run arduino and send a serial string, the sbRIO is not recieving anything.
01-14-2014 04:26 PM
Hi NapDynamite,
If you connect the Arduino to the computer, are you able to see the data using a terminal program such as HyperTerminal or PuTTY? I haven't run the code in that example, but do you know where the code is caught (it's most likely waiting for the start bit)?
Regards,
01-15-2014 11:00 AM
I can view the serial outut of serial terminal but cannot view the output on string indicator on LabVIEW front panel.
Let me check again and I will reply. 🙂
01-22-2014 08:30 AM
OK, so is it really necessary to connect the ground pin of arduino to GND of my sbRIO? While communicating via RS232?
01-22-2014 08:37 AM
@NapDynamite wrote:
OK, so is it really necessary to connect the ground pin of arduino to GND of my sbRIO? While communicating via RS232?
YES!!! You need to make sure the grounds between two devices are the same, especially if they are using a common bus. Otherwise weird things will happen.
01-24-2014 05:21 AM
*sigh*
The RS232 code over FPGA doesn't seem to work after lot of tries. Connected the DIO pin of sbRIO to the Tx pin of arduino and ground pins to ground, but the string indicator over RT side is blank.
Serial configurations on both ends is the same. I don't know what seems to be the case.
01-27-2014 11:10 AM
Hi NapDynamite,
If you scope the lines, do you see activity and the data flowing over the lines?
Regards,
01-28-2014 01:32 AM
Yes. Tried that as well. Both on FPGA and RT side but ALAS!
I think I need to revisit all the VIs and code for this protocol over the FGPA side. This is going to take some serious time but I have no other way of doing this.