4
\$\begingroup\$

I have a sensor that I'm connecting to MCU through UART for data logging and other purposes. However, I also want to program the Sensor independently and I have configured the same UART lines from the sensor with an FTDI chip and USB port (See Figure) enter image description here.

When this is on breadboard, it is easy to do this as I can disconnect the MCU from the sensor when I'm using the FTDI chip and vice versa. If I'm doing this on a PCB its not possible to disconnect wires. I did think of having jumpers to disconnect the FTDI or MCU when needed so that only one of them is powered on at a time. Is it a good practice to have jumpers for UART lines? Is there a better alternative?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Use tristate buffers (fast enough to handle the communication frequencies). \$\endgroup\$
    – Eugene Sh.
    Commented Sep 14, 2015 at 15:43

2 Answers 2

2
\$\begingroup\$

The MCU Tx can be connected to both Rx pins without any problem.

For the MCU Rx pin there is a problem, because you can't connect two outputs (FTDI and SENSOR Tx) together. Some solutions

  • use a two position (three pin) jumper
  • put a resistor in the line that is to be overrruled by the other, presumably the sensors Tx line. unplug the downloader when you wnat to use the sensor.
  • put a gate (AND port) between the two Tx lines and the Rx. Make sure than an unconnected input (when the downloader is removable) is pulled up to a 1 level.
\$\endgroup\$
0
0
\$\begingroup\$

Another option that I've used for this is to put a dual SPDT switch, and control it with the MCU. UARTs are not that fast, most of the analog switches that you will find will work without any problem. The one I've used is the FSA2257MUX.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks! I prefer manually changing the lines instead of making the MCU do that since this is for debug purposes only. \$\endgroup\$
    – am3
    Commented Sep 14, 2015 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.