A communication serial port conversion circuit responding to a switching command

CN119782234APending Publication Date: 2025-04-08GUIZHOU AEROSPACE NANHAI SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411645536.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-08

Smart Images

  • Figure CN119782234A_ABST
    Figure CN119782234A_ABST
Patent Text Reader

Abstract

The present invention provides a communication serial port conversion circuit that responds to a switching command, including an MCU processor, wherein the MCU processor provides at least three groups of serial port communication interfaces, one group of serial port communication interfaces is defined as a central office interface, and the other two groups of serial port communication interfaces are defined as user-end interfaces, and the input and output ends of the central office interface are set to match the data channels of the output and input ends of the user-end interface. The present invention can automatically select different signal input sources according to the needs of the back-end device and complete the interface adaptation of the output end signal to the back-end device, split the return signal in consideration of the needs of the front-end device, and return two serial signals to the front-end device at the same time; the circuit principle is simple, the degree of intelligence is high, the debugging is convenient, the design and production costs are saved, and it can be expanded in time. The scale of the communication serial port conversion circuit that responds to the switching command has been sufficiently simplified, and it has a strong reference significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a communication serial port conversion circuit responding to a switching command, belonging to the category. Background Art

[0002] With the development of the times, the demand for functional diversity of general electronic products has become increasingly strong, making the components of communication system products increasingly complex, and the signal interconnection between functional units has become increasingly frequent. However, due to the limitations of their own designs, different integrated devices have different transmission interfaces, rates, and bit error rate indicators for interactive signals. When the functions of multiple types of equipment are integrated into a complex product, more interface conversion and signal rate matching problems will inevitably arise. In the traditional mode, this problem can be solved by combining a certain number of single-mode communication serial port conversion circuits, but it is inevitable that the design redundancy of communication system products is too high and the reliability is reduced.

[0003] Conventional mode communication serial port conversion circuits generally only have a single working mode of converting a type A serial interface into a type B serial interface (converting a type A serial interface into a type C serial interface, or converting a type B serial interface into a type C serial interface), and have poor interface adaptability to circuit peripheral devices and low working integration.

[0004] Therefore, the serial communication conversion circuits traditionally used in the design of communication system products have a single interface and a fixed conversion mode, which is not suitable for the new design mode of current communication system products with changing functional requirements and flexible development process. When there are diversified requirements for the interfaces of complex functional products, the number of traditional serial communication conversion circuits selected is generally large, which can easily cause circuit stacking redundancy, resulting in poor product test accessibility, increasing costs while reducing product reliability, and in severe cases may reduce the service life of the overall circuit. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a communication serial port conversion circuit that responds to a switching command. The communication serial port conversion circuit that responds to a switching command can automatically select different signal input sources according to the requirements of the back-end device and complete the output signal adaptation to the interface of the back-end device, while taking into account the requirements of the front-end device to split the return signal. At the same time, returning two serial signals to the front-end device can improve the integration and robustness of the communication system products, improve the adaptability of the communication system products to complex integration environments, can effectively shorten the development cycle, and has good economic efficiency.

[0006] The present invention is achieved through the following technical solutions.

[0007] The present invention provides a communication serial port conversion circuit that responds to a switching command, comprising an MCU processor, wherein the MCU processor provides at least three groups of serial port communication interfaces, one group of serial port communication interfaces is defined as a local-end interface, and the other two groups of serial port communication interfaces are defined as user-end interfaces, and the input and output ends of the local-end interface are set to match the data channels of the output and input ends of the user-end interface; the MCU processor also has at least one GPIO pin access, and the two groups of serial port communication interfaces in the user-end interface are switched to be activated in a two-to-one manner through the GPIO pin level control, and the communication protocols of the two groups of serial port communication interfaces are different.

[0008] The two groups of serial communication interfaces in the user-end interface are externally connected to the same serial communication connection terminal.

[0009] The GPIO pin is connected to a 27V level, and the MCU processor is connected to a 27V power supply to work.

[0010] The communication protocol of the central office interface is RS422, and the communication protocols of the user end interface are RS422 and RS232 respectively.

[0011] The MCU processor also provides two sets of serial communication interfaces for backup, the input ends and output ends of the two sets of serial communication interfaces correspond to each other and independently set data channels, and the communication protocols of the two sets of serial communication interfaces are different.

[0012] The communication protocols of the two sets of serial communication interfaces are RS422 and RS232 respectively.

[0013] The GPIO pins are accessed through an isolation circuit.

[0014] The three groups of serial communication interfaces are all externally isolated and send and receive signals through isolation circuits.

[0015] The serial communication interfaces are all implemented using on-chip UART functions.

[0016] The central office interface is used to connect to a multi-mode radio station, and the user end interface is used to connect to an integrated display and control machine and / or a debugging host.

[0017] The beneficial effects of the present invention are: it can automatically select different signal input sources according to the needs of the back-end device and complete the output signal adaptation to the interface of the back-end device, split the return signal taking into account the needs of the front-end device, and return two serial signals to the front-end device at the same time; the circuit principle is simple, the degree of intelligence is high, the debugging is convenient, the design and production costs are saved, it can be expanded in time, and the scale of the communication serial port conversion circuit that responds to the switching command has been sufficiently simplified, which has a strong reference significance. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a connection diagram of at least one embodiment of the present invention;

[0019] Figure 2 yes Figure 1 Schematic diagram of the working principle. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is further described below, but the scope of protection claimed is not limited to the description.

[0021] A first embodiment of the present invention relates to Figure 1 A communication serial port conversion circuit that responds to a switching command is shown, including an MCU processor, wherein the MCU processor provides at least three groups of serial port communication interfaces, one group of serial port communication interfaces is defined as a local-end interface, and the other two groups of serial port communication interfaces are defined as user-end interfaces, and the input and output ends of the local-end interface are set to match the data channels of the output and input ends of the user-end interface; the MCU processor also has at least one GPIO pin access, and the two groups of serial port communication interfaces in the user-end interface are switched to be activated in a two-choice manner through the GPIO pin level control, and the communication protocols of the two groups of serial port communication interfaces are different.

[0022] As can be seen from the attached figure, the external communication interface is 3-way RS422 interface (respectively RS422_1, RS422_2, RS422_3), 2-way RS232 interface (respectively RS232_1 and RS232_2), mainly realizing the following functions:

[0023] a) Receive RS232_1 signal and RS422_2 signal at the same time, and convert RS232_1 signal to RS422 signal. By default, the RS422 signal converted from RS232_1 is sent to the outside through RS422_1. When the external 27V switching instruction is recognized, the received RS422_2 signal is sent to the outside. The received RS422_1 signal is converted to RS232 signal and sent to the outside through RS232_1, and the RS422_1 signal is sent to the outside through the RS422_2 interface;

[0024] b) Receive RS232_2 signal, convert it into RS422 signal and send it out through RS422_3; at the same time, receive RS422_3 signal, convert it into RS232 signal and send it out through RS232_2.

[0025] The second embodiment of the present invention is substantially equivalent to the first embodiment, mainly in that the technical means are further optimized, and the two sets of serial communication interfaces in the user-side interface are externally connected to the same serial communication connection terminal.

[0026] Furthermore, the GPIO pins are connected via an isolation circuit.

[0027] Furthermore, the GPIO pin is connected to a 27V level, and the MCU processor is connected to a 27V power supply to work.

[0028] Therefore, a DC27V power supply is adopted, and the external power supply signal enters the circuit through the power interface (composite interface) and the power module. The power distribution of each branch of the circuit is realized through power switching and control. After the MCU processor (module) is powered on normally, the GPIO detects the external jump excitation signal and jumps the serial signal entering and leaving the conversion circuit according to the predetermined operation mechanism under the control of the MCU resident program. The IO isolation circuit receives the serial signal after the jump and implements signal interference isolation, and then transmits the isolated serial signal to the serial port transceiver module corresponding to the conversion circuit for external signal transmission.

[0029] Furthermore, the communication protocol of the central office interface is RS422, and the communication protocols of the user end interface are RS422 and RS232 respectively.

[0030] Furthermore, the three sets of serial communication interfaces are all externally isolated and send and receive signals through the isolation circuit.

[0031] Furthermore, the serial communication interfaces are all implemented using on-chip UART functions.

[0032] Furthermore, the local interface is used to connect to the multi-mode radio, and the user interface is used to connect to the integrated display and control machine and / or the debugging host. Therefore, this application is mainly used for the interconnection of communication system products. In this scenario, the front-end device integrated display and control machine and the debugging notebook (i.e., a type of debugging host) need to be connected to the back-end device multi-mode radio (where the external interface of the integrated display and control machine and the multi-mode radio is RS422, and the external interface of the debugging notebook is RS232): the multi-mode radio requires the integrated display and control machine or the debugging notebook (either one) to report information messages, and after receiving and processing the relevant message information, it is sent to the integrated display and control machine and the debugging notebook at the same time. Of course, the debugging host can use a debugging notebook, a debugging desk or a debugging server. In some special cases, a cloud platform can also be used to convert the connection through a communication machine.

[0033] The third embodiment of the present invention is roughly equivalent to the first embodiment, mainly in that the technical means are further optimized. The MCU processor also provides two sets of serial communication interfaces for backup. The input ends and output ends of the two sets of serial communication interfaces correspond to each other and independently set data channels. The communication protocols of the two sets of serial communication interfaces are different.

[0034] Furthermore, the communication protocols of the two sets of serial communication interfaces are RS422 and RS232 respectively.

[0035] Based on the above, this application generally has two working modes, and the specific working methods are as follows:

[0036] a) Working mode:

[0037] 1) The conversion circuit simultaneously receives the RS232_1TX signal and RS422_2TX+ / - signal of the front-end device;

[0038] 2) When the conversion circuit MCU recognizes that there is no external 27V switching instruction, the conversion circuit converts the received front-end device RS232_1TX signal into RS422 TX+ / - signal by default and sends it to the outside via the conversion circuit RS422_1TX output line (to achieve RS232 signal to RS422 conversion);

[0039] 3) When the MCU of the switching circuit recognizes that there is an external 27V switching instruction, the conversion circuit will directly send the RS422_2TX+ / - signal received from the front-end device to the outside through the RS422_1TX line of the conversion circuit (direct transmission without conversion);

[0040] 4) The back-end device receives the RS422_1TX+ / - signal output by the conversion circuit RS422_1TX line, and after processing, transmits it back through the conversion circuit RS422_1RX line, and splits it into RS232_1TX signal and RS422_1TX+ / - signal inside the conversion circuit, and transmits them back to the front-end device through the RS422_2TX and RS232_1TX lines of the conversion circuit respectively;

[0041] 5) The front-end device receives the returned RS422_2 signal and RS232_1 signal respectively, and after processing, loops back to step 1) of the a) working mode.

[0042] b) Debug mode:

[0043] 1) The conversion circuit receives the RS232_2TX signal of the front-end debugging equipment:

[0044] 2) The conversion circuit converts the RS232_2TX signal received from the front-end debugging device into an RS422 signal and sends it to the outside through RS422_3.

[0045] 3) The back-end debugging device will receive the RS422_3 signal, process it and transmit it back through the conversion circuit RS422_3RX line;

[0046] 4) The front-end debugging device receives the RS422_2 signal transmitted back, processes it, and then loops back to step 1) of b) debugging mode.

[0047] In summary, this application has the following advantages:

[0048] 1. The MCU processor used in the circuit has rich processing interfaces (supports UART controller, I2C interface, integrates 1 SDIO interface, multiple CAN2.0B interfaces (supports OTG function)), Ethernet MAC, and has rich GPIO);

[0049] 2. The circuit serial port baud rate is adjustable: the maximum baud rate of RS232 is 115200bps, and the maximum baud rate of RS422 is 460800bps, which can be set through the debugging interface;

[0050] 3. The circuit power supply range is wide (DC18V~DC32V), and the circuit power consumption is low (≤5W);

[0051] 4. The circuit is a programmable hardware circuit with reliable conversion, stable operation and good environmental adaptability;

[0052] 5. The circuit design takes into account the ideas of modularization and generalization, and the circuit scale is controllable and has good redundancy (expandable and simple).

Claims

1. A communication serial port conversion circuit that responds to a switching command, characterized in that: The invention comprises an MCU processor, wherein the MCU processor provides at least three groups of serial communication interfaces, one group of serial communication interfaces is defined as a local interface, and the other two groups of serial communication interfaces are defined as user-end interfaces, and the input and output ends of the local interface are set to match the data channels of the output and input ends of the user-end interface; the MCU processor also has at least one GPIO pin access, and the two groups of serial communication interfaces in the user-end interface are switched to be activated in a two-choice manner through the GPIO pin level control, and the communication protocols of the two groups of serial communication interfaces are different.

2. The communication serial port conversion circuit that responds to the switching command as claimed in claim 1, characterized in that: The two groups of serial communication interfaces in the user-end interface are externally connected to the same serial communication connection terminal.

3. The communication serial port conversion circuit that responds to the switching command as claimed in claim 1, characterized in that: The GPIO pin is connected to a 27V level, and the MCU processor is connected to a 27V power supply to work.

4. The communication serial port conversion circuit that responds to the switching command as claimed in claim 1, characterized in that: The communication protocol of the central office interface is RS422, and the communication protocols of the user end interface are RS422 and RS232 respectively.

5. The communication serial port conversion circuit that responds to a switching command as claimed in claim 1, characterized in that: The MCU processor also provides two sets of serial communication interfaces for backup, the input ends and output ends of the two sets of serial communication interfaces correspond to each other and independently set data channels, and the communication protocols of the two sets of serial communication interfaces are different.

6. The communication serial port conversion circuit that responds to a switching command as claimed in claim 5, characterized in that: The communication protocols of the two sets of serial communication interfaces are RS422 and RS232 respectively.

7. The communication serial port conversion circuit that responds to a switching command as claimed in claim 1, characterized in that: The GPIO pins are accessed through an isolation circuit.

8. The communication serial port conversion circuit that responds to a switching command as claimed in claim 1, characterized in that: The three groups of serial communication interfaces are all externally isolated and send and receive signals through isolation circuits.

9. The communication serial port conversion circuit that responds to a switching command as claimed in claim 1, characterized in that: The serial communication interfaces are all implemented using on-chip UART functions.

10. The communication serial port conversion circuit that responds to a switching command as claimed in claim 1, characterized in that: The central office interface is used to connect to a multi-mode radio station, and the user end interface is used to connect to an integrated display and control machine and / or a debugging host.