Author Topic: Adding many UARTs to an existing system  (Read 1365 times)

0 Members and 1 Guest are viewing this topic.

Offline jeremyTopic starter

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Adding many UARTs to an existing system
« on: June 11, 2019, 03:56:27 am »
I have an existing microcontroller system with only one spare UART, but I need 5 of them. It seems like there are some chips on the market for this (SPI/I2C to UART), but they are more expensive than buying a second microcontroller...

Has anyone solved this problem before and can point me in the right direction? I'm not able to multiplex the lines unfortunately, I really do need a FIFO-based system.
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Adding many UARTs to an existing system
« Reply #1 on: June 11, 2019, 05:08:02 am »
8 UARTS for ~$3

Some translation required.

https://lcsc.com/product-detail/RS232_CH438Q_C100039.html
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Adding many UARTs to an existing system
« Reply #2 on: June 11, 2019, 06:58:46 am »
No, I do not think that part will do what is asked for. That part is just the tranceiver (buffer and voltage converter)

Usually, you choose a microcontroller with the peripherals you want built in. I do not think there are any  with 5 or more 'serial port'.
There are the old school uart peripheral devices 16550 uart chips but they are not really designed to interface to microcontrollers, they are designed to interface to microprocessors.
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Adding many UARTs to an existing system
« Reply #3 on: June 11, 2019, 07:03:23 am »
The CH438 is eight 16550 UARTs in one package.
 

Offline jeremyTopic starter

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Adding many UARTs to an existing system
« Reply #4 on: June 11, 2019, 07:09:27 am »
Thanks, the CH438 looks neat but it does require something like 18 pins to interface?

Also my point of reference is the stm32l071C8 which has 5 UARTs for about the same price, but it is also a full blown arm microcontroller. 
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Adding many UARTs to an existing system
« Reply #5 on: June 11, 2019, 07:21:12 am »
12 pins if an address latch is used.

8 data, /RD, /WR, /CS, /ALE

The peripherals in a MCU are generally going to be much cheaper than any external solution.
 

Offline brabus

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: it
Re: Adding many UARTs to an existing system
« Reply #6 on: June 11, 2019, 09:07:02 am »
Bitbang them like there's no tomorrow.
 

Offline jeremyTopic starter

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: Adding many UARTs to an existing system
« Reply #7 on: June 11, 2019, 09:20:00 am »
I also thought of that, but the main microcontroller is already quite busy, and most of the data is RX heavy at 115200 baud. I think I’m just going to buy one of these MCUs with a large number of UARTs and roll my own, it really seems like the easiest option at this point.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Adding many UARTs to an existing system
« Reply #8 on: June 11, 2019, 03:39:04 pm »
I have an existing microcontroller system with only one spare UART, but I need 5 of them. It seems like there are some chips on the market for this (SPI/I2C to UART), but they are more expensive than buying a second microcontroller...

Has anyone solved this problem before and can point me in the right direction? I'm not able to multiplex the lines unfortunately, I really do need a FIFO-based system.

I have solved it before in the way you suggested.  I used an inexpensive microcontroller with built in UART as a smart programmable UART.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Adding many UARTs to an existing system
« Reply #9 on: June 11, 2019, 04:29:09 pm »
I have an existing microcontroller system with only one spare UART, but I need 5 of them. It seems like there are some chips on the market for this (SPI/I2C to UART), but they are more expensive than buying a second microcontroller...

Has anyone solved this problem before and can point me in the right direction? I'm not able to multiplex the lines unfortunately, I really do need a FIFO-based system.

You don't say what microcontroller you're using, but if it has an external memory interface, you can connect a small FPGA to it through that interface and then get all of the UARTs you want. Expose each UART as registers in the micro's memory space.

More expensive than buying another micro? Depends. Gotta do the engineering to determine that. Often the FPGA can do "other stuff" that might make your life easier.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf