Device capable of directly realizing data distribution through UART (Universal Asynchronous Receiver / Transmitter) port and USB (Universal Serial Bus) / UART conversion device with same

By designing a USB/UART conversion device that can realize data shunting directly through the UART port, the problems of incorrect data transmission and low data monitoring efficiency in the existing technology are solved, and correct data transmission under uncertain baud rate is achieved. and efficient data offloading and monitoring.

CN119336674APending Publication Date: 2025-01-21PROLIFIC TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310886559.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-19
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

When the existing USB/UART conversion device is not sure of the baud rate of the first serial data, it may cause the first USB data to be incorrect, and when data monitoring is required, there are problems such as data shunt and low monitoring efficiency.

Method used

Design a device that can realize data shunting directly through the UART port. It is arranged on the circuit board through the integrated circuit chip and is electrically connected to the USB electrical connector, the first UART electrical connector, the second UART electrical connector and the third UART. The devices together form a USB/UART conversion device. The device provides a set of virtual communication ports and two sets of physical UART communication ports for the main control electronic device, allowing the main control electronic device to transmit data with external electronic devices, and allows the monitoring electronic device to transmit data through the second or third UART electrical connector. Diversion and monitoring.

Benefits of technology

Correct data transmission under uncertain baud rate conditions is achieved, the efficiency of data shunting and monitoring is improved, and the main control and monitoring electronic devices are allowed to perform data transmission and shunting based on different baud rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336674A_ABST
    Figure CN119336674A_ABST
Patent Text Reader

Abstract

The invention mainly discloses a device capable of directly realizing data distribution through a UART (Universal Asynchronous Receiver / Transmitter) port, which can be arranged on a circuit board in an integrated circuit (IC) chip mode, and forms a USB / UART conversion device together with a USB electric connector, a first UART electric connector, a second UART electric connector and a third UART electric connector which are arranged on the circuit board. When in use, the USB electric connector is electrically connected to a master control electronic device, the first UART electric connector is electrically connected to an electronic device, and the second UART electric connector or the third UART electric connector is electrically connected to a monitoring electronic device. Through the arrangement, the device provided by the invention provides a group of virtual communication ports for the main control electronic device, so that the main control electronic device utilizes the virtual communication ports to carry out data transmission with the external electronic device. Meanwhile, the external monitoring electronic device can also perform data distribution and data monitoring by using other two groups of entity UART communication ports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of USB-to-UART conversion devices, and more particularly to a chip that can provide a host computer with at least one virtual communication port (Virtual COM port) and at least two physical UART communication ports (UARTCOM port), so that the host computer can use one virtual communication port to transmit data with an external electronic device, while an external monitoring electronic device can also use the other two physical UART communication ports to perform data diversion and data monitoring. Background Art

[0002] Due to the simple and direct transmission protocol, the universal asynchronous receiver / transmitter (UART) interface was widely used in early industrial control. RS232 electrical connectors, RS422 electrical connectors, and RS485 electrical connectors are commonly used UART interfaces. In addition, early personal computers were also equipped with RS232 electrical connectors for asynchronous data transmission with modems. However, due to the increasingly faster data transmission rate of the universal serial bus (USB) interface and its plug-and-play characteristics, the USB interface has gradually become a data transmission bridge between electronic devices such as personal hosts and notebook computers and external electronic devices.

[0003] However, due to the short communication distance of the USB interface, it is not suitable for industrial control applications that require long-distance data transmission. Although the prior art can replace the USB interface with an Ethernet interface or a wireless network interface for long-distance data transmission, the Ethernet interface and the wireless network interface have the disadvantage of being too expensive. Therefore, the manufacturer of USB devices has developed a USB / UART conversion device, also known as a USB / UART bridge. Figure 1 , Figure 2 1 is a first and second stereogram of a known USB / UART conversion device. Figure 1 and Figure 2 As shown, the conventional USB / UART conversion device 1a comprises: a USB interface 11a for coupling to a computer host 2a, a UART interface 12a ( Figure 2Currently, famous commercial bridge chips 13a include FTDI-232 launched by Future Technology Devices International (FTDI) Ltd. and PL-2303 launched by Prolific Technology Inc. of Taiwan.

[0004] In some industrial control applications, it is necessary to perform data monitoring on the transmitted data to ensure the correctness of the data. Therefore, Chinese Patent No. CN101101567B discloses a monitoring system with dual serial port communication, wherein the serial port communication refers to serial data transmission, which can also be called serial communication or sequence communication. Figure 3 FIG. 1 is a block diagram of a known dual serial communication monitoring system. Figure 3 As shown, the dual serial communication monitoring system 1b is coupled between a first electronic device 2b having a first RS232 interface 21b and a second electronic device 3b having a second RS232 interface 31b, and includes: a first USB / RS232 conversion device 11b, a second USB / RS232 conversion device 12b, a USB hub chip 13b, and a host computer 10b. In more detail, the first RS232 interface 21b transmits the first serial data to the signal receiving end (Rx) of the second RS232 interface 31b through its signal transmission end (Tx), and the second RS232 interface 31b transmits the second serial data to the signal receiving end (Rx) of the first RS232 interface 21b through its signal transmission end (Tx).

[0005] like Figure 3 As shown, the first USB / RS232 conversion device 11b is coupled to the first RS232 interface 21b to receive the first serial data, and convert the first serial data into a first USB data, so as to transmit the first USB data to the host computer 10b. On the other hand, the second USB / RS232 conversion device 12b is coupled to the second RS232 interface 31b to receive the second serial data, and convert the second serial data into a second USB data, so as to transmit the second USB data to the host computer 10b.

[0006] Figure 3The dual serial communication monitoring system 1b shown can indeed be used to monitor the transmission data. However, the dual serial communication monitoring system 1b exhibits the following major disadvantages in actual use: when the baud rate of the first serial data is uncertain, the first USB data generated by the first USB / RS232 conversion device 11b based on the first serial data may be incorrect.

[0007] In summary, it can be seen that the existing USB / UART conversion device has practical defects that need to be improved. Therefore, the inventor of this case has made great efforts to study and invent, and finally developed a device that can directly realize data diversion through the UART port and a USB / UART conversion device having the device. Summary of the invention

[0008] The main purpose of the present invention is to provide a device that can directly realize data diversion through a UART port, which can be arranged on a circuit board in the form of an integrated circuit (IC) chip, and together with a USB electrical connector, a first UART electrical connector, a second UART electrical connector, and a third UART electrical connector arranged on the circuit board, form a USB / UART conversion device. When in use, the USB electrical connector is electrically connected to a main control electronic device, the first UART electrical connector is electrically connected to an electronic device, and the second UART electrical connector or the third UART electrical connector is electrically connected to a monitoring electronic device. In this way, the device of the present invention provides a group of virtual communication ports (VirtualCOMport) for the main control electronic device so that the main control electronic device uses the virtual communication port to transmit data with an external electronic device. At the same time, the external monitoring electronic device can also use the other two groups of physical UART communication ports (i.e., the second UART electrical connector and the third UART electrical connector) for data diversion and data monitoring.

[0009] More importantly, when the device of the present invention is used, the main control electronic device and the electronic device can perform data transmission based on a first baud rate. Furthermore, through the second / third UART electrical connector, the monitoring electronic device can implement data diversion based on a second baud rate. In other words, the baud rate of the second / third UART electrical connector can be adjusted according to actual applications and is not limited to being the same as the first baud rate.

[0010] In addition, when data is transmitted between the electronic device and the main control electronic device, the monitoring electronic device can utilize the second UART electrical connector or the third UART electrical connector to integrate additional data into the data being transmitted.

[0011] To achieve the above object, the present invention proposes an embodiment of the device capable of directly implementing data splitting through a UART port, which comprises:

[0012] A USB data transmission unit, coupled to a USB interface, so as to communicate with a main control electronic device through the USB interface;

[0013] a first UART controller, coupled to a first UART interface, so as to communicate with an electronic device through the first UART interface;

[0014] a second UART controller, for coupling to a second UART interface, so as to communicate with a monitoring electronic device through the second UART interface;

[0015] a third UART controller, for coupling to a third UART interface, so as to communicate with the monitoring electronic device through the third UART interface;

[0016] A control endpoint coupled to the USB data transmission unit;

[0017] An interface unit coupled to the USB data transmission unit;

[0018] a data cache unit, coupled to the interface unit;

[0019] A massive cache unit coupled to the data cache unit and having a control buffer (Control FIFO) coupled to the first UART controller, the second UART controller, and the third UART controller;

[0020] a data distribution unit coupled to the massive cache unit, the first UART controller, the second UART controller, and the third UART controller;

[0021] When the electronic device transmits a first serial data to the first UART controller through the first UART interface, the first UART controller receives the first serial data at a first baud rate, and then transmits the first serial data to the first UART controller and the huge buffer unit through the data splitting unit, so that the USB data transmission unit then receives the first serial data through the data buffer unit and the interface unit, and then converts the first serial data into a first USB data and transmits it to the main control electronic device;

[0022] wherein, after the main control electronic device transmits a second USB data to the USB data transmission unit, the USB data transmission unit transmits the second USB data to the bulk buffer unit via the interface unit and the data buffer unit, so that the data distribution unit receives the second USB data through the bulk buffer unit, and then transmits the second USB data to the first UART controller and the second UART controller;

[0023] After receiving the second USB data, the first UART controller converts the second USB data into second serial data, and then transmits the second serial data to the electronic device at the first baud rate.

[0024] In one embodiment, after receiving the first serial data, the third UART controller further transmits the first serial data to the monitoring electronic device at a second baud rate, and the second baud rate can be the same as or different from the first baud rate. Moreover, when the electronic device transmits the first serial data to the main control electronic device through the device of the present invention that can directly realize data diversion through the UART port, the monitoring electronic device 4 can transmit a serial data to the data diversion unit through the third UART controller, thereby merging the serial data into the first serial data.

[0025] In one embodiment, after receiving the second USB data, the second UART controller further transmits a serial data corresponding to the second USB data to the monitoring electronic device at a third baud rate, and the third baud rate can be the same as or different from the first baud rate. Furthermore, when the main control electronic device transmits the second USB data to the electronic device through the device of the present invention that can directly realize data diversion through the UART port, the monitoring electronic device can transmit a data to the data diversion unit through the second UART controller, thereby merging the data into the second USB data.

[0026] In a feasible embodiment, the device of the present invention that can directly realize data diversion through the UART port is an electronic chip selected from the group consisting of an integrated circuit (IC) chip, a complex programmable logic device (CPLD) chip and a field programmable gate array (FPGA) chip.

[0027] In one embodiment, the USB interface 1BF includes a first USB electrical connector, the first UART interface includes a first UART electrical connector, the second UART interface includes a second UART electrical connector, and the third UART interface includes a third UART electrical connector.

[0028] In one embodiment, the first UART electrical connector, the second UART electrical connector and the third UART electrical connector are all electrical connectors selected from the group consisting of an RS232 electrical connector, an RS422 electrical connector and an RS485 electrical connector.

[0029] In one embodiment, the USB data transmission unit comprises:

[0030] A USB physical layer (PHY) unit, for coupling to the USB interface; and

[0031] A USB serial interface engine (SIE) unit is coupled to the USB physical layer unit.

[0032] In one embodiment, the interface unit comprises:

[0033] A first endpoint, coupling the USB serial interface engine unit and the data buffer unit;

[0034] A second endpoint, coupling the USB serial interface engine unit and the data buffer unit; and

[0035] A third endpoint, coupling the USB serial interface engine) unit and the data buffer unit;

[0036] The control endpoint is coupled to the USB serial interface engine unit.

[0037] In one embodiment, the data cache unit includes:

[0038] The control buffer (ControlFIFO) is coupled to the first UART controller, the second UART controller, and the third UART controller;

[0039] a first buffer (FIFOIN) coupled to the first endpoint and the bulk buffer unit;

[0040] a second buffer (FIFOOUT) coupled to the second endpoint and the bulk buffer unit; and

[0041] A third buffer (FIFOIN) is coupled to the third endpoint and the bulk buffer unit.

[0042] In a feasible embodiment, the device of the present invention that can directly realize data splitting through the UART port also includes:

[0043] a memory coupled to the bulk cache unit and the control register; and

[0044] A GPIO unit is coupled to the bulk buffer unit and the control buffer and includes at least one GPIO pin.

[0045] In one embodiment, the bulk cache unit includes:

[0046] an interrupt input buffer (InterruptFIFO), coupled to the data distribution unit and the first buffer (FIFOIN);

[0047] a bulk output buffer (BulkOUTFIFO), coupled to the data distribution unit and the second buffer (FIFOOUT);

[0048] a bulk input buffer (BulkINFIFO), coupled to the data distribution unit and the third buffer (FIFOIN); and

[0049] The control register is coupled to the first UART controller, the second UART controller and the third UART controller, and is also coupled to the control endpoint.

[0050] In one embodiment, the data distribution unit includes:

[0051] A first multiplexer having a first input terminal, a second input terminal and an output terminal;

[0052] a second multiplexer, also having a first input terminal, a second input terminal and an output terminal;

[0053] a fourth buffer (FIFOTX1), coupled between the output terminal of the first multiplexer and the first UART controller;

[0054] a fifth buffer (FIFORX1) coupled between the first UART controller and the first input terminal of the second multiplexer;

[0055] a sixth register (FIFOTX2) coupled to the second UART controller and simultaneously coupled to a first common point between a tenth register (FIFOTX4) and the first multiplexer;

[0056] a seventh buffer (FIFORX2) coupled between the second UART controller and the first input terminal of the first multiplexer;

[0057] an eighth register (FIFOTX3), coupled to the third UART controller, and also coupled to a second common point between the fifth register (FIFORX1) and the first input terminal of the second multiplexer;

[0058] a ninth buffer (FIFORX3) coupled between the third UART controller and the second input terminal of the second multiplexer;

[0059] a tenth buffer (FIFOTX4), coupled to the second input terminal of the first multiplexer and also coupled to the bulk output buffer (BulkOUTFIFO); and

[0060] An eleventh register (FIFORX4) is coupled to the output end of the second multiplexer and is also coupled to the bulk input register (BulkINFIFO).

[0061] In a feasible embodiment, the main control electronic device is an electronic device selected from the group consisting of a notebook computer, a desktop computer, an all-in-one computer, an industrial computer, and a cloud server.

[0062] In addition, the present invention also discloses a USB / UART conversion device, which includes: a circuit board, a USB electrical connector, a UART electrical connector, and the device of the present invention that can directly realize data diversion through the UART port as described above, wherein the USB electrical connector, the UART electrical connector and the device that can directly realize data diversion through the UART port are arranged on the circuit board, and the device that can directly realize data diversion through the UART port couples the USB electrical connector and the UART electrical connector. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 is a first stereoscopic diagram of a known USB / UART conversion device;

[0064] Figure 2 is a second stereoscopic diagram of a known USB / UART conversion device;

[0065] Figure 3 A block diagram of a known dual serial communication monitoring system;

[0066] Figure 4 A block diagram of a device capable of directly implementing data diversion through a UART port according to the present invention;

[0067] Figure 5 for Figure 4An exemplary stereogram of a main control electronic device, an electronic device and a device of the present invention capable of directly implementing data diversion through a UART port;

[0068] Figure 6 for Figure 5 A perspective view of the USB / UART conversion device shown;

[0069] Figure 7 for Figure 5 The block diagram of the device that can directly realize data diversion through the UART port is shown;

[0070] Figure 8 A device manager screen of the operating system of the host electronic device;

[0071] Fig. 9 A device manager screen of the operating system of the host electronic device;

[0072] Fig.10 for Figure 7 A block diagram of a USB data transfer unit is shown; and

[0073] Fig.11 for Figure 7 The block diagram of the data splitting unit, the first UART controller, the second UART controller, and the third UART controller is shown.

[0074]

Explanation of symbols

[0075] 1a: USB / UART converter

[0076] 10a: Bridge chip

[0077] 11a: USB interface

[0078] 12a: UART interface

[0079] 2a: Computer host

[0080] 1b: Dual serial communication monitoring system

[0081] 10b: Host computer

[0082] 11b: First USB / RS232 conversion device

[0083] 12b: Second USB / RS232 conversion device

[0084] 13b:USB hub chip

[0085] 2b: First electronic device

[0086] 21b: First RS232 interface

[0087] 3b: Second electronic device

[0088] 31b: Second RS232 interface

[0089] 1: A device that can directly realize data diversion through the UART port

[0090] 1BF: USB interface

[0091] 1UF1: First UART interface

[0092] 1UF2: Second UART interface

[0093] 1UF3: The third UART interface

[0094] 1UB: The first USB electrical connector

[0095] 1U1: First UART electrical connector

[0096] 1U2: Second UART electrical connector

[0097] 1U3: Third UART electrical connector

[0098] 1SP: Circuit board

[0099] 11:USB data transmission unit

[0100] 111:USB physical layer unit

[0101] 112: USB Serial Interface Engine (SIE) unit

[0102] 10: First UART controller

[0103] 12: Interface unit

[0104] 121: First endpoint

[0105] 122: Second endpoint

[0106] 123: The third endpoint

[0107] 120: Control endpoint

[0108] 13: Data cache unit

[0109] 131: First Buffer

[0110] 132: Second Buffer

[0111] 133: Third Buffer

[0112] 14: Massive Cache Unit

[0113] 141: Interrupt input register

[0114] 142: Massive Output Buffer

[0115] 143: Massive Input Buffer

[0116] 140: Control Buffer

[0117] 15: Data diversion unit

[0118] 151: First Multiplexer

[0119] 152: Second multiplexer

[0120] 153: Fourth Buffer

[0121] 154: Fifth Buffer

[0122] 155: Sixth Buffer

[0123] 156: 7th Cache

[0124] 157: 8th Buffer

[0125] 158: Ninth Cache

[0126] 159: 10th Buffer

[0127] 15A: 11th register

[0128] 16: Second UART controller

[0129] 17: Third UART controller

[0130] 18: Memory

[0131] 19:GPIO unit

[0132] 2: Main control electronics

[0133] 3: Electronic devices

[0134] 4: Monitoring electronic devices

[0135] 5:USB / UART conversion device DETAILED DESCRIPTION

[0136] In order to more clearly describe the device with data monitoring function that can directly realize data diversion through the UART port and the USB / UART conversion device having the device proposed by the present invention, the preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[0137] See also Figure 4 , which is a block diagram of a device of the present invention that can directly realize data diversion through a UART port. Figure 4As shown, the device 1 of the present invention that can directly realize data diversion through the UART port communicates with a main control electronic device 2 through a USB interface 1BF, communicates with an electronic device 3 through a first UART interface 1UF1, and communicates with a monitoring electronic device 4 through a second UART interface 1UF2 and / or a third UART interface 1UF3. With such a configuration, when data is transmitted between the electronic device 3 and the main control electronic device 2, the monitoring electronic device 4 can use the second UART interface 1UF2 and / or the third UART interface 1UF3 to monitor the data in transmission.

[0138] Figure 5 for Figure 4 The main control electronic device 2, the electronic device 3 and the device 1 of the present invention that can directly realize data diversion through the UART port are shown in an exemplary three-dimensional diagram. Figure 4 and Figure 5 As shown, in one embodiment, the USB interface 1BF includes a first USB electrical connector 1UB, the first UART interface 1UF1 includes a first UART electrical connector 1U1, the second UART interface 1UF2 includes a second UART electrical connector 1U2, and the third UART interface 1UF3 includes a third UART electrical connector 1U3. It should be understood that the first USB electrical connector 1UB is used to electrically connect to a USB electrical connector of the main control electronic device 2, and the first UART electrical connector 1U1 is used to electrically connect to a UART electrical connector of the electronic device 3. Furthermore, the second UART electrical connector 1U2 and / or the third UART interface 1UF3 are used to electrically connect to a UART electrical connector of the monitoring electronic device and / or a UART electrical connector of the main control electronic device 2. In other words, as Figure 5 As shown, the device 1 of the present invention that can directly realize data diversion through the UART port can be set on a circuit board 1SP in the form of an integrated circuit (IC) chip, and together with a first USB electrical connector 1UB, a first UART electrical connector 1U1, a second UART electrical connector 1U2, and a third UART electrical connector 1U3 set on the circuit board 1PP constitute a USB / UART conversion device 5.

[0139] Figure 6 for Figure 5 The three-dimensional diagram of the USB / UART conversion device shown in FIG. Figure 5 and Figure 6As shown, in a feasible embodiment, an FPGA chip or a CPLD chip can be used in conjunction with a hardware description language (HDL) to implement the device 1 of the present invention that can directly realize data diversion through a UART port. On the other hand, the first UART electrical connector 1U1, the second UART electrical connector 1U2 and the first UART electrical connector 1U3 can all be an RS232 electrical connector, an RS422 electrical connector or an RS485 electrical connector. Furthermore, the main control electronic device 2 can be an electronic device in the group consisting of a notebook computer, a desktop computer, an all-in-one computer, an industrial computer, and a cloud server.

[0140] Figure 7 for Figure 5 The block diagram of the device shown in FIG. 1 can directly realize data diversion through the UART port. Figure 5 , Figure 6 and Figure 7 As shown, the device 1 of the present invention that can directly realize data diversion through the UART port mainly includes: a USB data transmission unit 11, a first UART controller 10, a second UART controller 16, a third UART controller 17, an interface unit 12, a data cache unit 13, a huge cache unit 14, and a data diversion unit 15. According to the design of the present invention, the USB data transmission unit 11 is used to couple the USB interface 1BF, so as to communicate with the main control electronic device 2 through the USB interface 1BF. Relatively, the first UART controller 10 is used to couple the first UART interface 1UF1 so as to communicate with the electronic device 3 through the first UART interface 1UF1. On the other hand, the second UART controller 16 is used to couple the second UART interface 1UF2, so as to communicate with the monitoring electronic device 4 through the second UART interface 1UF2 to realize the data monitoring function. Furthermore, the third UART controller 17 is used to couple to the third UART interface 1UF3, so as to communicate with the monitoring electronic device 4 through the third UART interface 1UF3 to realize the data monitoring function.

[0141] like Figure 5 , Figure 6 and Figure 7As shown, the control endpoint (EP0) 120 and the interface unit 12 are both coupled to the USB data transmission unit 11. Electronic engineers who are familiar with the design and manufacture of USB devices must know that a conventional USB device will have at least three endpoints (Endpoints), namely EP0, EP_IN and EP_OUT, where EP0 is the control endpoint for transmitting configuration and control data. Electronic engineers who are familiar with the design and manufacture of USB devices must know that EP_IN (i.e., EP1) is used to transmit data from the Device end (such as: electronic device 3) to the Host end (such as: main control electronic device 2), and EP_OUT (i.e., EP2) is used to transmit data from the Host end (such as: main control electronic device 2) to the Device end (such as: electronic device 3). Unlike conventional USB devices, Figure 6 As shown, in the device 1 of the present invention that can directly realize data diversion through the UART port, the control endpoint 120 is used as the EP0 for transmitting configuration and control data. In addition, the interface unit 12 includes a first endpoint 131, a second endpoint 132 and a third endpoint 133, wherein the second endpoint 132 is used to transmit data from the Host end (i.e., the main control electronic device 2) to the Device end (i.e., the electronic device 3), and the first endpoint 131 and the third endpoint 133 are both used to transmit data from the Device end to the Host end.

[0142] In more detail, the data buffer unit 13 is coupled to the interface unit 12. In addition, the huge buffer unit 14 is coupled to the data buffer unit 13, and has a control buffer (ControlFIFO) 140 coupled to the first UART controller 10, the second UART controller 16, and the third UART controller 17, wherein the control buffer 140 is coupled to the first UART controller 10, the second UART controller 16, and the third UART controller 17, and coupled to the control endpoint 120. It should be understood that through the control endpoint (i.e., EP0) 120 and the control buffer (ControlFIFO) 140, the USB data transmission unit 11 (i.e., Host end) and the first UART controller 10 (i.e., Device end) can be configured and control data can be transmitted. Of course, the USB data transmission unit 11 and the second UART controller 16 and / or the third UART controller 17 can also be configured and control data can be transmitted.

[0143] like Figure 5 and Figure 7As shown, the data split unit 15 is coupled to the massive cache unit 14, the first UART controller 10, the second UART controller 16, and the third UART controller 17. According to this configuration, when the electronic device 3 transmits a first serial data to the first UART controller 10 through the first UART interface 1UF1, the first UART controller 10 receives the first serial data at a first baud rate, and then transmits the first serial data to the first UART controller 17 and the massive cache unit 14 through the data split unit 15, so that the USB data transmission unit 11 then receives the first serial data through the data cache unit 13 and the interface unit 12, and then converts the first serial data into a first USB data and transmits it to the main control electronic device 2.

[0144] It is worth noting that after receiving the first serial data, the third UART controller 17 further transmits the first serial data to the monitoring electronic device 4 at a second baud rate, thereby realizing data monitoring. When using the device 1 of the present invention, the main control electronic device 2 and the electronic device 3 can perform data transmission based on a first baud rate (Baudrate). Moreover, through the third UART electrical connector 17, the monitoring electronic device 4 can realize data diversion and data communication based on a second baud rate. In other words, the second baud rate of the third UART electrical connector 17 can be adjusted according to actual applications, and is not limited to being the same as the first baud rate. In addition, under the bridging of the device 1 of the present invention, the monitoring electronic device 4 can transmit a serial data to the data diversion unit 15 through the third UART controller 17, thereby merging the serial data into the first serial data.

[0145] like Figure 5 and Figure 7 As shown, after the main control electronic device 2 transmits a second USB data to the USB data transmission unit 11, the USB data transmission unit 11 transmits the second USB data to the huge buffer unit 14 via the interface unit 12 and the data buffer unit 13, so that the data distribution unit 15 receives the second USB data through the huge buffer unit 14, and then transmits the second USB data to the first UART controller 10 and the second UART controller 16. Therefore, after receiving the second USB data, the first UART controller 10 converts the second USB data into a second serial data, and then transmits the second serial data to the electronic device 3 according to the first baud rate.

[0146] It is worth noting that after receiving the second USB data, the second UART controller 16 further transmits a serial data corresponding to the second USB data to the monitoring electronic device 4 at a third baud rate, thereby realizing data monitoring. When using the device 1 of the present invention, the main control electronic device 2 and the electronic device 3 can transmit data based on a first baud rate (Baudrate). Moreover, through the second UART electrical connector 16, the monitoring electronic device 4 can realize data diversion and data communication based on a third baud rate. In other words, the third baud rate of the second UART electrical connector 16 can be adjusted according to actual applications, and is not limited to being the same as the first baud rate. In addition, under the bridging of the device 1 of the present invention, the monitoring electronic device 4 can transmit a data to the data diversion unit 15 through the second UART controller 16, thereby incorporating the data into the second USB data.

[0147] According to the design of the present invention, the standardCDC-ACMdriver can be used as a driver to be embedded in the memory 1M of the device 1 that can directly implement data diversion through the UART port. Figure 8 As shown, when using standardCDC-ACMdriver as the driver, after the first USB electrical connector 1UB is connected to the USB electrical connector of the main electronic device 2, the device 1 of the present invention that can directly realize data diversion through the UART port will provide the main electronic device 2 with a set of virtual communication ports (VirtualCOMport), namely USBtoserialCOMport, so that the main electronic device 2 can use this virtual communication port (USBtoserialCOMport) and the electronic device 3 to transmit data. And, in a feasible embodiment, engineers can also edit the driver by themselves. Fig. 9 As shown, in the case of using a self-edited driver, after the first USB electrical connector 1UB is connected to the USB electrical connector of the main control electronic device 2, the device 1 of the present invention that can directly realize data diversion through the UART port will also provide the main control electronic device 2 with a set of virtual communication ports (Virtual COMport). Figure 8 and Fig. 9 It can be found that Figure 8 The device names of the virtual comms ports shown are standard names, and Fig. 9 The device name of the virtual communication port shown is the engineer-defined name.

[0148] It is additionally noted that the memory 18 is coupled to the control buffer 140 of the massive buffer unit 14. Furthermore, in a feasible embodiment, the device 1 for directly implementing data flow distribution through a UART port of the present invention further includes a GPIO unit 19 coupled to a common point between the control buffer 140 and the memory 18, and the GPIO unit 19 includes at least one GPIO pin.

[0149] Fig.10 for Figure 7 FIG. 1 is a block diagram of a USB data transmission unit 11. According to the design of the present invention, the USB data transmission unit 11 includes a USB physical layer (PHY) unit 111 and a USB serial interface engine (SIE) unit 112, wherein the USB physical layer unit 111 is used to couple the USB interface 1BF, and the USB serial interface engine unit 112 is coupled to the USB physical layer unit 111. On the other hand, Figure 7 and Fig.10 As shown, the control endpoint 120 is coupled to the USB serial interface engine unit 112, the first endpoint 121 is coupled to the USB serial interface engine unit 112 and the data cache unit 13, the second endpoint 122 is coupled to the USB serial interface engine unit 112 and the data cache unit 13, and the third endpoint 123 is coupled to the USB serial interface engine unit 112 and the data cache unit 13. It is worth noting that, since the present invention specifically makes the interface unit 12 include a first terminal (EP1=EPIN) 121, a second terminal (EP2=EP_OUT) 122 and a third terminal (EP3=EPIN) 123, the data cache unit 13 accordingly includes a first buffer (FIFOIN) 131, a second buffer (FIFOOUT) 132 and a third buffer (FIFOIN) 133, wherein the first buffer 131 is coupled between the first terminal 121 and the huge cache unit 14, the second buffer 132 is coupled between the second terminal 122 and the huge cache unit 14, and the third buffer 133 is coupled between the third terminal 123 and the huge cache unit 14.

[0150] On the other hand, the present invention enables the bulk buffer unit 14 to include an interrupt input buffer (Interrupt FIFO) 141, a bulk output buffer (BulkOUTFIFO) 142, a bulk input buffer (BulkIN FIFO) 143, and the control buffer 140, wherein the interrupt input buffer 141 is coupled between the data shunt unit 15 and the first buffer (FIFOIN) 131, the bulk output buffer 142 is coupled between the data shunt unit 15 and the second buffer (FIFOOUT) 132, and the bulk input buffer (BulkINFIFO) 143 is coupled between the data shunt unit 15 and the third buffer (FIFO IN) 133.

[0151] Further, Fig.11 for Figure 7 The block diagram of the data splitting unit, the first UART controller, the second UART controller, and the third UART controller is shown. According to the design of the present invention, the data splitting unit 15 includes: a first multiplexer 151, a second multiplexer 152, a fourth buffer (FIFO TX1) 153, a fifth buffer (FIFORX1) 154, a sixth buffer (FIFOTX2) 155, a seventh buffer (FIFORX2) 156, an eighth buffer (FIFOTX3) 157, a ninth buffer (FIFO RX3) 158, a tenth buffer (FIFOTX4) 159, and an eleventh buffer (FIFORX4) 15A. Figure 7 As shown, the first multiplexer 151 and the second multiplexer 152 both have a first input terminal, a second input terminal and an output terminal, the fourth buffer (FIFOTX1) 153 is coupled between the output terminal of the first multiplexer 151 and the first UART controller 10, and the fifth buffer (FIFO RX1) 154 is coupled between the first UART controller 10 and the first input terminal of the second multiplexer 152. In addition, the sixth buffer (FIFOTX2) 155 is coupled to the second UART controller 16, and is also coupled to a first common point between a tenth buffer (FIFOTX4) 159 and the first multiplexer 151.

[0152] like Fig.11 and Figure 7As shown, the seventh buffer (FIFORX2) 156 is coupled between the second UART controller 16 and the first input terminal of the first multiplexer 151. On the other hand, the eighth buffer (FIFOTX3) 157 is coupled to the third UART controller 17, and is also coupled to a second common point between the fifth buffer (FIFORX1) 154 and the first input terminal of the second multiplexer 152. And, the ninth buffer (FIFORX3) 158 is coupled between the third UART controller 17 and the second input terminal of the second multiplexer 152. Furthermore, the tenth buffer (FIFOTX4) 159 is coupled to the second input terminal of the first multiplexer 151, and is also coupled to the bulk output buffer (BulkOUT FIFO) 142. Finally, the eleventh register (FIFORX4) 15A is coupled to the output terminal of the second multiplexer 152 and is also coupled to the bulk input register (BulkINFIFO) 143 .

[0153] Electronic engineers who are familiar with the design and manufacture of USB devices must know that a conventional USB device can implement three data transmission modes, namely control transmission, bulk transmission, and interrupt transmission. Figure 5 , Figure 7 and Fig.11 As shown, the first endpoint 121, the first register 131 and the interrupt input register 141 are used when executing interrupt transmission, the third endpoint 123, the third register 133 and the bulk input register 143 are used when executing bulk input transmission (BulkIN), and the second endpoint 122, the second register 132 and the bulk output register 142 are used when executing bulk output transmission (BulkOUT).

[0154] Thus, the above is a complete and clear description of a device that can directly realize data diversion through a UART port and a USB / UART conversion device having the device of the present invention. Furthermore, it can be known from the above that the present invention has the following advantages:

[0155] (1) The present invention provides a device that can directly realize data diversion through a UART port, which can be arranged on a circuit board in the form of an integrated circuit (IC) chip, and together with a USB electrical connector, a first UART electrical connector, a second UART electrical connector, and a third UART electrical connector arranged on the circuit board, form a USB / UART conversion device. When in use, the USB electrical connector is electrically connected to a main control electronic device, the first UART electrical connector is electrically connected to an electronic device, and the second UART electrical connector or the third UART electrical connector is electrically connected to a monitoring electronic device. In this way, the device of the present invention provides a group of virtual communication ports (VirtualCOMport) for the main control electronic device so that the main control electronic device uses the virtual communication port to transmit data with an external electronic device. At the same time, the external monitoring electronic device can also use the other two groups of physical UART communication ports (i.e., the second UART electrical connector and the third UART electrical connector) for data diversion and data monitoring.

[0156] (2) More importantly, when the device of the present invention is used, the main control electronic device and the electronic device can perform data transmission based on a first baud rate. Furthermore, through the second / third UART electrical connector, the monitoring electronic device can implement data diversion based on a second baud rate. In other words, the baud rate of the second / third UART electrical connector can be adjusted according to actual applications and is not limited to being the same as the first baud rate.

[0157] (3) In addition, when data is transmitted between the electronic device and the main control electronic device, the monitoring electronic device can use the second UART electrical connector or the third UART electrical connector to integrate additional data into the data being transmitted.

[0158] It must be emphasized that the above detailed description is a specific description of a feasible embodiment of the present invention, but the embodiment is not intended to limit the patent scope of the present invention. Any equivalent implementation or modification that does not deviate from the technical spirit of the present invention should be included in the patent scope of this case.

Claims

1. A device capable of directly implementing data diversion through a UART port, characterized in that: include: A USB data transmission unit, coupled to a USB interface, so as to communicate with a main control electronic device through the USB interface; a first UART controller, coupled to a first UART interface, so as to communicate with an electronic device through the first UART interface; a second UART controller, for coupling to a second UART interface, so as to communicate with a monitoring electronic device through the second UART interface; a third UART controller, for coupling to a third UART interface, so as to communicate with the monitoring electronic device through the third UART interface; A control endpoint coupled to the USB data transmission unit; An interface unit coupled to the USB data transmission unit; a data cache unit, coupled to the interface unit; A massive cache unit coupled to the data cache unit and having a control register coupled to the first UART controller, the second UART controller, and the third UART controller; a data distribution unit coupled to the massive cache unit, the first UART controller, the second UART controller, and the third UART controller; When the electronic device transmits a first serial data to the first UART controller through the first UART interface, the first UART controller receives the first serial data at a first baud rate, and then transmits the first serial data to the first UART controller and the huge buffer unit through the data splitting unit, so that the USB data transmission unit then receives the first serial data through the data buffer unit and the interface unit, and then converts the first serial data into a first USB data and transmits it to the main control electronic device; wherein, after the main control electronic device transmits a second USB data to the USB data transmission unit, the USB data transmission unit transmits the second USB data to the bulk buffer unit via the interface unit and the data buffer unit, so that the data distribution unit receives the second USB data through the bulk buffer unit, and then transmits the second USB data to the first UART controller and the second UART controller; After receiving the second USB data, the first UART controller converts the second USB data into second serial data, and then transmits the second serial data to the electronic device at the first baud rate.

2. The device for directly implementing data diversion through a UART port according to claim 1, characterized in that: After receiving the first serial data, the third UART controller further transmits the first serial data to the monitoring electronic device at a second baud rate, and the second baud rate may be the same as or different from the first baud rate.

3. The device for realizing data diversion directly through a UART port according to claim 2, characterized in that: When the electronic device transmits the first serial data to the main control electronic device through the device that can directly realize data diversion through the UART port, the monitoring electronic device can transmit a serial data to the data diversion unit through the third UART controller, thereby merging the serial data into the first serial data.

4. The device for directly implementing data diversion through a UART port according to claim 2, characterized in that: After receiving the second USB data, the second UART controller further transmits a serial data corresponding to the second USB data to the monitoring electronic device at a third baud rate, and the third baud rate may be the same as or different from the first baud rate.

5. The device for directly implementing data diversion through a UART port according to claim 4, characterized in that: When the main control electronic device transmits the second USB data to the electronic device through the device that can directly realize data diversion through the UART port, the monitoring electronic device can transmit a data to the data diversion unit through the second UART controller, thereby merging the data into the second USB data.

6. The device capable of directly implementing data diversion through a UART port according to claim 1, characterized in that: The device capable of directly implementing data diversion through the UART port is an electronic chip selected from the group consisting of an integrated circuit chip, a programmable logic element chip and a field programmable logic gate array chip.

7. The device capable of directly implementing data diversion through a UART port according to claim 1, characterized in that: The USB interface includes a first USB electrical connector, the first UART interface includes a first UART electrical connector, the second UART interface includes a second UART electrical connector, and the third UART interface includes a third UART electrical connector.

8. The device capable of directly implementing data diversion through a UART port according to claim 7, characterized in that: The first UART electrical connector, the second UART electrical connector and the third UART electrical connector are all electrical connectors selected from the group consisting of RS232 electrical connectors, RS422 electrical connectors and RS485 electrical connectors.

9. The device capable of directly implementing data diversion through a UART port according to claim 8, characterized in that: The USB data transfer unit comprises: A USB physical layer unit, for coupling to the USB interface; and A USB serial interface engine unit is coupled to the USB physical layer unit.

10. The device capable of directly implementing data diversion through a UART port according to claim 9, characterized in that: The interface unit includes: A first endpoint, coupling the USB serial interface engine unit and the data buffer unit; A second endpoint, coupling the USB serial interface engine unit 112 and the data buffer unit; and A third endpoint, coupling the USB serial interface engine unit and the data buffer unit; The control endpoint is coupled to the USB serial interface engine unit.

11. The device capable of directly implementing data diversion through a UART port according to claim 10, characterized in that: The data cache unit comprises: A first buffer coupled to the first endpoint and the massive cache unit; a second buffer coupled to the second end point and the bulk cache unit; and A third buffer is coupled to the third terminal and the huge cache unit.

12. The device for realizing data diversion directly through a UART port according to claim 11, characterized in that Also includes: a memory coupled to the bulk cache unit and the control register; and A GPIO unit is coupled to the bulk buffer unit and the control buffer and includes at least one GPIO pin.

13. The device capable of directly implementing data diversion through a UART port according to claim 11, characterized in that: The massive cache unit comprises: An interrupt input register coupled to the data distribution unit and the first register; a massive output buffer coupled to the data distribution unit and the second buffer; a massive input register coupled to the data distribution unit and the third register; and The control register is coupled to the first UART controller, the second UART controller and the third UART controller, and is also coupled to the control endpoint.

14. The device capable of directly implementing data diversion through a UART port according to claim 13, characterized in that: The data distribution unit includes: A first multiplexer having a first input terminal, a second input terminal and an output terminal; a second multiplexer, also having a first input terminal, a second input terminal and an output terminal; a fourth buffer coupled between the output terminal of the first multiplexer and the first UART controller; a fifth buffer coupled between the first UART controller and the first input terminal of the second multiplexer; a sixth register coupled to the second UART controller and simultaneously coupled to a first common point between a tenth register and the first multiplexer; a seventh buffer coupled between the second UART controller and the first input terminal of the first multiplexer; an eighth register coupled to the third UART controller and simultaneously coupled to a second common point between the fifth register and the first input terminal of the second multiplexer; a ninth buffer coupled between the third UART controller and the second input terminal of the second multiplexer; The tenth register is coupled to the second input terminal of the first multiplexer and is also coupled to the massive output register; and An eleventh register is coupled to the output end of the second multiplexer and is also coupled to the massive input register.

15. The device capable of directly implementing data diversion through a UART port according to claim 1, characterized in that: The main control electronic device and the monitoring electronic device are both electronic devices selected from the group consisting of a notebook computer, a desktop computer, an all-in-one computer, an industrial computer, and a cloud server.

16. A USB / UART conversion device, characterized in that: include: A circuit board, a USB electrical connector, a UART electrical connector and a device capable of directly implementing data diversion through a UART port as described in any one of claims 1 to 15, wherein the USB electrical connector, the UART electrical connector and the device capable of directly implementing data diversion through a UART port are arranged on the circuit board, and the device capable of directly implementing data diversion through a UART port couples the USB electrical connector and the UART electrical connector.

Citation Information

Patent Citations

  • Double serial port communication monitoring system and method

    CN101101567B

  • Screen oe winnowers

    US10210A