Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: Weird communication issue *solved*  (Read 619 times)
0 Members and 1 Guest are viewing this topic.
Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 25, 2014, 10:31:59 pm by schmidtbag » Logged

Yorkshire England
Offline Offline
Sr. Member
****
Karma: 2
Posts: 267
Arduino good init
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tx / Rx wrong way round?
Logged

Venezuela
Offline Offline
God Member
*****
Karma: 17
Posts: 528
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: