Go Down

Topic: Weird communication issue *solved* (Read 668 times) previous topic - next topic

Mar 23, 2014, 07:30 pm Last Edit: Mar 26, 2014, 04:31 am by schmidtbag Reason: 1
I'm trying to send serial data from the TX2 of my Due to the RX of a Duemilanove at 115200bps.  I have a 3.3v to 5v logic level converter in between, so nothing gets fried.  However, for some reason it doesn't seem to work, and I'm not sure what to do about it at this point.

Using a USB serial adapter, I am able to confirm the following:
* The TX2 on the Due correctly transmits data when connected directly to the USB adapter.
* The TX2 on the Due converted to 5v (through the logic level converter) also correctly transmits data to the USB adapter.
* The RX on the Duemilanove correctly receives data directly from the USB adapter.
* The RX on the Duemilanove correctly receives data when the USB adapter is on the 3.3v end and the Duemilanove is on the 5v end.

So, this concludes that all pieces of hardware work fine, individually.  Neither of the built-in USB ports have been connected for any of these tests.  The supplied power source for both arduinos is 5v 1.5A.

EVP


Palliser


So, this concludes that all pieces of hardware work fine, individually.


If the problem is not your hardware, what about if you post your code?
Have you also tried to send the data -let's say- TX2/RX2 from/to other TX/RX port of DUE?

I don't have the code in front of me at the moment, but shouldn't be anything special about it at all.  But, as a thought, maybe the major difference is the fact that the Due is streaming data.  The Due is much faster than the Duemilanove.  Perhaps the Duemilanove can't keep up; it's probably receiving data, but maybe it's receiving it as just a single blob of a string and doesn't know what to make of it.  I can double check that when I get home.

I also have a bluetooth adapter connected to RX1/TX1 on the Due, which also streams in both directions.  That seems to work just fine.

So, I was apparently right - by adding a delay(50) to the Due code, the duemilanove received the data just fine.  This is a little irritating that I have to actually slow the code down in order for it to catch up, but I guess that's a separate issue I can attempt to solve on my own.

I tried using 57600bps and that didn't fix the problem either (not without a delay anyway).

Go Up