Common interface circuit compatible with RS232 and RS485 and compatible equipment
By designing a common interface circuit compatible with RS232 and RS485, and utilizing a signal detection circuit and a switching controller to achieve compatibility between RS232 and RS485, the problem of high hardware cost was solved, and high compatibility and low cost of the equipment were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2025-05-27
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, RS232 and RS485 communication interfaces are not directly compatible, resulting in high hardware costs.
Design a common interface circuit compatible with RS232 and RS485, including a signal detection circuit and a switching controller. The signal detection circuit determines the serial port signal type and generates a classification detection signal to control the target switching link in the switching controller, thereby achieving compatibility between RS232 and RS485.
Only one serial data bus is needed to be compatible with RS232 and RS485, reducing the number of external interfaces, lowering hardware costs and improving device compatibility.
Smart Images

Figure CN224248121U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of power electronics technology, and in particular to a common interface circuit and compatible device that is compatible with RS232 and RS485. Background Technology
[0002] RS232 and RS485 are two commonly used communication interfaces widely applied in various hardware designs. RS232 signals are single-ended signals, with common pins including TXD (Transmit Data), RXD (Received Data), and GND (Ground), with signal voltages between 3V and 15V. RS485 signals use differential signal communication, representing data through the voltage difference between the P (positive) and N (negative) signal lines, with the voltage difference between 1.5V and 5V. Due to these differences in signal transmission methods and electrical parameters, the RS232 and RS485 protocols are not directly compatible.
[0003] Currently, the operating mode of the circuit is typically switched using an electrical specification conversion chip, or by connecting two external interfaces—one for RS232 and the other for RS485—and switching interfaces based on which external signal is connected. However, using an electrical specification conversion chip or two external interfaces increases hardware costs. Utility Model Content
[0004] This invention provides a common interface circuit and compatible device that are compatible with RS232 and RS485, in order to solve the problem of high hardware cost in the prior art that is compatible with RS232 and RS485.
[0005] This utility model provides a common interface circuit compatible with RS232 and RS485, including: a signal detection circuit and a switching controller, wherein:
[0006] The input terminal of the signal detection circuit is connected to an external device, and the output terminal of the signal detection circuit is connected to the selection pin of the switching controller.
[0007] The signal detection circuit is used to receive the serial port signal input from the external device and generate a classification detection signal based on the serial port signal. The level state of the classification detection signal is used to characterize whether the serial port signal is an RS232 signal or an RS485 signal, and the level state of the classification detection signal is used to determine the target switching link in the switching controller.
[0008] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the signal detection circuit includes a filter circuit, a voltage divider circuit, and a voltage comparator, wherein:
[0009] The input terminal of the filter circuit is connected to the external device, and the output terminal of the filter circuit is connected to the inverting input terminal of the voltage comparator. The filter circuit is used to filter the serial port signal input from the external device to obtain a serial port filtered signal.
[0010] The first terminal of the voltage divider circuit is connected to the negative terminal of the power supply, the second terminal of the voltage divider circuit is grounded, the third terminal of the voltage divider circuit is connected to the non-inverting input terminal of the voltage comparator, and the third terminal of the voltage divider circuit is used to generate a reference signal.
[0011] The output of the voltage comparator is connected to the selection pin of the switching controller. The voltage comparator is used to generate the classification detection signal based on the serial port filter signal and the reference signal, and output the classification detection signal to the selection pin.
[0012] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the filter circuit includes diodes and a filter sub-circuit, wherein:
[0013] The negative terminal of the diode serves as the input terminal of the filter circuit, the positive terminal of the diode is connected to the first terminal of the filter sub-circuit, and the second terminal of the filter sub-circuit serves as the output terminal of the filter circuit.
[0014] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the filter sub-circuit includes a second resistor, a fourth resistor, and a first capacitor, wherein:
[0015] The first end of the fourth resistor serves as the first end of the filter sub-circuit. The second end of the fourth resistor is connected to the first end of the second resistor and the first end of the first capacitor, and also serves as the second end of the filter sub-circuit. The second end of the second resistor and the second end of the first capacitor are both grounded.
[0016] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the voltage divider circuit includes a first resistor and a third resistor, wherein:
[0017] The first resistor and the third resistor are connected in series, and the first end of the series connection serves as the first end of the voltage divider circuit, the second end of the series connection serves as the second end of the voltage divider circuit, and the connection point serves as the third end of the voltage divider circuit.
[0018] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the switching controller includes a first analog switch group and a second analog switch group, wherein:
[0019] The first selection pin in the first analog switch group and the second selection pin in the second analog switch group are both connected to the output terminal of the signal detection circuit, and the first switch port in the first analog switch group and the second switch port in the second analog switch group are both connected to the external device.
[0020] The level of the classification detection signal is used to control the switching positions of the first switch port and the second switch port to determine the target switch link.
[0021] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the first analog switch group further includes a first common port and a second common port. The first switch port is used to determine a first target common port among the first common port and the second common port based on the classification detection signal.
[0022] The second analog switch group further includes a third common port and a fourth common port, and the second switch port is used to determine a second target common port among the third common port and the fourth common port based on the classification detection signal;
[0023] The first target common port and the second target common port constitute the target switch link.
[0024] According to the shared interface circuit compatible with RS232 and RS485 provided by this utility model, the signal lines connected to the first target common port and the second target common port are of the same type.
[0025] According to the common interface circuit compatible with RS232 and RS485 provided by this utility model, the positive power supply terminal of the voltage comparator is connected to the positive power supply terminal, and the negative power supply terminal of the voltage comparator is grounded.
[0026] This utility model also provides a compatible device, including a common interface circuit compatible with RS232 and RS485 as described in any of the above claims.
[0027] This invention provides a shared interface circuit and compatible device for RS232 and RS485. It receives serial port signals from external devices via a signal detection circuit and generates a classification detection signal to determine whether the signal type is RS232 or RS485. This classification detection signal is then transmitted to the switching control. The level of the classification detection signal determines the target switching link for communication in the switching controller. This invention uses only one serial data bus to support both RS232 and RS485 serial signals, reducing the number of external interfaces while increasing device compatibility and thus lowering hardware costs. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in this utility model or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this utility model. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram of the structure of a shared interface circuit compatible with RS232 and RS485 provided in an embodiment of this utility model.
[0030] Figure 2 This is a schematic diagram of the signal detection circuit provided in an embodiment of the present invention.
[0031] Figure 3 This is a schematic diagram of the filter circuit provided in an embodiment of the present invention.
[0032] Figure 4 This is a schematic diagram of the voltage divider circuit provided in an embodiment of the present invention.
[0033] Figure 5 This is a schematic diagram of the switching controller provided in an embodiment of the present invention.
[0034] Figure label:
[0035] 110: Signal detection circuit; 111: Filtering circuit; 112: Voltage divider circuit; 113: Filter sub-circuit; 120: Switching controller; 121: First analog switch group; 122: Second analog switch group. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this utility model clearer, the technical solutions of this utility model will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this utility model, not all embodiments. Based on the embodiments of this utility model, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this utility model.
[0037] To address the issue of high hardware costs in existing technologies that are compatible with both RS232 and RS485, this invention provides a common interface circuit compatible with both RS232 and RS485. Figure 1 This is a schematic diagram of the structure of a common interface circuit compatible with RS232 and RS485 provided in an embodiment of this utility model, as shown below. Figure 1 As shown, the circuit includes a signal detection circuit 110 and a switching controller 120.
[0038] The input terminal of the signal detection circuit 110 is connected to an external device, and the output terminal of the signal detection circuit 110 is connected to the selection pin of the switching controller 120.
[0039] The signal detection circuit 110 is used to receive the serial port signal IN input by the external device, and generate a classification detection signal SW based on the serial port signal IN. The level state of the classification detection signal SW is used to characterize whether the serial port signal IN is an RS232 signal or an RS485 signal, and the level state of the classification detection signal SW is used to determine the target switching link in the switching controller 120.
[0040] Specifically, in this embodiment of the invention, the external device is connected through only one external interface, that is, the external device is connected only through the input terminal of the signal detection circuit 110, and the serial port signal IN input by the external device is received. The serial port signal IN is detected and classified by the detection signal circuit, generating a classification detection signal SW. The signal type of the serial port signal IN is determined by the level state of the classification detection signal SW. For example, when the classification detection signal SW is high, it indicates that the serial port signal IN input by the external device is an RS232 signal; when the classification detection signal SW is low, it indicates that the serial port signal IN input by the external device is an RS485 signal. After determining the classification detection signal SW, the signal detection circuit 110 transmits the classification detection signal SW to the switching controller 120. The switching controller 120 is connected to external devices, RS232 data lines, and RS485 data lines. When the classification detection signal SW is a high-level signal, the switching controller 120 can activate the target switch link corresponding to the RS232 data line. At this time, the target switch link operates in RS232 communication mode to communicate via the RS232 protocol. When the classification detection signal SW is a low-level signal, the switching controller 120 can activate the target switch link corresponding to the RS485 data line. At this time, the target switch link operates in RS485 communication mode to communicate via the RS485 protocol.
[0041] Furthermore, Figure 2 This is a schematic diagram of the signal detection circuit provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the signal detection circuit 110 includes a filter circuit 111, a voltage divider circuit 112, and a voltage comparator U1.
[0042] The input terminal of the filter circuit 111 is connected to the external device, and the output terminal of the filter circuit 111 is connected to the inverting input terminal -IN of the voltage comparator U1. The filter circuit 111 is used to filter the serial port signal IN input by the external device to obtain a serial port filtered signal.
[0043] The first terminal of the voltage divider circuit 112 is connected to the negative power supply terminal -VDD5V0, the second terminal of the voltage divider circuit 112 is grounded, the third terminal of the voltage divider circuit 112 is connected to the non-inverting input terminal +IN of the voltage comparator U1, and the third terminal of the voltage divider circuit 112 is used to generate a reference signal.
[0044] The output of the voltage comparator U1 is connected to the selection pin of the switching controller 120. The voltage comparator U1 is used to generate the classification detection signal SW based on the serial port filter signal and the reference signal, and output the classification detection signal SW to the selection pin.
[0045] Specifically, the input data line of the signal detection circuit 110 is filtered by the filter circuit 111 and then connected to the inverting input terminal -IN of the voltage comparator U1. The voltage divider circuit 112 divides the supply voltage at the negative terminal -VDD5V0 and then connects it to the non-inverting input terminal +IN of the voltage comparator U1. The voltage comparator U1 compares the reference signal at the non-inverting input terminal +IN with the voltage corresponding to the serial port filtered signal at the inverting input terminal -IN to obtain the classification detection signal SW, and outputs the classification detection signal SW to the selection pin in the switching controller 120.
[0046] The voltage comparator U1 operates as follows: when the voltage at the non-inverting input terminal +IN is higher than the voltage at the inverting input terminal -IN, the voltage comparator U1 outputs a high-level signal; conversely, when the voltage at the non-inverting input terminal +IN is lower than the voltage at the inverting input terminal -IN, the voltage comparator U1 outputs a low-level signal. Based on this operating principle, when the serial port signal IN is an RS232 signal (i.e., when the serial port filter signal corresponds to the RS232 signal), in the idle state, both the transmit and receive signals of the RS232 data line are negative voltages lower than the reference signal voltage. That is, the voltage of the serial port signal IN is a negative voltage lower than the reference signal voltage. After filtering by the filter circuit 111, the voltage of the serial port filter signal at the inverting input terminal -IN of the voltage comparator U1 is still lower than the reference signal voltage at the non-inverting input terminal +IN. At this time, the voltage comparator U1 outputs a high-level signal. In transmission mode, when the RS232 data line transmits or receives a logic 0, the voltage is a negative voltage lower than the reference signal voltage. That is, the voltage of the serial port signal IN is a negative voltage lower than the reference signal voltage. After filtering by the filter circuit 111, the voltage of the serial port filtered signal at the inverting input terminal -IN of the voltage comparator U1 is lower than the voltage of the reference signal at the non-inverting input terminal +IN. At this time, the voltage comparator U1 outputs a high-level signal. When the RS232 data line transmits or receives a logic 1, the voltage is a positive voltage higher than the reference signal voltage. That is, the voltage of the serial port signal IN is a positive voltage higher than the reference signal voltage. However, the filter circuit 111 can maintain the level of the filtered serial port signal without any jumps. Therefore, the serial port filtered signal at the inverting input terminal -IN of the voltage comparator U1 remains a negative voltage lower than the reference signal voltage. At this time, the voltage comparator U1 maintains a high-level output signal. When the serial port signal IN is an RS485 signal, that is, when the serial port filter signal corresponds to an RS485 signal, the serial port filter signal is a positive voltage higher than the reference signal voltage. At this time, the voltage comparator U1 outputs a low-level signal. Therefore, when the classification detection signal SW is a high-level signal, it indicates that the serial port signal IN is an RS232 signal; when the classification detection signal SW is a low-level signal, it indicates that the serial port signal IN is an RS485 signal.
[0047] Furthermore, Figure 3 This is a schematic diagram of the filter circuit provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the filter circuit 111 includes a diode D1 and a filter sub-circuit 113.
[0048] The negative terminal of diode D1 serves as the input terminal of the filter circuit 111, the positive terminal of diode D1 is connected to the first terminal of the filter sub-circuit 113, and the second terminal of the filter sub-circuit 113 serves as the output terminal of the filter circuit 111.
[0049] Diode D1 acts as a backflow preventer, and filter circuit 113 is used to keep the level of the filtered serial port signal from changing.
[0050] Furthermore, such as Figure 3 As shown, the filter sub-circuit 113 includes a second resistor R2, a fourth resistor R4, and a first capacitor C1, wherein:
[0051] The first end of the fourth resistor R4 serves as the first end of the filter sub-circuit 113. The second end of the fourth resistor R4 is connected to the first end of the second resistor R2 and the first end of the first capacitor C1, and serves as the second end of the filter sub-circuit 113. The second ends of the second resistor R2 and the second ends of the first capacitor C1 are both grounded.
[0052] The second resistor R2 and the first capacitor C1 form an RC filter circuit, which is used to filter the influence of low-level signals during communication on the subsequent comparison circuit, so that the filtered serial port signal only retains the level when the bus is idle.
[0053] In addition to the RC filter circuit and resistor R4, the filter sub-circuit can also include an LC filter circuit and resistor R4. The LC filter circuit has the same function as the RC filter circuit.
[0054] Furthermore, Figure 4 This is a schematic diagram of the voltage divider circuit provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the voltage divider circuit 112 includes a first resistor R1 and a third resistor R3, wherein:
[0055] The first resistor R1 and the third resistor R3 are connected in series, and the first end of the series connection serves as the first end of the voltage divider circuit 112, the second end of the series connection serves as the second end of the voltage divider circuit 112, and the connection point serves as the third end of the voltage divider circuit 112.
[0056] Specifically, the voltage corresponding to the series connection point in the voltage divider circuit 112 is shown in equation (1), which is:
[0057] .
[0058] Among them, U +IN This represents the voltage corresponding to the series connection point, that is, the voltage of the reference signal input to the non-inverting input terminal +IN of voltage comparator U1. VDD This indicates the absolute value of the voltage at the negative terminal of the power supply, -VDD5V0.
[0059] In addition, the positive power supply terminal V+ of the voltage comparator U1 is connected to the positive power supply terminal VDD5V0, and the negative power supply terminal V- of the voltage comparator U1 is grounded.
[0060] Furthermore, Figure 5 This is a schematic diagram of the switching controller 120 provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the switching controller 120 includes a first analog switch group 121 and a second analog switch group 122, wherein:
[0061] The first selection pin IN_1 in the first analog switch group 121 and the second selection pin IN_2 in the second analog switch group 122 are both connected to the output terminal of the signal detection circuit 110, and the first switch port COM1 in the first analog switch group 121 and the second switch port COM2 in the second analog switch group 122 are both connected to the external device.
[0062] The level of the classification detection signal SW is used to control the switching positions of the first switch port COM1 and the second switch port COM2 to determine the target switch link.
[0063] Furthermore, such as Figure 5 As shown, the first analog switch group 121 further includes a first common port NO1 and a second common port NC1. The first switch port COM1 is used to determine a first target common port among the first common port NO1 and the second common port NC1 based on the classification detection signal SW.
[0064] The second analog switch group 122 further includes a third common port NO2 and a fourth common port NC2. The second switch port COM2 is used to determine a second target common port in the third common port NO2 and the fourth common port NC2 based on the classification detection signal SW.
[0065] The first target common port and the second target common port constitute the target switch link.
[0066] Furthermore, such as Figure 5 As shown, the signal lines connected to the first target common port and the second target common port are of the same type.
[0067] like Figure 5As shown, the switching controller 120 includes two sets of two-to-one first analog switch groups 121 and second analog switch groups 122. In the first analog switch group 121, the first common port NO1 is connected to the input RS232 transmit data line, the second common port NC1 is connected to the input RS485 positive data line, the first switch port COM1 is connected to an external device and receives the serial port signal IN input from the external device, and the first selection pin IN_1 is connected to the output terminal of the signal detection circuit 110. The first selection pin IN_1 is used to control the switch position in the first switch port COM1, that is, to control the first switch port COM1 to connect to the first common port NO1 or the second common port NC1. In the second analog switch group 122, the third common port NO2 is connected to the input RS232 receiving data line, the fourth common port NC2 is connected to the input RS485 negative data line, the second switch port COM2 is also connected to an external device and receives the serial port signal IN input from the external device, the second selection pin IN_2 is connected to the output terminal of the signal detection circuit 110, and the second selection pin IN_2 is used to control the switch position in the second switch port COM2, that is, to control the second switch port COM2 to connect to the third common port NO2 or the fourth common port NC2.
[0068] When the classification detection signal SW is a high-level signal, after receiving the high-level classification detection signal SW, the first switch port COM1 can control the switch position in the first switch port COM1 to switch to the first common port NO1, that is, determine the first common port NO1 as the first target common port, and connect the first switch port COM1 to the first target common port. At the same time, the second switch port COM2 controls the switch position in the second switch port COM2 to switch to the third common port NO2, that is, determine the third common port NO2 as the second target common port, and connect the second switch port COM2 to the second target common port. At this time, the first common port NO1 and the third common port NO2 constitute the target switch link of the RS232 signal, and communicate based on the RS232 protocol through the target switch link.
[0069] When the classification detection signal SW is low, after receiving the low-level classification detection signal SW, the first switch port COM1 can control the switch position in the first switch port COM1 to switch to the second common port NC1, that is, determine the second common port NC1 as the first target common port and connect the first switch port COM1 to the first target common port. At the same time, the switch position in the second switch port COM2 can be controlled to switch to the fourth common port NC2, that is, determine the fourth common port NC2 as the second target common port and connect the second switch port COM2 to the second target common port. At this time, the second common port NC1 and the fourth common port NC2 form a target switch link of RS485 signal, and communicate through the target switch link based on the RS485 protocol.
[0070] It should be noted that external devices can be connected to the first switch port COM1 via the first data line IN1, or to the second switch port COM2 via the second data line IN2. That is, the serial port signal IN is input through the first data line IN1 or the second data line IN2. When an external device is connected, the signal detection circuit 110 further determines whether the signal type of the serial port signal input by the external device is an RS232 signal or an RS485 signal.
[0071] This invention provides a shared interface circuit compatible with both RS232 and RS485. It receives serial port signals from external devices via a signal detection circuit and generates a classification detection signal to determine whether the signal type is RS232 or RS485. This classification detection signal is then transmitted to the switching control. The level of the classification detection signal determines the target switching link for communication in the switching controller. This invention achieves compatibility with both RS232 and RS485 serial port signals using only one serial data bus, reducing the number of external interfaces, increasing device compatibility, and ultimately lowering hardware costs.
[0072] This utility model embodiment also provides a compatible device, including a common interface circuit compatible with RS232 and RS485 as described in any of the above claims.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this utility model, and not to limit it. Although this utility model has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this utility model.
Claims
1. A common interface circuit compatible with RS232 and RS485, characterized in that, include: The signal detection circuit and switching controller include: The input terminal of the signal detection circuit is connected to an external device, and the output terminal of the signal detection circuit is connected to the selection pin of the switching controller. The signal detection circuit is used to receive the serial port signal input from the external device and generate a classification detection signal based on the serial port signal. The level state of the classification detection signal is used to characterize whether the serial port signal is an RS232 signal or an RS485 signal, and the level state of the classification detection signal is used to determine the target switching link in the switching controller.
2. The shared interface circuit compatible with RS232 and RS485 according to claim 1, characterized in that, The signal detection circuit includes a filter circuit, a voltage divider circuit, and a voltage comparator, wherein: The input terminal of the filter circuit is connected to the external device, and the output terminal of the filter circuit is connected to the inverting input terminal of the voltage comparator. The filter circuit is used to filter the serial port signal input from the external device to obtain a serial port filtered signal. The first terminal of the voltage divider circuit is connected to the negative terminal of the power supply, the second terminal of the voltage divider circuit is grounded, the third terminal of the voltage divider circuit is connected to the non-inverting input terminal of the voltage comparator, and the third terminal of the voltage divider circuit is used to generate a reference signal. The output of the voltage comparator is connected to the selection pin of the switching controller. The voltage comparator is used to generate the classification detection signal based on the serial port filter signal and the reference signal, and output the classification detection signal to the selection pin.
3. The shared interface circuit compatible with RS232 and RS485 according to claim 2, characterized in that, The filter circuit includes diodes and a filter sub-circuit, wherein: The negative terminal of the diode serves as the input terminal of the filter circuit, the positive terminal of the diode is connected to the first terminal of the filter sub-circuit, and the second terminal of the filter sub-circuit serves as the output terminal of the filter circuit.
4. The shared interface circuit compatible with RS232 and RS485 according to claim 3, characterized in that, The filter sub-circuit includes a second resistor, a fourth resistor, and a first capacitor, wherein: The first end of the fourth resistor serves as the first end of the filter sub-circuit. The second end of the fourth resistor is connected to the first end of the second resistor and the first end of the first capacitor, and also serves as the second end of the filter sub-circuit. The second end of the second resistor and the second end of the first capacitor are both grounded.
5. The shared interface circuit compatible with RS232 and RS485 according to claim 2, characterized in that, The voltage divider circuit includes a first resistor and a third resistor, wherein: The first resistor and the third resistor are connected in series, and the first end of the series connection serves as the first end of the voltage divider circuit, the second end of the series connection serves as the second end of the voltage divider circuit, and the connection point serves as the third end of the voltage divider circuit.
6. The shared interface circuit compatible with RS232 and RS485 according to any one of claims 1-5, characterized in that, The switching controller includes a first analog switch group and a second analog switch group, wherein: The first selection pin in the first analog switch group and the second selection pin in the second analog switch group are both connected to the output terminal of the signal detection circuit, and the first switch port in the first analog switch group and the second switch port in the second analog switch group are both connected to the external device. The level of the classification detection signal is used to control the switching positions of the first switch port and the second switch port to determine the target switch link.
7. The shared interface circuit compatible with RS232 and RS485 according to claim 6, characterized in that, The first analog switch group further includes a first common port and a second common port. The first switch port is used to determine a first target common port among the first common port and the second common port based on the classification detection signal. The second analog switch group further includes a third common port and a fourth common port, and the second switch port is used to determine a second target common port among the third common port and the fourth common port based on the classification detection signal; The first target common port and the second target common port constitute the target switch link.
8. The shared interface circuit compatible with RS232 and RS485 according to claim 7, characterized in that, The signal lines connected to the first target common port and the second target common port are of the same type.
9. The shared interface circuit compatible with RS232 and RS485 according to any one of claims 2-5, characterized in that, The positive power supply terminal of the voltage comparator is connected to the positive power supply terminal, and the negative power supply terminal of the voltage comparator is grounded.
10. A compatible device, characterized in that, Includes a common interface circuit compatible with RS232 and RS485 as described in any one of claims 1-9.