Can an Arduino MEGA 2560 Simultaneously Transmit and Receive?

Hey Everybody,

Happy New Year!

I am working through some issues with UART serial communication with an Arduino MEGA 2560 and a 4DSystems uLCD-70DT resistive touchscreen.

I have solved many issues with checksums and overall data integrity by using and IKALOGIC logic analyzer. I have an older one that is about 10 years old, but it definitely gets the job done and IKALOGIC tech support has been awesome as I had some discrepancies with what the Scanalogic software was showing me. It ended up being a very slight trigger position offset that allows me to look at the TX and RX data in the time domain…almost like an oscilloscope with decryption.

I still have yet one more question about transmitting and receiving data. I send commands from the uLCD to the Arduino AND I send commands from the Arduino to the uLCD at essentially the same time. I do this very rapidly…on the order of milliseconds. So the Arduino serial port might be transmitting data the uLCD (e.g. updated write strings) at the same time the uLCD might be transmitting data to the Arduino (e.g. “soft” button presses).

HOW DO I MAKE EACH DEVICE WAIT UNTIL THE OTHER IS FINISHED? THEY ARE CONNECTED ON SERIAL1. Is there a command like “while Arduino is receiving data from touchscreen for one process, don’t receive data from touchscreen for another process”?

TIA,

–NEAL

Disclaimer: no experience with the display.

I have no idea about the documentation that you have found and you’re using. I’ve found e.g.

https://4dsystems.com.au/blog/4d-an-00110/

https://4dsystems.com.au/blog/4d-an-00092/

https://4dsystems.com.au/mwdownloads/do … ink/id/12/

I think that the last one is the one you should be using to understand the protocol and expected replies.

I do not know how you have configured the display so it sends data without it being requested. I would make life simple and disable that (if you can) and just poll the display with touch get.