Solutions for Single USB to Multiple Serial Ports

Serial ports (UART) are a very commonly used interface in embedded systems, but most modern computers lack hardware serial ports. Generally, serial ports are expanded through methods like USB to serial or PCIe bus expansion. USB to serial is a very common solution. Common USB to serial chips include CH340/341, CP2102, and PL2302.

However, these chips are designed for USB to single serial port connections. If multiple serial ports are needed, multiple USB ports must be used, which can be cumbersome. Today, we will introduce solutions for converting a single USB port to multiple serial ports.

1. Dedicated Chips

Nanjing Qinheng, a company specializing in USB-related chips, offers several USB to serial chips, including those that convert USB to multiple serial ports. For example, CH342 is a USB to dual serial port chip:

Solutions for Single USB to Multiple Serial Ports

CH9344 is a USB to quad serial port chip:

Solutions for Single USB to Multiple Serial Ports

There is also a USB to octal serial port chip, CH348:

Solutions for Single USB to Multiple Serial Ports

This solution is very simple to use; it requires only one chip to implement.

2. USB HUB

The function of a USB HUB is to expand a single USB port into multiple USB ports. This way, when using multiple USB to serial chips, there is no need to worry about insufficient USB ports. Common USB HUB chips include GL850G and FE1.1S, which can achieve a one-to-four USB split. When combined with chips like CH340, it can enable a single USB to multiple serial ports.

Solutions for Single USB to Multiple Serial Ports

USB HUB chips can be used in a cascading manner to achieve multiple USB port expansions. It should be noted that these USB ports share one port’s bandwidth, but for applications like serial ports that do not require a large amount of data, this is generally not an issue.

3. Software Implementation

We know that many microcontrollers have USB interfaces that can implement USB virtual serial port functionality. Generally, only one virtual serial port is created for use. Refer to STM32 Implementation of USB to Serial Function (Including Source Code). Taking STM32F072 as an example, this microcontroller’s USB port supports eight output and eight input endpoints. By configuring USB device descriptors and input/output endpoints, it is possible to implement multiple virtual serial ports over USB.

This method requires only one microcontroller and is implemented through software, making it quite flexible. The software can also implement other functionalities. The downside is that it is slightly more complex to implement.
Author: Mr. Zhang
Source: Embedded Technology Development
Friendly Reminder:

Due to recent changes in WeChat public platform push rules, many readers have reported not seeing updated articles in a timely manner. According to the latest rules, it is recommended to frequently click on “Recommended Reading, Share, Collect,” etc., to become a regular reader.

Recommended Reading:

  • Why Do Domestic Chips Use English for ‘Datasheet’?

  • The Boss Doesn’t Want to Scrap the Server Motherboard, Forcing Me to Provide an X-ray Report

  • It Took Two Months to Disassemble a Tesla, and I Didn’t Expect to Uncover These Secrets!

Leave a Comment