Adding many UARTs to an existing system - Page 1
Forum section: electronics / projects

author: jeremy
author_rank: Super Contributor
timestamp: June 11, 2019, 03:56:27 am
content: 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.

author: oPossum
author_rank: Super Contributor
timestamp: June 11, 2019, 05:08:02 am
content: 8 UARTS for ~$3Some translation required.https://lcsc.com/product-detail/RS232_CH438Q_C100039.html

author: MosherIV
author_rank: Super Contributor
timestamp: June 11, 2019, 06:58:46 am
content: 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.

author: oPossum
author_rank: Super Contributor
timestamp: June 11, 2019, 07:03:23 am
content: The CH438 is eight 16550 UARTs in one package.

author: jeremy
author_rank: Super Contributor
timestamp: June 11, 2019, 07:09:27 am
content: 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.

author: oPossum
author_rank: Super Contributor
timestamp: June 11, 2019, 07:21:12 am
content: 12 pins if an address latch is used.8 data, /RD, /WR, /CS, /ALEThe peripherals in a MCU are generally going to be much cheaper than any external solution.

author: brabus
author_rank: Frequent Contributor
timestamp: June 11, 2019, 09:07:02 am
content: Bitbang them like there's no tomorrow.

author: jeremy
author_rank: Super Contributor
timestamp: June 11, 2019, 09:20:00 am
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: June 11, 2019, 03:39:04 pm
content: Quote from: jeremy on June 11, 2019, 03:56:27 amI have solved it before in the way you suggested. I used an inexpensive microcontroller with built in UART as a smart programmable UART.

author: Bassman59
author_rank: Super Contributor
timestamp: June 11, 2019, 04:29:09 pm
content: Quote from: jeremy on June 11, 2019, 03:56:27 amYou 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.