Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino MyRIO communication via UART

Solved!
Go to solution

Hi,

 

I am trying to realize the data communication between MyRIO1900 and Arduino via UART.

UART interface on Arduino Uno is under 16MHz clock.

 

The UART for myRIO can only set the Baud Rate. However if the frequency is different from Arduino, the connection will not be built.

 

How do I adjust the frequency of MyRIO UART? What is the default frequency of MyRIO UART? Where can I find that parameter?

0 Kudos
Message 1 of 7
(7,910 Views)
Solution
Accepted by topic author SergioMa
I don't understand. If the baud rates are the same, you should be fine. The clock frequency is used to derive the baud and that is the rate that data is transmitted/received.
Message 2 of 7
(7,894 Views)
Solution
Accepted by topic author SergioMa

@SergioMa wrote:

Hi,

 

I am trying to realize the data communication between MyRIO1900 and Arduino via UART.

UART interface on Arduino Uno is under 16MHz clock.


The 16MHz has nothing to due with the baud rate of your Arduino.  You need to set the baud rate in the Arduino as well and make sure it matches the buad rate you used for the myRIO.  I would recommend 115200.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(7,760 Views)
Solution
Accepted by topic author SergioMa

Thank you all for replaying.

 

Currently I set 96000 at the baudrate for Arduino. The MyRIO is same.

 

The MyRIO program is simly a UART bloack connecting an indicator. The UART block is in read mode with data frame setup: 8 bits, even parity; 2 stop bits. In the code of arduino, the same setup is applied.

 

It was not working last night.  I will try again today.

 

 

0 Kudos
Message 4 of 7
(7,754 Views)

It doesn't work still.

 

I post some photos. You can check it.

 

Could it be the problem that the voltage level from arduino and MyRIO are different?

 

Thank you very much

Download All
0 Kudos
Message 5 of 7
(7,739 Views)

it is working now. The problem is that I send from arduino with integer 0x05. The Labview recognize it as asic for characters.

0 Kudos
Message 6 of 7
(7,730 Views)

How to fixed this problem?Can you say detail? Becuse i want to read from ardunio on sbrio.

0 Kudos
Message 7 of 7
(7,321 Views)