Serial port multiplexing circuit based on RS485 and RS232 and electronic equipment

By designing a serial port multiplexing circuit based on RS485 and RS232 on the main control device, and using the logic AND gate circuit and switching switch to control the enable end of the RS485 driver circuit, the problem of high pin resource occupancy of the main control device is solved and isolating and protection circuits improve signal stability, realize compatibility and resource conservation of multi-standard communication.

CN222300045UActive Publication Date: 2025-01-03ZHUHAI RUNDIAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202323444200.X
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2025-01-03
Estimated Expiration
2033-12-15

AI Technical Summary

Technical Problem

The existing serial port multiplexing circuit needs to use a separate I/O port on the main control device to control the enable end of the RS485 unit, resulting in a large amount of pin resources and cannot meet the needs of different communication standards of multiple distribution terminals.

Method used

A serial port multiplexing circuit based on RS485 and RS232 is designed. The output signal of the RS485 driver circuit is controlled through the enable end of the RS485 driver circuit, and combined with the logic AND gate circuit and switching switch, the dependence on the main control device pin is reduced. And improve signal stability and interference suppression through isolation circuits, protection circuits and power supply isolation circuits.

Benefits of technology

It realizes effective control of RS485 and RS232 signal output without occupancy of additional pin resources, reduces the use of pin resources of the master device, and improves signal stability and interference suppression capabilities through isolation and protection circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222300045U_ABST
    Figure CN222300045U_ABST
Patent Text Reader

Abstract

The utility model provides a serial port multiplexing circuit based on RS485 and RS232, and an electronic device, a serial port sending end of a main control module is connected with a receiving end of an RS232 driving circuit, a differential signal end of the RS232 driving circuit is connected with a change-over switch, and an output end of the RS232 driving circuit is connected with a first input end of a logic AND gate circuit; the serial port sending end of the main control module is connected with the logic NOT gate circuit, and the logic NOT gate circuit is connected with the enabling end of the RS485 driving circuit; the receiving end of the RS485 driving circuit is connected with the grounding end, and the differential signal end of the RS485 driving circuit is connected with the change-over switch; the differential signal end of the RS485 drive circuit is provided with a pull-up resistor and a pull-down resistor. The change-over switch is connected with the connecting terminal; the output end of the logic AND gate circuit is connected with the serial port receiving end of the master control module. According to the utility model, the use of pin resources of main control equipment can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of serial port multiplexing circuits, in particular to a serial port multiplexing circuit and electronic equipment based on RS485 and RS232. Background Art

[0002] Most existing distribution network terminals support RS232 and RS485 communication standards. Both RS232 and RS485 are serial communication standards, commonly used in data transmission and communication applications. RS232 and RS485 data are transmitted in the form of bit streams. Multiple distribution network terminals need to be connected to the master control device, which controls the distribution network terminals. Since different distribution network terminals may support different communication standards, different serial ports on the master control device need to be used. However, the serial ports on the master control device are limited, and a pair of serial ports cannot be used to meet one communication standard.

[0003] There is an existing serial communication circuit with isolation of RS485 and RS232 multiplexing, which includes an isolation unit, an RS232 unit, an RS485 unit, a signal switching unit and a communication port; the TX and RX signals of the UART unit of the CPU are isolated by the isolation unit to obtain TXO and RXI; the RS232 unit and the RS485 unit share the TXO and RXI signals, and the signals of the RS232 unit and the RS485 unit are input to the signal switching unit, and the signal switching unit is configured to output RS232 signals or RS485 signals to the communication port. However, in this serial communication circuit, the main control device needs to use an I / O port alone to control the enable end of the RS485 unit, thereby controlling the sending and receiving of the RS485 unit, and the main control device occupies a lot of pin resources. Utility Model Content

[0004] The first purpose of the utility model is to provide a serial port multiplexing circuit based on RS485 and RS232 which can reduce the pin resources occupied by the main control device.

[0005] The second purpose of the utility model is to use the electronic equipment of the serial port multiplexing circuit based on RS485 and RS232.

[0006] In order to achieve the above-mentioned first purpose, the utility model provides a serial port multiplexing circuit based on RS485 and RS232, including: an RS485 drive circuit, an RS232 drive circuit, a switch, a connection terminal, a logic AND gate circuit, and a logic NOT gate circuit; the serial port sending end of the main control module is connected to the receiving end of the RS232 drive circuit, the differential signal end of the RS232 drive circuit is connected to the switch, and the output end of the RS232 drive circuit is connected to the input first end of the logic AND gate circuit; the serial port sending end of the main control module is also connected to the logic NOT gate circuit, and the logic NOT gate circuit is connected to the RS485 drive circuit. The enable end of the RS485 drive circuit is connected; the receiving end of the RS485 drive circuit is connected to the ground end, and the differential signal end of the RS485 drive circuit is connected to the switching switch; the output end of the RS485 drive circuit is connected to the second input end of the logic AND gate circuit; the first differential signal end of the RS485 drive circuit is connected to the first end of the pull-up resistor, and the second end of the pull-up resistor is connected to the voltage output end; the second differential signal end of the RS485 drive circuit is connected to the pull-down resistor, and the second end of the pull-down resistor is connected to the ground end; the switching switch is connected to the connecting terminal; and the output end of the logic AND gate circuit is connected to the serial port receiving end of the main control module.

[0007] It can be seen from the above scheme that the ground terminal is connected through the receiving end of the RS485 drive circuit, and when the enable end of the RS485 drive circuit receives a high level, the RS485 drive circuit is in the sending enable state, and at this time, the receiving end of the RS485 drive circuit receives a low level, so the voltage of the first differential signal end of the RS485 drive circuit is less than the voltage of the second differential signal end, that is, the RS485 drive circuit outputs a logic 0. When the enable end of the RS485 drive circuit receives a low level, the RS485 drive circuit receives the enable, the differential signal end of the RS485 drive circuit receives the signal, and the differential signal end of the RS485 drive circuit is in a high-impedance state, but because the first differential signal end of the RS485 drive circuit is provided with a pull-up resistor, and the second differential signal end of the RS485 drive circuit is provided with a pull-down resistor, it is equivalent to outputting a logic 1. Therefore, the output signal of the RS485 driving circuit can be controlled by controlling the enable end of the RS485 driving circuit, and the main control device does not need to use another pin to control the enable end of the RS485 driving circuit, thereby reducing the use of the pin resources of the main control device.

[0008] In a further scheme, an isolation circuit is also included between the main control module and the RS485 drive circuit and the RS232 drive circuit. The serial port receiving end of the main control module is connected to the isolation circuit, and the output end of the logic AND gate circuit is connected to the isolation circuit; the serial port sending end of the main control module is connected to the isolation circuit, and the isolation circuit is also connected to the logic NOT gate circuit, and the isolation circuit is also connected to the logic NOT gate circuit.

[0009] It can be seen from this that the isolation circuit can isolate other interference signals from interfering with the circuit, causing the circuit to output an erroneous signal.

[0010] In a further scheme, a first protection circuit is arranged between the RS232 drive circuit and the switching switch, and the first protection circuit includes a first capacitor and a second capacitor, the first end of the first capacitor is connected to the first differential signal end of the RS232 drive circuit, the first end of the second capacitor is connected to the second differential signal end of the RS232 drive circuit, the second end of the first capacitor is connected to the ground end, and the second end of the second capacitor is connected to the ground end.

[0011] It can be seen that the first capacitor and the second capacitor can remove clutter and interference signals to ensure the clarity and stability of the signal.

[0012] In a further solution, the first protection circuit also includes a first transient suppression tube and a second transient suppression tube, the first transient suppression tube is connected to the first differential signal terminal of the RS232 drive circuit, the second transient suppression tube is connected to the second differential signal terminal of the RS232 drive circuit, the second end of the first transient suppression tube is connected to the ground terminal, and the second end of the second transient suppression tube is connected to the ground terminal.

[0013] It can be seen that the function of the two transient suppression diodes is to prevent the transient voltage from passing through the RS232 driver circuit and thus breaking down the chip of the RS232 driver circuit.

[0014] In a further scheme, the RS485 drive circuit and the switching switch are also provided with a second protection circuit, the second protection circuit includes a third transient suppression tube, a fourth transient suppression tube and a fifth transient suppression tube, the first end of the third transient suppression tube is connected to the first differential signal end of the RS485 drive circuit, and the second end of the third transient suppression tube is connected to the ground end; the first end of the fourth transient suppression tube is connected to the first differential signal end of the RS485 drive circuit, and the second end of the fourth transient suppression tube is connected to the second differential signal end of the RS485 drive circuit; the first end of the fifth transient suppression tube is connected to the second differential signal end of the RS485 drive circuit, and the second end of the fifth transient suppression tube is connected to the ground end.

[0015] It can be seen that the function of the three transient suppression diodes is to prevent the transient voltage from passing through the RS485 drive circuit and thus breaking down the chip of the RS485 drive circuit.

[0016] In a further scheme, the serial port multiplexing circuit based on RS485 and RS232 also includes a power isolation circuit, the power input terminal of the power isolation circuit is connected to the original voltage input terminal, and the ground input terminal of the power isolation circuit is connected to the original ground terminal; the voltage output terminal of the power isolation circuit is connected to the first end of the third capacitor, and the second end of the third capacitor is connected to the ground terminal.

[0017] It can be seen that the power isolation circuit prevents signal interference in the power supply.

[0018] In a further scheme, the switching switch includes a first side and a second side, the first port of the first side of the switching switch is connected to the first differential signal end of the RS485 drive circuit, the second port of the first side of the switching switch is connected to the first port of the connecting terminal, and the third port of the first side of the switching switch is connected to the first differential signal end of the RS232 drive circuit; the fourth port of the second side of the switching switch is connected to the second differential signal end of the RS485 drive circuit, the fifth port of the first side of the switching switch is connected to the second port of the connecting terminal, and the sixth port of the second side of the switching switch is connected to the second differential signal end of the RS232 drive circuit.

[0019] It can be seen that the first side of the switching switch can control the second port to be connected to the first port or the third port, and the second side of the switching switch can control the fifth port to be connected to the fourth port or the sixth port. The communication type is selected as RS485 or RS232 according to actual needs.

[0020] In order to achieve the second objective mentioned above, the electronic device provided in this embodiment is provided with the above-mentioned serial port multiplexing circuit based on RS485 and RS232. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 The utility model is a system structure block diagram of a serial port multiplexing circuit embodiment based on RS485 and RS232.

[0022] Figure 2 The utility model is a circuit diagram of an isolation circuit of a serial port multiplexing circuit embodiment based on RS485 and RS232.

[0023] Figure 3 The utility model is a circuit diagram of a power supply isolation circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0024] Figure 4 The utility model is a circuit diagram of an RS232 drive circuit, a first protection circuit, a switch, a connection terminal, a logic NOT gate circuit, an RS485 drive circuit, a second protection circuit, and a logic AND gate circuit in a serial port multiplexing circuit embodiment based on RS485 and RS232.

[0025] Figure 5 The utility model is a circuit diagram of a logic AND gate circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0026] Figure 6 The utility model is a circuit diagram of an RS232 driving circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0027] Figure 7 The utility model is a circuit diagram of an RS485 driving circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0028] Figure 8 The utility model is a circuit diagram of a first protection circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0029] Fig. 9 The utility model is a circuit diagram of a second protection circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0030] Fig.10 The utility model is a circuit diagram of a switching switch and a connecting terminal of a serial port multiplexing circuit embodiment based on RS485 and RS232.

[0031] Fig.11 The utility model is a circuit diagram of a logic NOT gate circuit of an embodiment of a serial port multiplexing circuit based on RS485 and RS232.

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments. DETAILED DESCRIPTION

[0033] The utility model is based on RS485 and RS232 serial port multiplexing circuit embodiment:

[0034] See also Figure 1 , Figure 1It is a system structure block diagram of an embodiment of the serial port multiplexing circuit based on RS485 and RS232 of the utility model. The serial port multiplexing circuit based on RS485 and RS232 of the present embodiment comprises a main control module 11, an isolation circuit 12, an RS232 driving circuit 14, a first protection circuit 16, a switching switch 18, a connecting terminal 19, a logic NOT gate circuit 21, an RS485 driving circuit 15, a second protection circuit 17, a logic AND gate circuit 13 and a power supply isolation circuit 20. The main control module 11 is connected to the serial port multiplexing circuit based on RS485 and RS232 of the present embodiment through a pair of UART transceiver serial ports, the UART transceiver serial port of the main control module 11 is connected to the isolation circuit 12, the isolation circuit 12 is connected to the RS232 driving circuit 14 and the logic NOT gate circuit 21, the RS232 driving circuit 14 is connected to the first protection circuit 16, the first protection circuit 16 is connected to the switching switch 18, and the switching switch 18 is connected to the connecting terminal 19. The logic NOT gate circuit 21 is connected to the RS485 drive circuit 15, the RS485 drive circuit 15 is connected to the second protection circuit 17, and the second protection circuit 17 is connected to the switch 18. The RS485 drive circuit 15 is connected to the logic AND gate circuit 13, the RS232 drive circuit 14 is connected to the logic AND gate circuit 13, and the logic AND gate circuit is connected to the isolation circuit 12. The power isolation circuit 20 supplies power to the isolation circuit 12, the RS232 drive circuit 14, the first protection circuit 16, the switch 18, the connection terminal 19, the logic NOT gate circuit 21, the RS485 drive circuit 15, the second protection circuit 16 and the logic AND gate circuit 13. The switch 18 can select to switch to connect the RS485 drive circuit 15 or the RS232 drive circuit 14 to meet the wiring requirements.

[0035] See also Figure 2 , Figure 3 and Figure 4 The serial port transmitting end UART1_TX of the main control module 11 is connected to the receiving pin INB of the isolation chip U2 in the isolation circuit 12, and the signal of the receiving pin INB of the isolation chip U2 is output from the output pin OUTB. The output pin OUTB of the isolation chip U2 is connected to the receiving pin T2IN of the RS232 driver chip U4 of the RS232 driver circuit 14. The differential signal end of the RS485 driver chip U7 includes the first differential signal end T2OUT and the second differential signal end R2IN of the RS232 driver chip U4, which are used to output the differential signal. The output end R2OUT of the RS232 driver chip U4 is connected to the first input end of the logic AND gate chip U3 in the logic AND gate circuit 13, and the first input end of the logic AND gate chip U3 is the first pin of the logic AND gate chip U3.

[0036] The output pin OUTB of the isolation chip U2 is also connected to the output end of the logic NOT gate chip U6 of the logic NOT gate circuit 21, the output end of the logic NOT gate chip U6 is the fourth pin, and the output end of the logic NOT gate chip U6 is connected to the enable end of the RS485 driver chip U7 of the RS485 driver circuit 15. The RS485 driver chip U7 is connected to TE, the receiving terminal TD of the RS485 driver chip U7 is connected to the ground terminal, the output terminal RX of the RS485 driver chip U7 is connected to the second input terminal of the logic AND gate chip U3, and the second input terminal of the logic AND gate chip U3 is the second pin of the logic AND gate chip U3. The differential signal terminal of the RS485 driver chip U7 includes the first differential signal terminal A and the second differential signal terminal B of the RS485 driver chip U7, and outputs a differential signal.

[0037] The output end of the logic AND gate chip U3 is the 4th pin of the logic AND gate chip U3. The output end of the logic AND gate chip U3 is connected to the receiving pin INA of the isolation chip U2. The signal of the receiving pin INA of the isolation chip U2 is output from the output pin OUTA of the isolation chip U2. The serial port receiving end UART1_RX of the main control module receives the signal output by the output pin OUTA of the isolation chip U2.

[0038] The first differential signal terminal A of the RS485 driver chip U7 is connected to the first end of the pull-up resistor R71, and the second end of the pull-up resistor R71 is connected to the voltage output terminal; the second differential signal terminal B of the RS485 driver circuit is connected to the pull-down resistor R73, and the second end of the pull-down resistor R73 is connected to the ground terminal. A resistor R72 is also connected between the first differential signal terminal A and the second differential signal terminal B of the RS485 driver chip U7, and the resistor R72 can prevent interference from common mode noise.

[0039] The receiving terminal TD of the RS485 driver chip U7 is connected to the ground terminal, and when the enable terminal of the RS485 driver circuit receives a high level, the RS485 driver circuit is in the sending enable state, and at this time, the receiving terminal TD of the RS485 driver chip U7 receives a low level, so at this time, the RS485 driver chip U7 outputs a signal so that the voltage of the first differential signal terminal of the RS485 driver chip U7 is less than the voltage of the second differential signal terminal, that is, the RS485 driver circuit 15 outputs a logic 0. At this time, the output terminal RX of the RS485 driver chip U7 is in a high impedance state.

[0040] When the enable terminal of RS485 driver chip U7 receives a low level, RS485 driver circuit receives enable, the differential signal terminal of RS485 driver circuit is in a receiving signal state, and the differential signal terminal of RS485 driver circuit is in a high impedance state. However, since the first differential signal terminal of RS485 driver chip U7 is provided with a pull-up resistor, and the second differential signal terminal of RS485 driver chip U7 is provided with a pull-down resistor R73, it is equivalent to output logic 1, and the output terminal RX of RS485 driver chip U7 is a high level at this time. Therefore, by controlling the enable terminal of RS485 driver circuit, the signal of the output of RS485 driver circuit can be controlled, and the main control device does not need to use another pin to control the enable terminal of RS485 driver circuit, thereby reducing the use of the pin resources of main control device 11.

[0041] The first differential signal terminal T2OUT and the second differential signal terminal R2IN of the RS232 driver chip U4 are connected to the switch X1, the first differential signal terminal A and the second differential signal terminal B of the RS485 driver chip U7 are connected to the switch X1, and the switch X1 is connected to the connection terminal P1.

[0042] The first port 1 on the first side of the switch X1 is connected to the first differential signal terminal A of the RS485 driver chip U7, the second port on the first side of the switch X1 is connected to the first port of the connection terminal P1, and the third port on the first side of the switch X1 is connected to the first differential signal terminal T2OUT of the RS232 driver chip U4;

[0043] The fourth port on the second side of the switching switch X1 is connected to the second differential signal terminal B of the RS485 driving circuit, the fifth port on the first side of the switching switch X1 is connected to the second port of the connecting terminal, and the sixth port on the second side of the switching switch X1 is connected to the second differential signal terminal R2IN of the RS232 driving chip U7.

[0044] The second port on the first side of the switch X1 can be controlled to connect to the first port or the third port by the switch, and the fifth port on the second side of the switch X1 can be controlled to connect to the fourth port or the sixth port, and the communication type can be selected as RS485 or RS232 according to actual needs. The switch X1 can be any switch such as a sliding switch, a jumper cap or a relay.

[0045] A first protection circuit 16 is provided between the RS232 driving circuit 14 and the switching switch X1. The first protection circuit 16 includes a first capacitor C52 and a second capacitor C51. The first end of the first capacitor C52 is connected to the first differential signal terminal T2OUT of the RS232 driving chip U4, the first end of the second capacitor C51 is connected to the second differential signal terminal R2IN of the RS232 driving chip U4, the second end of the first capacitor C52 is connected to the ground terminal, and the second end of the second capacitor C51 is connected to the ground terminal.

[0046] The first protection circuit 16 also includes a first transient suppression tube TVS51 and a second transient suppression tube TVS52. The first transient suppression tube TVS51 is connected to the first differential signal terminal T2OUT of the RS232 driver chip U4, and the second transient suppression tube TVS52 is connected to the second differential signal terminal R2IN of the RS232 driver chip U4. The second end of the first transient suppression tube TVS51 is connected to the ground terminal, and the second end of the second transient suppression tube is connected to the ground terminal. The first transient suppression tube TVS51 and the second transient suppression tube TVS52 prevent transient voltage from breaking through the RS232 driver chip U4.

[0047] The RS485 drive circuit 15 and the switch X1 are also provided with a second protection circuit 17, which includes a third transient suppression tube TVS81, a fourth transient suppression tube TVS82 and a fifth transient suppression tube TVS83. The first end of the third transient suppression tube TVS81 is connected to the first differential signal terminal A of the RS485 drive chip U7, and the second end of the third transient suppression tube TVS81 is connected to the ground terminal; the first end of the fourth transient suppression tube TVS82 is connected to the first differential signal terminal A of the RS485 drive chip U7, and the second end of the fourth transient suppression tube TVS82 is connected to the second differential signal terminal B of the RS485 drive chip U7; the first end of the fifth transient suppression tube TVS83 is connected to the second differential signal terminal B of the RS485 drive chip U7, and the second end of the fifth transient suppression tube TVS83 is connected to the ground terminal. The third transient suppression tube TVS81, the fourth transient suppression tube TVS82 and the fifth transient suppression tube TVS83 can prevent transient voltage from breaking through the RS485 drive chip U7.

[0048] The power input terminal of the power isolation chip U1 of the power isolation circuit 20 is the first pin, and the power input terminal of the power isolation chip U1 is connected to the original voltage input terminal. The ground input terminal of the power isolation chip U1 is the second pin, and the ground input terminal of the power isolation chip U1 is connected to the original ground terminal. The voltage output terminal in this embodiment is the sixth pin of the power isolation chip U1, and the ground terminal is the fourth pin of the power isolation chip U1. The voltage output terminal of the power isolation chip U1 is connected to the first end of the third capacitor C13, and the second end of the third capacitor C13 is connected to the ground terminal.

[0049] By switching the switch X1, the signal of the RS485 drive circuit 15 or the RS232 drive circuit 14 can be arbitrarily selected according to the demand, and the RS485 drive circuit 15 or the RS232 drive circuit 14 does not interfere with each other. The serial port multiplexing circuit based on RS485 and RS232 of this embodiment only uses a pair of UART transceiver serial ports of the main control module 11, occupying less resources of the main control module.

[0050] Electronic device embodiment:

[0051] The electronic device applies the serial port multiplexing circuit based on RS485 and RS232 described in the above embodiment.

[0052] The above are only preferred embodiments of the present invention, but the design concept of the present invention is not limited thereto. Without departing from the concept of the present invention, more other equivalent embodiments may be included. It is possible for those skilled in the art to make various obvious changes, readjustments and substitutions without departing from the protection scope of the present invention.

Claims

1. A serial port multiplexing circuit based on RS485 and RS232, comprising: RS485 drive circuit, RS232 drive circuit, switch, connection terminal, logic AND gate circuit; The serial port sending end of the main control module is connected to the receiving end of the RS232 drive circuit, the differential signal end of the RS232 drive circuit is connected to the switch, and the output end of the RS232 drive circuit is connected to the input first end of the logic AND gate circuit; Features: The serial port multiplexing circuit is also provided with a logic NOT gate circuit, the serial port transmitting end of the main control module is also connected to the logic NOT gate circuit, and the logic NOT gate circuit is connected to the enabling end of the RS485 driving circuit; the receiving end of the RS485 driving circuit is connected to the ground end, and the differential signal end of the RS485 driving circuit is connected to the switching switch; the output end of the RS485 driving circuit is connected to the second input end of the logic AND gate circuit; The first differential signal terminal of the RS485 driving circuit is connected to the first end of the pull-up resistor, and the second end of the pull-up resistor is connected to the voltage output terminal; the second differential signal terminal of the RS485 driving circuit is connected to the pull-down resistor, and the second end of the pull-down resistor is connected to the ground terminal; The switching switch is connected to the connecting terminal; The output end of the logic AND gate circuit is connected to the serial port receiving end of the main control module.

2. The serial port multiplexing circuit based on RS485 and RS232 according to claim 1, characterized in that: An isolation circuit is also connected between the main control module and the RS485 drive circuit and the RS232 drive circuit, the serial port receiving end of the main control module is connected to the isolation circuit, and the output end of the logic AND gate circuit is connected to the isolation circuit; The serial port sending end of the main control module is connected to the isolation circuit, the isolation circuit is also connected to the logic NOT gate circuit, and the isolation circuit is also connected to the logic NOT gate circuit.

3. The serial port multiplexing circuit based on RS485 and RS232 according to claim 1 or 2, characterized in that: A first protection circuit is arranged between the RS232 drive circuit and the switching switch, and the first protection circuit includes a first capacitor and a second capacitor, a first end of the first capacitor is connected to the first differential signal end of the RS232 drive circuit, a first end of the second capacitor is connected to the second differential signal end of the RS232 drive circuit, a second end of the first capacitor is connected to the ground end, and a second end of the second capacitor is connected to the ground end.

4. The serial port multiplexing circuit based on RS485 and RS232 according to claim 3, characterized in that: The first protection circuit also includes a first transient suppression tube and a second transient suppression tube, the first transient suppression tube is connected to the first differential signal terminal of the RS232 drive circuit, the second transient suppression tube is connected to the second differential signal terminal of the RS232 drive circuit, the second end of the first transient suppression tube is connected to the ground terminal, and the second end of the second transient suppression tube is connected to the ground terminal.

5. The serial port multiplexing circuit based on RS485 and RS232 according to claim 1 or 2, characterized in that: The RS485 drive circuit and the switch are further provided with a second protection circuit, the second protection circuit comprising a third transient suppression tube, a fourth transient suppression tube and a fifth transient suppression tube, the first end of the third transient suppression tube is connected to the first differential signal end of the RS485 drive circuit, and the second end of the third transient suppression tube is connected to the ground end; The first end of the fourth transient suppression tube is connected to the first differential signal end of the RS485 drive circuit, and the second end of the fourth transient suppression tube is connected to the second differential signal end of the RS485 drive circuit; The first end of the fifth transient suppression tube is connected to the second differential signal end of the RS485 driving circuit, and the second end of the fifth transient suppression tube is connected to the ground end.

6. The serial port multiplexing circuit based on RS485 and RS232 according to claim 5, characterized in that: The serial port multiplexing circuit based on RS485 and RS232 also includes a power isolation circuit, wherein the power input terminal of the power isolation circuit is connected to the original voltage input terminal, and the ground input terminal of the power isolation circuit is connected to the original ground terminal; The voltage output terminal of the power isolation circuit is connected to the first terminal of the third capacitor, and the second terminal of the third capacitor is connected to the ground terminal.

7. The serial port multiplexing circuit based on RS485 and RS232 according to claim 6, characterized in that: The first port on the first side of the switching switch is connected to the first differential signal terminal of the RS485 driving circuit, the second port on the first side of the switching switch is connected to the first port of the connecting terminal, and the third port on the first side of the switching switch is connected to the first differential signal terminal of the RS232 driving circuit; The fourth port on the second side of the switching switch is connected to the second differential signal end of the RS485 driving circuit, the fifth port on the first side of the switching switch is connected to the second port of the connecting terminal, and the sixth port on the second side of the switching switch is connected to the second differential signal end of the RS232 driving circuit.

8. An electronic device, characterized in that A serial port multiplexing circuit based on RS485 and RS232 as described in any one of claims 1 to 7 is provided.

Citation Information

Cited By

  • Communication module capable of freely switching between RS232 and RS485

    CN121210369A