I have a board that I would like to design and there are 11 devices that can only be spoken to via UART. I am restricted to a Microchip uC chip product range and I have found one with 5 UART ports. I have come up with a jumper based solution whereby the user, with making the connection via jumpers to the 5 available ports, can choose 5 of the 11 devices. I have been looking for a chip that will take either UART, SPI or I2C in and give me a few additional UART ports but I have come up short. Can anyone suggest a solution or a product that they may have come across?

It is not critical that all 11 devices are able to connect to the uC (that would be nice) but it is important that these devices are on the board for a modular product. However, I wish to make the product more user-friendly as the jumper based solution is a bit complicated at first glance or so I have been told.


Okay sorry, I am not explaining the problem properly. With this method, you limit the user's options. Let say you link port a to device 1 and 2 and port b to device 3 and 4 and so on...

But what if the user would like to use device one and two? Then the product is limiting the user heavily. With 5 port options and 11 choices for devices, the binomial coefficient yields 462 combinations for the user to choose from. That is overkill, I am not looking for that level. But with the jumper based solution port a can connect to 9 of the devices while port b can connect to 7 of the devices, port c can connect to 8, port d can connect to 7 and port e can connect to 9. The number of mux switches needed to do this would be over the limit.

Is there another solution to giving the user the option to use (close to) any combination of the devices?

I have thought about using two uC with 5 UART port each to connect to 10 of the devices and then using a much smaller jumper based solution for the last device, but this solution is too complicated for production and is expensive.

Are there any Chips or concepts out there that will expand the UART control to 11 devices?

| improve this question | | | | |
  • \$\begingroup\$ We used to use the old (StarTech) ST16C554 or ST68C554, I think. Back in the day. NXP may be making them now. They supported several interfaces to the micro and provided four added RS-232 ports. They made 552 devices for two ports, as well. You could mix and match to get to where you want. (They each included FIFOs, as well.) Personally? I'd add more PIC parts. \$\endgroup\$ – jonk Oct 30 '18 at 7:08
  • \$\begingroup\$ As long as all of the remote UART devices transmit only in response to commands from the host, could you use RS422/RS485 transceivers? Then you could bus all of the receive data to a single UART port on the host, and only drive RS422/RS485 transmit-enable for one remote at a time. \$\endgroup\$ – MarkU Oct 30 '18 at 7:36
  • \$\begingroup\$ Why do you need to simultaneously use any combination of UARTs at the same time? What problem exactly are you solving by that? \$\endgroup\$ – Chupacabras Oct 30 '18 at 16:21
  • \$\begingroup\$ @Chupacabras it does not need to simultaneously use any combination of UARTs but the system needs to be modular enough to give the user any of the 11 devises on the board and at this point, they can use 5 of them. \$\endgroup\$ – Gareth T. Oct 31 '18 at 12:06
  • \$\begingroup\$ @GarethT. So you need to communicate only to 1 UART device at one time? You do not need to communicate to multiple devices at the same time? \$\endgroup\$ – Chupacabras Oct 31 '18 at 12:08

Use some UART-SPI bridge ICs, like:

You can have as many UARTs as you have spare GPIO pins to use as Chip-Select lines (or use a demux or decoder and you can have orders of magnitude more) - limited only by your UART baud rate vs the max speed you can run your SPI.

| improve this answer | | | | |
  • \$\begingroup\$ This looks promising, I will look into each of them. Thank you. \$\endgroup\$ – Gareth T. Oct 30 '18 at 13:55
  • \$\begingroup\$ The SC16IS7xx is on the right track with SPI or I2C to two UART's is great as I would need three of them to do everything, but unfortunately, the cost for just one of them is too high. If there is a chip that can take SPI or I2C and give 4 or 6 UART I would be really excited. \$\endgroup\$ – Gareth T. Oct 30 '18 at 14:16
  • \$\begingroup\$ @GarethT. In this day, I think that would be another of your 5-UART PICs. Just program it, is all. \$\endgroup\$ – jonk Oct 30 '18 at 20:12
  • \$\begingroup\$ @jonk I have really been considering that option but it is a bit overkills for the task and when boards come in for repairs and it is not an easy fix they always blame the uC or the memory chip. If there where two of them on the next lot of boards, I can see the world ending in there eyes. \$\endgroup\$ – Gareth T. Oct 31 '18 at 12:00
  • \$\begingroup\$ @GarethT. Sure. As I said, we used to use the ST16C554 or ST68C554 devices (different interfaces.) They worked fine for creating a large number of serial asynch I/O ports. But I suspect they are quite boutique, these days, because it's cheaper/easier and more powerful and convenient to use MCUs now. But I'm not in the business today, either. So I can't tell you what others do when they need dozens of such ports. But I don't see any really good multi-asynch device answers yet, either. So perhaps that's the way of things, now. What do you think, seeing what you've seen so far? (+1, by the way.) \$\endgroup\$ – jonk Oct 31 '18 at 14:46

You could use analogue switch ICs (analog multiplexers) to replace manual jumpers.

If you have 5 UART ports, you can multiplex 1 of those ports to 8 multiplexed UART ports. You need to use 8-channel switches, like DG4051E.

| improve this answer | | | | |
  • \$\begingroup\$ Yes, I have looked into that already, but it requires a rediculous amount of Mux IC's to replace what I have done with the jumper based solution because there is also the RTS line as well as the TX and RX line. \$\endgroup\$ – Gareth T. Oct 30 '18 at 7:21
  • \$\begingroup\$ So, you need to switch 3 signal lines, and you have 5 UARTs. You do not need ridiculous amount of muxes. All you need is 3 chips and have one of those UART ports multiplexed (so you will have 4 UART ports + 8 multiplexed). So 3pcs. of 8-channel multiplexers, like DG4051E (randomly picked). \$\endgroup\$ – Chupacabras Oct 30 '18 at 7:48
  • \$\begingroup\$ Please see the edited question. \$\endgroup\$ – Gareth T. Oct 30 '18 at 9:44
  • 1
    \$\begingroup\$ @GarethT. You have dramatically changed requirements in your question. You did not mention you want simultaneously use any combination of UARTs at the same time. \$\endgroup\$ – Chupacabras Oct 30 '18 at 13:05
  • \$\begingroup\$ Yes, that is why I apologized. Sorry. \$\endgroup\$ – Gareth T. Oct 30 '18 at 13:47

drive a SIPO shift register (eg. 74hc595) from 2 GPIO pins connect the ~OE input to the UART output

using the GPIO clock in a pattern that represents the device you want to talk to, then use the UART to send

if a pull up is in place the port with a zero bit will echo the UART output.

for the receive end use an and gate/gates to combine the signal from the device UARTS.

| improve this answer | | | | |

I think you are using the wrong protocol and/or topology for your case. I would suggest using RS-485 transceivers and build a bus topology. If you have 11 possible devices, you can use 4 lines to enable one of them.

The caveats I see for this option are:

  • Half-duplex communication (No simultaneous Rx/Tx)
  • You can interact just with one device at a time (Bus topology)
  • Your uC will be like a master. It must enable a device and start communication with it. (transceivers are configured for write to or read from the bus)

I did not see any detail in your questions about how these limitations can affect your system or if it is worth at all. I hope this could help.

| improve this answer | | | | |
  • 3
    \$\begingroup\$ In a design from scratch, sure, though on the same board there is typically no need for RS485, it can all be done single ended at logic level using the output enables of the UARTs. But it sounds pretty strongly like the things the asker wants to talk to are already fixed designs, so changing their firmware to implemented an addressable shared bus probably isn't an option. \$\endgroup\$ – Chris Stratton Oct 30 '18 at 12:59
  • \$\begingroup\$ I'm not talking about addresses, just enable lines to each transceiver. This implies less firmware changes than trying an I2C bus- you just will need 1 uart in your host uC. \$\endgroup\$ – gustavovelascoh Oct 30 '18 at 13:16
  • \$\begingroup\$ If the main MCU is controlling the transceivers, then this is just an awkward way to build a mux. Skip the differential, skip the half duplex concern, and just follow the existing suggestions to build a mux. The point of actual RS485 is that the devices themselves listen for their address and pay attention to the following data or enable their transceiver afterwards to reply, and that the signaling is differential. Neither really fits your revised proposal for this application. \$\endgroup\$ – Chris Stratton Oct 30 '18 at 13:33
  • \$\begingroup\$ RS485 just defines an electrical interface, not addressing. For that reason, I suggest enable transceivers from the uC, as addressing indeed implies additional firmware. The only change you need is: instead of using UART X for device Y, enable Transceiver Y and use UART1. I see this option feasible as the OP stated: "I have a board that I would like to design..." \$\endgroup\$ – gustavovelascoh Oct 30 '18 at 14:02
  • \$\begingroup\$ Sure, but you persist in ignoring the obvious fact that doing it that way is pointlessly complex and more restrictive than using the multiplexors others already proposed. Your scheme offers no advantages over that, and many disadvantages compared to it. RS485 is only useful when used to do things that would not apply here. \$\endgroup\$ – Chris Stratton Oct 30 '18 at 14:08

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.