Thursday, 3 May 2018

microcontroller - Tx/Rx UART communication between 2 MCU over 1 line


I'm trying to establish communication between 2 MCU using TX/RX over 1 line. Please refer to the image.


Questions:





  1. Will this work? There will be an echo for sure.


    If MCU 1 sends a "123" signal, MCU 1 and MCU 2 will receive "123" at the same time.


    If MCU 2 sends a "678" signal, MCU 2 and MCU 1 will receive "678" at the same time.


    Is this assumption correct?




  2. In the long run, will it damage the MCU?





Thank you.


enter image description here



Answer



While your assumption of how the RX works is correct, care needs to be taken with the two TX driving the same line. You want to at least buffer the TX with a reverse diode and a pull-up resistor, like this:


enter image description here


Doing something like this is nothing new and there are lots of references on the internet. This configuration will actually be useful to help detect transmission errors as the transmitter also receives the loop back data.


You might want to look up some stuff on the internet such as this and this.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...