How to structure code with 2 way wireless comm

I am working on a system in which the slave processor (mbed) streams sensor data (wireless), where a the master (a normal pc/laptop) does the necessary computations and streams instructions back. The problem is I need to [effectively] do both sending the data and receiving the instructions at the same time. If I used a single interrupt for the receiving, then I would get it sending a chunk of data, receiving instructions, and resuming data sending, which would cause incomplete data sets, and a way too long cycle time. The output as determined by the instructions (servos) need to constantly be adjusted, and control needs to be held.

How would I go about doing this on a single core platform? Could I split the rx/tx of the transmitter to different processors somehow (as in one processors only sends data, one only receives)?

rp181:
The problem is I need to [effectively] do both sending the data and receiving the instructions at the same time.

i wonder if the key is the word ‘effectively’. depending on what data rate you need to stream data and what over the air data rate you have at your disposal, it may be not terribly complicated to come up with a scheme to share the over the air data rate for both directions (half duplex instead of full duplex).

rp181:
If I used a single interrupt for the receiving, then I would get it sending a chunk of data, receiving instructions, and resuming data sending, which would cause incomplete data sets, and a way too long cycle time

i dislike general statements like this. typically i find the above conclusion is reached without any proof that it is true. if you want to post some of your design requirements (data rate, response time, ect) and some of the hardware you may have chosen to use, we can help a little more on how to use it.

rp181:
i dislike general statements like this. typically i find the above conclusion is reached without any proof that it is true. if you want to post some of your design requirements (data rate, response time, ect) and some of the hardware you may have chosen to use, we can help a little more on how to use it.

I have tried it, and I get corrupt data, and sometimes the processor locks up. I am using a mbed right now. The wireless system consists of two digi 900mhz xtend modules (115200 baud rate max, I think limiting factor is RS232 speed) (one is xtend-PKG for computer connection). I hate how can't give specifics, but the project is planning stage, so that is difficult to give. The application is a UAV helicopter. The heli streams data, were heavy processing is done on ground (the key point of the experiment(, and instructions sent back.

I have been looking at XMOS processors recently as that is perfect, but I still don’t quite grasp the concept of software based peripherals. I need atleast 2 UART’s (preferably 3), and I am not sure if it can provide that.

You’re making this more complicated than need be.

Simply buffered UART I/O.

XMOS is not mainstream which will make implementation from software reuse and so on more difficult.

How can I buffer using this? Do I need a external buffer IC?

rp181:
How can I buffer using this? Do I need a external buffer IC?

no.

please read about software 101. Circular/ring buffers.

Browse the app notes from microprocessor vendors.

Browse the source code in the projects section on the AVRfreaks.net forum.