Jump to content

OpenScope MZ UART with Arduino Mega Fails


Recommended Posts

I want to send commands to openscope from arduino mega using UART. I connected OpenScope UART to Serial#1 pins  of Arduino Mega.

You can read the attached arduino ino code. It writes JSON Commands to Serial#1(OpenScope) , reads characters from Serial#1(OpenScope) and writes it onto Serial #0(Serial Monitor). 

There is a problem in Serial#1 communication, you can see the output below:

Arduino Serial output

 

 

sketch_may13a.ino

Link to comment
Share on other sites

Hi @Ravi Kumar,

My understanding is that Serial1 will need to be run at 1250000 baud rather than 115200 baud because 1.25 MBaud is what the OpenScope MZ has been setup to run at in order to correctly receive characters. I believe it is possible run it at slower baud rate though the OpenScope material would need to be adjusted accordingly.

Thanks,
JColvin

Link to comment
Share on other sites

Hi @Ravi Kumar,

Is there a particular reason in your readreply function that you are waiting for data to become available in Serial (i.e. Serial.available ) rather than Serial1 which the OpenScope is using? If you are using the Serial.available you are waiting for the data to come from the PC before reading the Serial1 line.

Thanks,
JColvin

Link to comment
Share on other sites

  • 3 weeks later...

Hi @Ravi Kumar,

I apologize.

We're not certain what the problem might be. The strange bit is that the code seems to report data correctly temporarily, loses communication, and then seems to successfully regain communication. If you have an oscilloscope or logic analyzer to look at what is happening, that could help reveal the problem. Beyond that, I am not certain.

Thank you,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...