XBEE Communication Not Fully Functioning

Dear Forum,

I am currently trying to connect an Arduino MEGA 2560 to a 4DSystems uLCD-70DT.

I successfully completed this using wires (tx and rx wires), and now I want to remove the wires and replace them with XBEE PRO S3B modules. See the attached image see the BIG PICTURE of what I am trying to do.

When I run the “wired” version of my system, I had no problems whatsoever. I essentially send commands from the MEGA2560 to the uLCD-70DT and then immediately clear the receive buffer and thus ignoring any ACK/NACK’s.

I am now using a SparkFun XBee Explorer Regulated (WRL-11373) to manage the voltage level shifting between the 5V MEGA2560, 5V uLCD-70DT, and 3.3V XBEE PRO S3B. I am running the XBEE PRO S3B in transparent mode.

So with the “wireless” version, the first command I send from the MEGA2560 to the uLCD-70DT is a command to reduce the contrast on the uLCD-70DT. This works fine.

The next command is to change to a different form on the uLCD-70DT. This never happens. It worked perfectly with the “wired” version, but not with the “wireless” version.

With the (wireless) XBEE version, I am not sure if maybe the issue is with ACK/NACK’s from the 4DSystems uLCD-70DT. I am thinking that maybe the uLCD-70DT is sending an ACK back to the MEGA2560 after I send commands from the MEGA2560 to the uLCD-70DT. I do the same thing in this “wireless” version that I did in the “wired” version as I clear the receive buffer as soon as I send the command from the MEGA2560 to the uLCD-70DT. My code may be clearing the receive buffer so fast that my code is actually ahead of the ACK reception and the receiver buffer is being cleared before the ACK is even recieved…if this is what is actually happening.

I am also looking at the XBEE PRO S3B and think that another cause of my problem may be with an ACK/NACK coming from the XBEE and possibly with latency. The configuration option for disabling the ACK on the XBEE is in the TO (transmit options) configuration for the XBEE using the XCTU software. I am not sure whether or not this is the right approach.

I have read a few posts about ACK/NACK, and I now believe that I SHOULD NOT be ignoring it. I just have to know where it is coming from…if this is even the case…???

Any thoughts?

TIA

–NEAL

mega2560_xbees3b_ulcd70dt.pdf (218 KB)

So, if you think you might receive some ACK/NACK data, but you chose to ignore it, then why do you ignore it? Remove the part of the code that flushes the buffer. (hmm, what code? I see no code) Take a look at what it is telling you. Might give a clue to the problem. (p.s. Don’t neglect to tell/show us what it is, in raw byte values preferably)