2
\$\begingroup\$

I have a legacy LPC MCU with 2 UARTs only. One of these UARTs is reserved for different functions such as IAP and RS232. So basically, I have one UART available only.

For an experimental project I need 5 to 7 UARTs to add 5 to 7 SOC modules.

So, I plan a new hardware with any controller, but due to PCB space and controller limitations I do not expect to have many possibilities to add unlimited UARTs.

Planning some type of extender, I had the idea of using two 1:8 74xx multiplexers in order to switch between UARTs and a common VCC/GND shared by all of the participants in my SOC/MCU chain.

Can you switch safely between UARTs using analog muxes? Or are there ramps/peaks that might lead to UART periphery problems?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ If these are logic level UART, you don't need analog mux, you can use digital muxes. What data rate will these units use? \$\endgroup\$ – Lior Bilia Jan 7 '20 at 11:14
  • \$\begingroup\$ How many UART serial data and peripheral pins are required for each? \$\endgroup\$ – Andy aka Jan 7 '20 at 11:16
  • 1
    \$\begingroup\$ You might look at a part like DG408LE "The DG408LE is an 8 channel single-ended analog multiplexer designed to connect one of eight inputs to a common output as determined by a 3 bit binary address (A0, A1, A2). " Use two of them, one to connect Tx to one of the 7 modules, and 2nd to connect Rx to the same module. vishay.com/docs/78084/dg408le.pdf 3 V to 16 V single supply or ± 3 V to ± 8 V dual supply operation • Low power consumption: 6 μA/max., EN = Vx = 5 V • Lower on-resistance: RDS(on) - 17  typ. • Fast switching: tON - 55 ns, tOFF - 36 ns \$\endgroup\$ – CrossRoads Jan 7 '20 at 13:29
1
\$\begingroup\$

If all UART comms protocol originates at the Port of the MCU then this may be a workable solution to MUX to the various target devices.

On the other hand if UART comms can asynchronously originate from any of the target devices at any time then this multiplexing scheme is a non-starter.

\$\endgroup\$
1
  • \$\begingroup\$ Good hint regarding the latter aspect... \$\endgroup\$ – hendrikschnack Jan 7 '20 at 16:15
1
\$\begingroup\$

I'm not sure how big each UART is (and the necessary multiplexers).

Some time ago I had the intention to use several UARTs (like 4-6) for MIDI. My idea was to use STM32F103C8T6, which have 3 UARTs (each). Using such MCU, you can easily gather all UART info and send it (e.g. via SPI) to your LPC MCU.

This also prevents the problem related to buffer/timing issues for switching between the UARTs. Note there also STM32 MCUs which have 8 UARTs (some STM32F7 models at least).

\$\endgroup\$
5
  • \$\begingroup\$ Can you specify what "big" is? Do you mean voltage level? \$\endgroup\$ – hendrikschnack Jan 7 '20 at 10:41
  • \$\begingroup\$ Thanks for the tip with the F7, however due to price and footprint, it is unlikely that we choose one of those \$\endgroup\$ – hendrikschnack Jan 7 '20 at 10:42
  • \$\begingroup\$ I meant big in size (since you mention PCB space is limited). \$\endgroup\$ – Michel Keijzers Jan 7 '20 at 10:42
  • \$\begingroup\$ Hm, I'd rather choose a (small) FPGA instead of another MCU \$\endgroup\$ – hendrikschnack Jan 7 '20 at 10:43
  • \$\begingroup\$ I never have used an FPGA, so I cannot really comment on that. \$\endgroup\$ – Michel Keijzers Jan 7 '20 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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