CN210955050U - USB multi-serial port converter - Google Patents

USB multi-serial port converter Download PDF

Info

Publication number
CN210955050U
CN210955050U CN201922008750.4U CN201922008750U CN210955050U CN 210955050 U CN210955050 U CN 210955050U CN 201922008750 U CN201922008750 U CN 201922008750U CN 210955050 U CN210955050 U CN 210955050U
Authority
CN
China
Prior art keywords
serial port
usb
serial
serial ports
converter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201922008750.4U
Other languages
Chinese (zh)
Inventor
李铭洋
李建
文光俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201922008750.4U priority Critical patent/CN210955050U/en
Application granted granted Critical
Publication of CN210955050U publication Critical patent/CN210955050U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The utility model discloses a USB multiple serial ports converter belongs to embedded development field, changes the problem that the TTL converter exists to current USB, the utility model discloses a USB multiple serial ports converter, including a main serial ports and a plurality of serial ports of forwardding, main serial ports links to each other with external control ware, and main serial ports transmits the data forwarding of receiving to respectively forwardding the serial ports, respectively forwardding the serial ports and link to each other with external equipment, has realized the effect that a USB changes TTL converter and connects a plurality of serial ports equipment to support multiple power supply mode, satisfy the user demand under the different conditions.

Description

USB multi-serial port converter
Technical Field
The utility model belongs to embedded development field, in particular to USB changes TTL multiple serial ports equipment.
Background
In the field of embedded development, most device modules adopt a serial port (UART, TTL level) as a communication control interface. Most PCs do not have a UART interface and typically require a dedicated translator.USB-to-TTL conversionThe converter is a device which conforms to the USB 2.0 communication protocol and can directly convert USB signals into serial port (TTL) signals. As shown in FIG. 1, the common devices for communication control by using serial ports include a GSM module, an ESP8266 WiFi module, HC-05 bluetooth module and various equipment that possess serial communication etc.. When a technical developer needs to test these devices with a PC, it is common practice to: a USB changes TTL converter and connects a serial port equipment, then opens the serial port and debugs the assistant on installing the computer of corresponding drive, sends the serial port control command through the serial port and debugs the assistant, then receives and looks over the equipment response message.
In summary, the disadvantages of the prior art are as follows:
1) at present, only one module can be connected with one USB-to-TTL converter. When a plurality of modules need to be connected and debugged simultaneously, a plurality of USB-to-TTL converters and a PC terminal USB port are needed, which is inconvenient;
2) the USB changes the power supply ability of TTL to be limited, when a plurality of devices with larger power consumption need to be debugged simultaneously, the serial port is utilized to directly supply power, and the simultaneous use requirements of a plurality of devices cannot be met. For example, the peak current of the GSM module can reach 2A;
3) although the module is a serial HUB, serial devices with different protocols cannot simultaneously transmit data.
SUMMERY OF THE UTILITY MODEL
The utility model provides a solve above-mentioned technical problem, provide a USB multiple serial ports converter, can support a plurality of equipment simultaneous workings as communication interface with the serial ports, and can adapt to the agreement of different equipment.
The utility model adopts the technical proposal that: a USB multi-serial port converter comprises a main serial port and a plurality of forwarding serial ports, wherein the main serial port is connected with an external controller, the main serial port forwards received data to each forwarding serial port through an MCU (microprogrammed control unit), and each forwarding serial port is connected with external equipment.
Further, the main serial port supports mini-USB.
Furthermore, each forwarding serial port supports 2.54mm pin headers.
Further, the power supply input circuit is further included, and the power supply input circuit adopts a 12V power supply or a USB 5V power supply.
Further, the power supply selection switch is further included and used for switching between a 12V power supply mode and a USB 5V power supply mode.
Furthermore, when the power input circuit is powered by a 12V power supply, the power input circuit further comprises a voltage reduction IC for converting the 12V power supply input into a current output supporting 5V 2A.
Further, the controller is a PC or a microprocessor supporting a serial port.
And the master serial port realizes the mutual conversion of the TTL signal and the USB signal through the level conversion chip.
The utility model has the advantages that: the utility model discloses a multi-serial port converter, the data that main serial ports received are forwarded to each extension serial ports according to the agreement, send to the equipment of connection by the extension serial ports, realized that a USB changes a TTL and supports a plurality of effects of using the equipment simultaneous working of serial ports as communication interface, the utility model discloses possess following advantage:
1) the converter only occupies one USB port at the PC end, and a plurality of expanded serial ports (UART) can communicate with a plurality of different devices, send data to the devices and check response information in real time;
2) simplified serial communication protocol. The method can utilize common equipment supporting the serial port to directly send the command according to a specified protocol, and return state information for each configuration command result in real time;
3) the module supports various power supply modes and meets the use requirements under different conditions;
4) the main serial port supports a pin header of 2.54mm and a mini-USB form. The mini-USB port is conveniently connected with a USB port of a PC end; the 2.54mm pin header mode supports the effect of extending the UART interface by using the interface to the common embedded equipment.
Drawings
FIG. 1 shows a common USB-to-TTL conversion object;
FIG. 2 is a layout diagram of a USB multi-serial converter module according to the present invention;
fig. 3 is a circuit diagram illustrating a connection between an STM32F091 chip and a crystal oscillator X1 according to an embodiment of the present invention;
fig. 4 is a circuit diagram of the mutual conversion between TTL signals and USB signals according to an embodiment of the present invention;
fig. 5 is a circuit diagram of an LED indicator light provided by an embodiment of the present invention;
fig. 6 is a flowchart of the working process of the USB multi-serial port converter provided in the embodiment of the present invention;
fig. 7 is a schematic diagram of the connection between the USB multi-serial port converter and the external device provided by the embodiment of the present invention.
Detailed Description
The utility model aims at providing a USB changes TTL multiple serial ports converter improves present USB and changes TTL module: the situation that a plurality of devices are used for testing simultaneously is difficult to meet only one TTL converted from one USB.
The utility model discloses a USB multiple serial ports converter not only can support a plurality of equipment simultaneous workings as communication interface with the serial ports, and can adapt to the agreement of different equipment. And then, the data returned by each serial port can be received and checked in real time.
As shown in fig. 2, the utility model discloses a USB multi-serial converter includes at least: the system comprises a power input circuit, an MCU, a crystal oscillator, a main serial port, a forwarding serial port, a level conversion chip and a power selection switch.
For the demand that satisfies the use of different power equipment, the utility model discloses the converter supports two kinds of modes power supply:
①, DC 12V power input, wherein the 12V power input is converted into current output supporting 5V 2A through a step-down IC, and the power supply mode can support a plurality of devices with higher power consumption to work simultaneously;
②, supplying power by USB 5V, namely supplying power directly by a USB port, and connecting a small amount of equipment for working.
When a 12V power supply is adopted for supplying power, the power supply input circuit also comprises a voltage reduction IC which is used for converting a 12V power supply input into a current output supporting 5V 2A, and the power supply input circuit autonomously selects one power supply input of the two power supply modes through a power supply selection switch, namely the input voltage is 5V no matter which power supply mode is adopted.
The utility model discloses a USB multi-serial converter provides 1 main serial ports and is connected with the PC end. The main serial port supports two forms of a mini-USB port and a 2.54 pin header; the other 7 UART peripheral interfaces are forwarding serial ports and are used for being connected with peripherals, and each forwarding serial port adopts a 2.54 pin arrangement mode.
The utility model discloses a multi-serial ports converter, microcontroller MCU adopt STM32F091 chip, and dominant frequency 48MHz has 8 UARTs, satisfies the design demand of multi-serial ports converter, and as shown IN FIG. 3, the pin PC14-OSC32_ IN/PC15-OSC32_ OUT of STM32F091 chip connects the crystal oscillator, and is specific: pin 1 of a crystal oscillator X1(32.768KHz) is connected with pins PC14-OSC32_ IN of an STM32F091 chip through a resistor R3 (the resistance value of the conventional crystal oscillator series resistor is 0 omega), pin 4 of the crystal oscillator X1 is connected with pins PC15-OSC32_ OUT of the STM32F091 chip through a resistor R5 (the resistance value of the conventional crystal oscillator series resistor is 0 omega), pin 1 of the crystal oscillator X1 is grounded through a capacitor C3(4.3pF), pin 4 of the crystal oscillator X1 is grounded through a capacitor C8(4.3pF), and pin 2/3 of the crystal oscillator X1 is suspended; the crystal oscillator is used for providing the working frequency of the components.
The utility model discloses the worker voltage that well STM32F091 chip adopted is 3.3V, the utility model discloses a low-pressure differential stabiliser AMS1117-3.3V converts VCC _5V and obtains VCC _3V3 for STM32F091 chip power supply, each serial ports adopt VCC _5V power supply.
As shown in fig. 4, the mini-USB port of the main serial port utilizes a level conversion chip CH340C under the control of the MCU to realize the interconversion between the TTL signal and the USB signal, so as to facilitate connection with the USB port of the PC port, where VCC _ USB is 5V.
The utility model discloses a USB multiple serial ports converter still includes: the reset circuit is connected with the NRST pin of the STM32F091 chip, and the MCU is in a reset state when the NRST pin of the STM32F091 chip inputs a low level; the LED indicator is used to indicate the power supply status, specifically, as shown in fig. 5, when the DC 12V power supply input is used, the power supply is connected to the first end of the first light emitting diode D1, the second end of the D1 is grounded through a resistor R2 of 10K, when the USB 5V power supply is used, the power supply is connected to the first end of the second light emitting diode D2, and the second end of the D2 is grounded through a resistor R4 of 4.7K.
The default parameter configuration of the serial port faces most serial port communication standards and supports user-defined parameters; the utility model discloses serial ports communication protocol who retrencies realizes each parameter configuration of serial ports converter and data transmission.
The USB multi-serial port converter of the utility model adopts a DMA mode to send data and a DMA + IDLE mode to realize the receiving of data with indefinite length; and the data received by the main serial port is forwarded to each forwarding serial port according to the protocol, and the forwarding serial ports send the data to the connected equipment.
The utility model discloses a USB multi-serial port converter makes real-time status response (execution result) to configuration order, transmission data etc. that the main serial port sent, once judges whether retransmission data or order.
The utility model discloses a USB multi-serial port converter, built-in self-defined communication protocol, bottom and serial ports communication protocol are compatible, support 1 to the multi-serial ports communication after encapsulating once more, can forward the data transfer of main serial ports to each and forward the serial ports. The special PC port serial port upper computer can be used for direct configuration, or the command and data can be sent according to the appointed format through the common serial port upper computer.
In order to reduce excessive CPU resources occupied during serial communication, the serial communication is transmitted in a DMA mode. DMA + IDLE interruption realizes the receiving of data with indefinite length, and the STM32F091RC chip supports 12 DMA channels and can enable DMA sending and DMA receiving for 6 downlink serial ports. The serial port receives data and realizes the reception of data with indefinite length by adopting a DMA + IDLE interrupt mode.
Designing a serial port driver: firstly, opening a serial port interrupt receiving function to allow receiving interrupt; generating an interrupt when the first byte is received (non-IDLE interrupt); opening IDLE interruption and DMA reception in the interruption callback function, and adjusting the initial address of the DMA receiving area; and entering an IDLE interrupt callback function, receiving serial port data, storing the serial port data into a buffer area, starting DMA (direct memory access) receiving again (without adjusting the receiving buffer area), and receiving the serial port data next time.
The USB multi-serial port converter realizes various functions of the converter based on two data frames: serial port parameter configuration and serial port data distribution.
A serial port configuration command: the length is 7 bytes, and the command frame format is used for configuring parameters of seven downlink serial ports of the converter.
Command head Separator symbol Parameter number Separator symbol Stringing head Last marker
Command header: 1 byte, marking the parameters of the configuration. The serial port communication system comprises 6 command frames, namely enabling serial port setting (0xFF), baud rate setting (0xFE), serial port communication data bit setting (0xFD), serial port check bit setting (0xFC), stop bit setting (0xFB) and flow control setting (0xFA), and default setting is set to (all serial ports are fully activated, the baud 9600, the data bit 8, the check bit is not present, the stop bit 1 and the flow control is not present).
The separator: 1 byte, english character ",";
parameter bits: 1 byte, corresponding to each parameter information, such as baud rate; in this embodiment, the correspondence between the command header and the parameter bit is shown in table 1;
end identifier: end of a segment command: 0x0A 0x 0D;
TABLE 1 Command header and parameter bit mapping
Figure BDA0002280465390000051
TABLE 2 Serial port header and UART corresponding relation
Head part Serial port
0x21 UART1
0x22 UART2
0x23 UART3
0x24 UART4
0x25 UART5
0x26 UART6
0x27 UART7
0x28 UART8
Figure BDA0002280465390000061
In response to the command: if the configuration is successful, the command head, the serial head, the data bit and the OK are returned](ii) a Otherwise no information is returned.
Serial port data transmission: and the length is not fixed, and the device is used for sending data to a specific serial port. The data frame format is as follows:
stringing head Separator symbol Data bit Last marker
Serial port header: 1 byte for marking the corresponding serial port to which the data is transmitted, and the corresponding relation between the serial port head and the UART in this embodiment is shown in table 2.
The separator: 1 byte, English character ": to divide the serial port head and data bit.
Data bits: and the serial port is used for transmitting data with an indefinite length.
End identifier: 0x7E as an end marker for a frame of serial data.
Figure BDA0002280465390000062
In response to the command: if the configuration is successful, the command head, the serial port, the sending data length and the OK are returned]Otherwise, no information is returned.
Based on the return commands of the two data frames, whether the serial port parameter setting and the data transmission are successful can be judged. If not successful, the current command may be retransmitted.
After a 12V power supply is input, the power supply is converted into an output capable of providing 5V and 2A through an NS6312 voltage reduction IC, and power supply output pins are distributed on each serial port pin.
As shown in fig. 6 is the utility model discloses a USB multiple serial ports converter work flow chart, the equipment is gone up the electricity and is started, and each serial ports parameter of accessible main window configuration can carry out serial ports data transmission after the setting is accomplished. Or the default parameters of the modules can be adopted to directly transmit data. Whether the command is successfully executed or not can be judged through a return result of the module to the command execution, and if not, the current command is retransmitted.
As shown in FIG. 7, the utility model discloses a USB multi-serial converter only occupies USB mouth of PC end, and a plurality of serial ports (UART) that expand can communicate with the equipment of a plurality of differences. And sending data to the equipment and viewing the response information in real time.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention, and it is to be understood that the scope of the invention is not limited to such specific statements and embodiments. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (8)

1. A USB multi-serial port converter is characterized by comprising a main serial port and a plurality of forwarding serial ports, wherein the main serial port is connected with an external controller, the main serial port forwards received data to the plurality of forwarding serial ports simultaneously through an MCU (microprogrammed control unit), and each forwarding serial port is connected with external equipment; the microcontroller MCU is provided with 8 paths of independent UARTs, a main frequency is 48MHz, and the microcontroller MCU is provided with 8 UARTs, wherein 1 UART is a main serial port connected with a PC end, and the other 7 UARTs are forwarding serial ports used for being connected with external equipment; and the data received by the main serial port is forwarded to each forwarding serial port according to the peripheral protocol connected with each forwarding serial port.
2. The USB multi-serial converter according to claim 1, wherein the master serial port supports mini-USB and 2.54mm pin header formats.
3. The USB multi-serial converter according to claim 1, wherein each forwarding serial port supports 2.54mm pin headers.
4. The USB multi-serial port converter according to claim 2, further comprising a power input circuit, wherein the power input circuit is powered by 12V power or 5V USB power.
5. The USB multi-serial port converter according to claim 4, further comprising a power selection switch for switching between 12V power supply and 5V USB power supply.
6. The USB multi-serial converter according to claim 4, wherein when the power input circuit is powered by a 12V power supply, the USB multi-serial converter further comprises a buck IC for converting the 12V power supply input into a current output supporting 5V 2A.
7. The USB multi-serial converter according to claim 1, wherein the controller is a PC or a serial port-supporting microprocessor.
8. The USB multi-serial converter according to claim 1, further comprising a level shift chip, wherein the main serial port realizes mutual conversion between TTL signals and USB signals through the level shift chip.
CN201922008750.4U 2019-11-20 2019-11-20 USB multi-serial port converter Active CN210955050U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201922008750.4U CN210955050U (en) 2019-11-20 2019-11-20 USB multi-serial port converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201922008750.4U CN210955050U (en) 2019-11-20 2019-11-20 USB multi-serial port converter

Publications (1)

Publication Number Publication Date
CN210955050U true CN210955050U (en) 2020-07-07

Family

ID=71376510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201922008750.4U Active CN210955050U (en) 2019-11-20 2019-11-20 USB multi-serial port converter

Country Status (1)

Country Link
CN (1) CN210955050U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306915A (en) * 2020-10-26 2021-02-02 英业达科技有限公司 Communication interface control system and method thereof
CN113419983A (en) * 2021-08-24 2021-09-21 武汉迈威通信股份有限公司 Serial server and implementation method thereof
CN113836064A (en) * 2021-08-13 2021-12-24 苏州浪潮智能科技有限公司 Serial port compatible with multiple bottom layer control ports

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306915A (en) * 2020-10-26 2021-02-02 英业达科技有限公司 Communication interface control system and method thereof
CN113836064A (en) * 2021-08-13 2021-12-24 苏州浪潮智能科技有限公司 Serial port compatible with multiple bottom layer control ports
CN113836064B (en) * 2021-08-13 2023-08-11 苏州浪潮智能科技有限公司 Serial port compatible with multiple bottom control ports
CN113419983A (en) * 2021-08-24 2021-09-21 武汉迈威通信股份有限公司 Serial server and implementation method thereof

Similar Documents

Publication Publication Date Title
CN210955050U (en) USB multi-serial port converter
CN108111382B (en) Communication device based on I3C bus and communication method thereof
CN105785958A (en) Smart factory-based multi-function data acquisition device, acquisition system and method
CN101087235A (en) A FPGA-based multi-functional communication interface conversion device and method
CN103944895A (en) Data fusing device of heterogeneous sensor network
US20170116147A1 (en) System, device and method for transmitting signals between different communication interfaces
CN102196601A (en) Wireless data transmission device based on WSN (wireless sensor network), GPRS (general packet radio service) and GPS (global position system)
CN113626360B (en) Low-speed MIPI observation type SOC chip and operation method thereof
CN102445981B (en) Data transmission system and data transmission method
CN103605306A (en) Communication device based on UART communication interface extension
CN102693203A (en) Embedded USB (universal serial bus) host
CN105354157A (en) Method, device and system for configuring IIC (Inter-Integrated Circuit) device
CN214042097U (en) PLC serial port communication extension module capable of customizing protocol
CN115904844A (en) UART simulation model for printing BOOT information and working method thereof
CN108183705A (en) A kind of server system one-way bus transmission method
CN104484302A (en) System for realizing both-way communication and control between two hosts based on USB (Universal Serial Bus) interfaces
CN212541067U (en) Internet of things human-computer interface system based on SAM9X60
CN203352567U (en) Modulator controller
CN201813396U (en) CANopen-CAN (controller area network) gateway
CN201830287U (en) Controller area network (CAN) open-RS232 gateway
CN212846779U (en) Novel program downloading system with state monitoring function
CN210605403U (en) Intelligent host supporting multiple communication modes
CN215268307U (en) Multi-board arbitration communication system based on Aurora protocol
CN214101376U (en) High-speed wireless data transceiver
CN115037809B (en) Industrial wireless gateway system supporting multiple protocols

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant