Arduino Due half duplex UART

Hello All,

I am looking for some help in the right direction on this.

Is it possible to configurate the UART on a SAM3 in half duplex mode? I would like to use it to communicate with a FrSky X8R RC receiver.

Website:
http://www.rcgroups.com/forums/showthread.php?t=2245978

There is a nice library to do this with the regular 328p boards and the Teensy.

I have been searching the net and datasheet of the SAM3 for a clue bud I am touching in the dark here. There is nothing to be found in the direction of half duplex UART communication on the SAM3 on the Due.

A work around would be to use a Pro Mini board to do the communication with the RC receiver. I prefer however to use the Due for this.

Any tips and tricks or points in the right direction are welcome.

Regards, Brand

Hi there Brand,

I am not aware of any library using the hardware serial objects provided by the standard Arduino library on the DUE in half duplex mode, but you can do what you want using the library soft_uart which I have available at:

This is a library which implements software serial ports on the DUE which you can use in full and half duplex modes. You can find more information in this post, and obviously on github. It comes with several examples of use, both in full and half duplex modes of operation.

If in any doubt, just let me know.

I hope it helps.

Hello Antodom,

Thanks for your reply.

I will try out your suggested solution. Tough I am a bit sceptical about the bitbang method.

In your explanation I read that you have reached reliable baud rates up to 57600 which is exactly the baud rate I need for my application to work.

Have you got any idea what stress this will give to the processor? In the end this Due will be fed by a GPS, 9DOF and S.BUS data. And will have to process and then control up to 6 PWM signals (Quadcopter)

The half duplex signal is required to send the telemetry data.

I do not have a lot of experiance with the Due when doing that much stuff all together. Maybe you can give an estimate if this can be handled and still get a reliable soft UART?

Thanks, Brand

Hi again Brand,

With soft_uart you can get to 57600 bauds, and even to 115200 with two stop bits, but as you has correctly mentioned, in an application with a high use of competing interrupts, you will not get to that speed with guarantees.

I have tested soft_uart in an application with a heavy use of interrupts integratind many sensors and actuators, and soft_uart has operated reliably at speeds of 19200 and 38400 bauds, so this may be a reference.

My advice for you should be just to test the speeds you can get with soft_uart in your application. And I will try to see if it is possible to change the data rate of the device you are connecting with using half duplex mode, I imagine that must be possible. I don't know if that will be ok with the timing restrictions your application has. The device is an RC receiver, isn't it?. How slow can you receive the telemetry from the RC receiver keeping a fiable control of your quacopter?.

Just let me know if it works.