Self-identifying Communication Calibration Device, Working Method and Computer Equipment
By designing a self-identification communication correction device, using the cooperation of the identification circuit and the isolation circuit, the correction circuit corrects the communication line sequence of the serial communication line, solving the communication fault problem caused by the inability to switch the serial communication data line, and realizing the self-identification and normal operation of the communication line.
Patent Information
- Application Number
- CN202111560057.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-12-20
AI Technical Summary
In the prior art, the data lines of the serial communication method cannot be switched in sequence, resulting in frequent communication failures during use.
A self-identification communication correction device is designed, including a correction circuit, a communication circuit, an identification circuit and an isolation circuit. The identification circuit recognizes the input signal, determines whether the communication line is normal, and feedbacks the signal to the isolation circuit. The isolation circuit sends control instructions to the correction circuit according to the feedback signal, and the correction circuit corrects the communication line sequence of the communication line according to the control command.
It realizes self-identification and correction of communication lines, avoids communication failures, and ensures the normal operation of communication lines.
Smart Images

Figure CN114200867B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of electronic circuits, and particularly relates to a self-identifying communication correction device, a working method, and a computer device. Background Art
[0002] Computer communication methods can be divided into parallel communication and serial communication according to transmission characteristics. The corresponding communication buses are called parallel buses and serial buses. The commonly used RS485, CAN, and UART communications all belong to serial communication, and the data lines are both two. That is, one is B\H\TX, and the other is A\L\RX. In most cases, these three communication methods use polar communication methods.
[0003] In the related art, because serial communication all adopts polar communication methods, that is, the two data lines cannot be swapped, otherwise communication cannot be carried out, resulting in frequent communication failures in use. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to overcome the deficiencies of the prior art, and provide a self-identifying communication correction device, a working method, and a computer device to solve the problem that the two data lines cannot be swapped in the prior art, otherwise communication cannot be carried out, resulting in frequent communication failures in use.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions: A self-identifying communication correction device, comprising: a correction circuit, a communication circuit, an identification circuit, and an isolation circuit;
[0006] The correction circuit is used to receive the input signal of the communication line and send it to the communication circuit, and when receiving the control instruction sent by the isolation circuit, correct the communication line sequence of the communication line according to the control instruction;
[0007] The communication circuit is used to send the input signal to the identification circuit;
[0008] The identification circuit is used to identify the input signal, judge whether the communication line is normal according to the identification result, and feedback a signal to the isolation circuit;
[0009] The isolation circuit is used to send a control instruction to the correction circuit according to the feedback signal.
[0010] Further, the correction circuit includes:
[0011] A first controllable switch tube, a second controllable switch tube, a third controllable switch tube, a fourth controllable switch tube, a first drive circuit, a second drive circuit, a third drive circuit, a fourth drive circuit, and an inverter;
[0012] Divide the communication line into a first transmission line, a first reception line, a second transmission line, and a second reception line;
[0013] The first transmission line, the first controllable switch tube, and the input end of the first drive circuit are connected in sequence; the first reception line, the second controllable switch tube, and the input end of the second drive circuit are connected in sequence; the second reception line, the third controllable switch tube, and the input end of the third drive circuit are connected in sequence, and the third controllable switch tube is connected to the first transmission line; the second transmission line, the fourth controllable switch tube, and the fourth drive circuit are connected in sequence, and the fourth controllable switch tube is connected to the first reception line;
[0014] Both the first controllable switch tube and the second controllable switch tube are connected to the communication circuit;
[0015] The output end of the third drive circuit and the output end of the fourth drive circuit are connected to the input end of the inverter, and the output end of the inverter, the output end of the first drive circuit, and the output end of the second drive circuit are all connected to the isolation circuit.
[0016] Further, the identification circuit includes:
[0017] A first optocoupler, a second optocoupler, and a trigger;
[0018] The output end of the communication circuit is respectively connected to the first optocoupler and the second optocoupler, the first optocoupler is connected to one end of the trigger, and the other end of the trigger is connected to the isolation circuit.
[0019] Further, the communication circuit includes:
[0020] A UART communication circuit and / or a 485 communication circuit and / or a CAN communication circuit.
[0021] Further, the first controllable switch tube, the second controllable switch tube, the third controllable switch tube, and the fourth controllable switch tube all adopt MOS tubes.
[0022] Further, the communication line adopts a two-wire serial communication line.
[0023] Further, the identification circuit further includes: a first resistor, a second resistor, a third resistor, and a fourth resistor;
[0024] One end of the first resistor is connected to the first optocoupler, and the other end of the first resistor is connected to the power supply voltage; one end of the second resistor is connected to the first optocoupler and the working voltage, and the other end of the second resistor is connected to the input end of the trigger; one end of the third resistor is connected to the second optocoupler, and the other end of the third resistor is connected to the working voltage; one end of the fourth resistor is connected to the output end of the communication circuit and the second optocoupler, and the other end of the fourth resistor is connected to the power supply voltage.
[0025] Furthermore, the first controllable switch tube and the second controllable switch tube are normally-on MOS tubes.
[0026] The present application embodiment provides a working method of a self-identification communication calibration device, including:
[0027] The correction circuit receives an input signal of the communication line and sends it to the communication circuit, and when receiving a control instruction sent by the isolation circuit, corrects the communication line sequence of the communication line according to the control instruction;
[0028] The communication circuit sends the input signal to the identification circuit;
[0029] The identification circuit identifies the input signal, determines whether the communication line is normal according to the identification result, and feeds back the signal to the isolation circuit;
[0030] The isolation circuit sends a control instruction to the correction circuit according to the feedback signal.
[0031] Further, the identifying the input signal, judging whether the communication line is normal according to the identification result, and feeding back the signal to the isolation circuit, includes:
[0032] Identify the input signal, and when the input signal is abnormal, confirm whether the abnormal time exceeds a preset time;
[0033] If it exceeds, a feedback signal is sent to the isolation circuit, otherwise, the input signal is considered normal.
[0034] The embodiment of the present application provides a computer device, using the self-identification communication correction device described in any of the above embodiments; and
[0035] A processor is connected to the identification circuit of the self-identification communication correction device.
[0036] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0037] The self-identifying communication correction device, working method and computer device provided by the present application, wherein the correction circuit can perform correction processing on the communication line, that is, correct the order of the two data lines, so as to achieve normal communication and avoid communication failures. The communication circuit adopted by the present application is applicable to the two-wire serial communication mode and can well be compatible with three communication modes of UART, 485 and CAN. The identification circuit adopted in the present application can identify whether there is an abnormality in the communication line, which is convenient and simple and reduces the use of the I / O ports of the chip. In addition, the present application adds an isolation circuit, and an isolation circuit is added in the feedback control process to achieve isolated communication and isolated control.
[0038] It should be understood that the above general description and the following detailed description are only exemplary and explanatory and should not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is a schematic structural diagram of the self-identifying communication correction device of the present invention;
[0041] Figure 2 It is another schematic structural diagram of the self-identifying communication correction device of the present invention;
[0042] Figure 3 It is a schematic diagram of the steps of the working method of the self-identifying communication correction device of the present invention;
[0043] Figure 4 It is a schematic flow diagram of the working method of the self-identifying communication correction device of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] In order to make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope protected by the present invention.
[0045] The following introduces a specific self-identifying communication correction device, working method and computer device provided in the embodiments of the present application with reference to the drawings.
[0046] As Figure 1As shown in the figure, the self-identifying communication correction device provided in the embodiment of the present application includes a correction circuit 1, a communication circuit 2, an identification circuit 3, and an isolation circuit 4;
[0047] The correction circuit 1 is configured to receive the input signal of the communication line and send it to the communication circuit 2, and when receiving the control instruction sent by the isolation circuit 4, correct the communication line sequence of the communication line according to the control instruction;
[0048] The communication circuit 2 is configured to send the input signal to the identification circuit 3;
[0049] The identification circuit 3 is configured to identify the input signal, judge whether the communication line is normal according to the identification result, and feedback a signal to the isolation circuit 4;
[0050] The isolation circuit 4 is configured to send a control instruction to the correction circuit 1 according to the feedback signal.
[0051] Wherein, the input end of the correction circuit 1 is connected to the communication line, the output end of the correction circuit 1 is connected to the input end of the communication circuit 2, the output end of the communication circuit 2 is connected to the input end of the identification circuit 3, the output end of the identification circuit 3 is connected to one end of the isolation circuit 4, and the other end of the isolation circuit 4 is connected to the correction circuit 1.
[0052] The working principle of the self-identifying communication correction device provided by the present application is that a correction circuit 1 is added in front of the communication circuit 2, the identification circuit 3 identifies the input signal. When it is determined that the input signal is abnormal, a feedback signal is sent to the isolation circuit 4. The isolation circuit 4 sends a control instruction to the correction circuit 1 after receiving the feedback signal. After receiving the control instruction, the correction circuit 1 corrects the communication line sequence of the communication line. By correcting the order of the two data lines, normal communication is realized, and communication failures are avoided.
[0053] Wherein, the present application realizes isolation control through the isolation circuit 4. Specifically, the identification circuit 3 sends a feedback signal to the isolation circuit 4, and the isolation circuit 4 controls the correction circuit 1 to perform correction.
[0054] In some embodiments, the correction circuit 1 includes:
[0055] A first controllable switch tube, a second controllable switch tube, a third controllable switch tube, a fourth controllable switch tube, a first drive circuit, a second drive circuit, a third drive circuit, a fourth drive circuit, and an inverter;
[0056] The communication line is divided into a first transmission line, a first reception line, a second transmission line, and a second reception line;
[0057] The input ends of the first transmitting line, the first controllable switch tube, and the first driving circuit are connected in sequence; the input ends of the first receiving line, the second controllable switch tube, and the second driving circuit are connected in sequence; the input ends of the second receiving line, the third controllable switch tube, and the third driving circuit are connected in sequence, and the third controllable switch tube is connected to the first transmitting line; the second transmitting line, the fourth controllable switch tube, and the fourth driving circuit are connected in sequence, and the fourth controllable switch tube is connected to the first receiving line;
[0058] Both the first controllable switch tube and the second controllable switch tube are connected to the communication circuit 2;
[0059] The output end of the third driving circuit and the output end of the fourth driving circuit are connected to the input end of an inverter, and the output end of the inverter is connected to the isolation circuit 4.
[0060] Preferably, the first controllable switch tube, the second controllable switch tube, the third controllable switch tube, and the fourth controllable switch tube all adopt MOS tubes.
[0061] Specifically, as Figure 2 shown, the first controllable switch tube adopts MOS tube Q1, the second controllable switch tube adopts MOS tube Q2, the third controllable switch tube adopts MOS tube Q3, and the fourth controllable switch tube adopts MOS tube Q4. In this application, two data lines (represented by TX and RX here) of an external signal are separated into four paths, which are respectively represented as the first transmitting line TX and the first receiving line RX, the second receiving line RX and the second transmitting line TX. Among them, MOS tube Q1 is connected in series on the first transmitting line TX; MOS tube Q2 is connected in series on the first receiving line RX; the second receiving line RX is connected to the D pole of MOS tube Q3, and the S pole of MOS tube Q3 is connected to the first transmitting line TX together; the second transmitting line TX is connected to the D pole of MOS tube Q4, and the S pole of MOS tube Q4 is connected to the first receiving line RX together. The G poles of MOS tube Q1 and MOS tube Q2 are respectively connected to one end of the first driving circuit and the second driving circuit, and then the other end of the first driving circuit and the other end of the second driving circuit are connected together at the rear end of the isolation circuit 4; the G poles of MOS tube Q3 and MOS tube Q4 are respectively connected to one end of the third driving circuit and the fourth driving circuit, and then the other end of the third driving circuit and the other end of the fourth driving circuit are connected to the inverter T1 together and then connected to the isolation circuit 4.
[0062] As a specific embodiment, the calibration circuit 1 provided in the present application is composed of an inverter T1, four drive circuits (a first drive circuit, a second drive circuit, a third drive circuit, and a fourth drive circuit), and four MOS transistors (MOS transistor Q1, MOS transistor Q2, MOS transistor Q3, and MOS transistor Q4). Among them, four MOS transistors are externally added with drive circuits to provide sufficient driving ability. The inverter is added in front of the third drive circuit and the fourth drive circuit of MOS transistor Q3 and MOS transistor Q4, so that when MOS transistor Q1 and MOS transistor Q2 are turned off, MOS transistor Q3 and MOS transistor Q4 are turned on, realizing the calibration of the normal communication line.
[0063] The specific working principle is that the preprocessing is divided into four groups in two: the first transmission line TX and the first reception line RX, the second reception line RX and the second transmission line TX. The first transmission line TX and the first reception line RX are respectively controlled by MOS transistor Q1 and MOS transistor Q2, and the second reception line RX and the second transmission line TX are respectively controlled by MOS transistor Q3 and MOS transistor Q4. The second reception line RX is output to the first transmission line TX through MOS transistor Q3. Similarly, the second transmission line TX is output to the first reception line RX through MOS transistor Q4. And the control ends of MOS transistor Q1 and MOS transistor Q2 are connected together, the control ends of MOS transistor Q3 and MOS transistor Q4 are connected together, and are connected to the control ends of MOS transistor Q1 and MOS transistor Q2 through the inverter T1. The advantage of this is that the transposition of TX and RX is realized in hardware.
[0064] In some embodiments, the identification circuit 3 includes:
[0065] A first optocoupler U1, a second optocoupler U2, and a flip-flop 31;
[0066] The output end of the communication circuit 2 is respectively connected to the first optocoupler U1 and the second optocoupler U2. One end of the first optocoupler U1 is connected to the flip-flop 31, and the other end of the flip-flop 31 is connected to the isolation circuit 4.
[0067] Preferably, the communication circuit 2 includes:
[0068] A UART communication circuit and / or a 485 communication circuit and / or a CAN communication circuit.
[0069] Specifically, as Figure 2 shown, after the two data lines are transmitted out through the UART communication circuit, the 485 communication circuit, and the CAN communication circuit, each passes through an optocoupler and is transmitted to the chip end. At the chip end of the first optocoupler U1, the input signal RX is led out to the flip-flop 31, and the flip-flop 31 outputs a feedback signal to the isolation circuit 4. Among them, the processor uses the chip MCU.
[0070] The specific working principle is that the outputs of the UART communication circuit, 485 communication circuit and CAN communication circuit are all TTL signals, which are input to the receiving end of the processor MCU through the first optocoupler U1, and the MCU replies with a TTL signal and returns to the communication circuit 2 through the second optocoupler U2. A trigger 31 is added to the receiving end of the chip MCU to detect the input TTL signal. Since the transmission of the optocoupler is unidirectional, when the input is normal, the trigger 31 detects the normal TTL level and does not react; when the input data line is reversed, the trigger 31 cannot detect the TTL signal, and the output control instruction controls the correction circuit 1 to change the sequence for correction. In this way, the self-identification and correction process of the communication signal is realized.
[0071] It is understandable that a certain delay time is set in the trigger 31 provided in the present application, which is set to 1s here. In normal communication, the trigger 31 does not react. When the input data line is reversed, the trigger 31 will first perform a delay judgment to avoid misidentification due to short-term communication anomalies caused by lines or other problems. If no signal can be received within 1s, the control instruction is output to change the line sequence to achieve self-correction.
[0072] Preferably, the communication line adopts a two-wire serial communication line.
[0073] Specifically, the present invention is suitable for calibrating a communication circuit 2 in a two-wire serial communication mode, and is well compatible with three communication modes: UART, 485 and CAN.
[0074] Preferably, Figure 2 As shown, the identification circuit 3 further includes: a first resistor R1, a second resistor R2, a third resistor R3 and a fourth resistor R4;
[0075] One end of the first resistor R1 is connected to the first optocoupler U1, and the other end of the first resistor R1 is connected to the power supply voltage VCC; one end of the second resistor R2 is connected to the first optocoupler U1 and the working voltage VDD, and the other end of the second resistor R2 is connected to the input end of the trigger 31; one end of the third resistor R3 is connected to the second optocoupler U2, and the other end of the third resistor R3 is connected to the working voltage VDD; one end of the fourth resistor R4 is connected to the output end of the communication circuit 2 and the second optocoupler U2, and the other end of the fourth resistor R4 is connected to the power supply voltage.
[0076] Preferably, the first controllable switch tube and the second controllable switch tube are normally-open MOS tubes.
[0077] As a specific embodiment, a communication correction circuit 1 is added to the front end of the commonly used UART, 485, and CAN communication circuits. The correction circuit 1 is composed of an inverter, four drive circuits, and four MOS transistors. Among them, four MOS transistors are externally added with drive circuits to provide sufficient driving ability. The inverter T1 is added in front of the drive circuits of the MOS transistors Q3 and Q4, so that when the MOS transistors Q1 and Q2 are turned off, the MOS transistors Q3 and Q4 are turned on, realizing the correction of the normal communication line. An identification circuit 3 is added to the back end of the UART communication circuit, 485 communication circuit, and CAN communication circuit. The identification circuit 3 is composed of two optocouplers U1 and U2 and a trigger 31. U1 is used to receive signals, U2 is used to reply signals, and the trigger 31 collects the signals at the receiving end. If the signal is normal, no reaction is made; if the signal is abnormal, an instruction is issued, and the correction circuit 1 is controlled through the isolation circuit 4 to perform correction, realizing self-identification correction. In the feedback isolation circuit 4, an isolation circuit 4 is added to realize isolation control.
[0078] As Figure 3 shown, the present application provides a working method for a self-identification communication correction device, including:
[0079] S101, the correction circuit 1 receives the input signal of the communication line and sends it to the communication circuit 2, and when receiving the control instruction sent by the isolation circuit 4, corrects the communication line sequence of the communication line according to the control instruction;
[0080] S102, the communication circuit 2 sends the input signal to the identification circuit 3;
[0081] S103, the identification circuit 3 identifies the input signal, judges whether the communication line is normal according to the identification result, and feeds back the signal to the isolation circuit 4;
[0082] S104, the isolation circuit 4 sends a control instruction to the correction circuit 1 according to the feedback signal.
[0083] Preferably, the identifying the input signal, judging whether the communication line is normal according to the identification result, and feeding back the signal to the isolation circuit 4 includes:
[0084] identifying the input signal, and when the input signal is abnormal, confirming whether the abnormal time exceeds a preset time;
[0085] If it exceeds, a feedback signal is sent to the isolation circuit 4, otherwise, the input signal is considered normal.
[0086] As Figure 4As shown in the figure, the working principle of the working method of the self-identifying communication correction device is as follows: The correction circuit 1 receives the input signal of the communication line and sends it to the communication circuit 2, and the communication circuit 2 sends the input signal to the identification circuit 3; the identification circuit 3 identifies the input signal and determines whether the communication line is normal according to the identification result. Specifically, a delay judgment is first performed to avoid misidentification due to short-term communication anomalies caused by line or other problems. If the duration of the abnormal signal exceeds 1 s and no signal can be received after 1 s, a feedback signal is sent to the isolation circuit 4; the isolation circuit 4 sends a control instruction to the correction circuit 1 according to the feedback signal; when the correction circuit 1 receives the control instruction sent by the isolation circuit 4, it corrects the communication line sequence of the communication line according to the control instruction.
[0087] The embodiment of the present application provides a computer device that applies the self-identifying communication correction device provided in any of the above embodiments; and
[0088] a processor, where the processor is connected to the identification circuit 3 of the self-identifying communication correction device.
[0089] In summary, the present invention provides a self-identifying communication correction device, a working method, and a computer device. The device includes a correction circuit that receives the input signal of the communication line and sends it to the communication circuit, and when receiving the control instruction sent by the isolation circuit, corrects the communication line sequence of the communication line according to the control instruction; the communication circuit sends the input signal to the identification circuit; the identification circuit identifies the input signal, determines whether the communication line is normal according to the identification result, and sends a feedback signal to the isolation circuit; the isolation circuit sends a control instruction to the correction circuit according to the feedback signal; the correction circuit corrects the communication line sequence of the communication line according to the control instruction. Through the transmission and identification of the communication line, the present invention can send a feedback signal to the isolation circuit when the communication line is abnormal, and the isolation circuit controls the correction circuit to perform correction processing on the communication line, that is, correct the order of the two data lines, so as to achieve normal communication and avoid communication failures.
[0090] It can be understood that the same or similar parts in the above embodiments can be referred to each other, and the content not detailed in some embodiments can be seen in the same or similar content of other embodiments.
[0091] It should be noted that in the description of the present application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality" refers to at least two.
[0092] Any process described in the flowchart or otherwise herein or the self-identifying communication correction device description can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations where functions may be performed not in the order shown or discussed, including in a substantially simultaneous manner according to the functions involved or in the reverse order, which should be understood by those skilled in the art to which the embodiments of the present application pertain.
[0093] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or the self-identifying communication correction device can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0094] Those of ordinary skill in the art of the present technology can understand that all or part of the steps carried by the self-identifying communication correction device in the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the self-identifying communication correction device embodiment.
[0095] In addition, in each of the embodiments of the present application, the various functional units can be integrated in one processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0096] The above-mentioned storage medium can be a read-only memory, a disk, an optical disc, or the like.
[0097] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0098] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A self-identifying communication correction device, characterized in that, it includes: a correction circuit, a communication circuit, an identification circuit, and an isolation circuit; The correction circuit includes: a first controllable switch tube, a second controllable switch tube, a third controllable switch tube, a fourth controllable switch tube, a first drive circuit, a second drive circuit, a third drive circuit, a fourth drive circuit, and an inverter; The communication line is divided into a first transmission line, a first reception line, a second transmission line, and a second reception line; The first transmission line, the first controllable switch tube, and the input end of the first drive circuit are connected in sequence; the first reception line, the second controllable switch tube, and the input end of the second drive circuit are connected in sequence; the second reception line, the third controllable switch tube, and the input end of the third drive circuit are connected in sequence, and the third controllable switch tube is connected to the first transmission line; the second transmission line, the fourth controllable switch tube, and the fourth drive circuit are connected in sequence, and the fourth controllable switch tube is connected to the first reception line; The first controllable switch tube and the second controllable switch tube are both connected to the communication circuit; The output end of the third drive circuit and the output end of the fourth drive circuit are connected to the input end of the inverter, and the output end of the inverter, the output end of the first drive circuit, and the output end of the second drive circuit are all connected to the isolation circuit; The correction circuit is used to receive the input signal of the communication line and send it to the communication circuit, and when receiving the control instruction sent by the isolation circuit, correct the communication line sequence of the communication line according to the control instruction; The communication circuit is used to send the input signal to the identification circuit; The identification circuit is used to identify the input signal, judge whether the communication line is normal according to the identification result, and feedback a signal to the isolation circuit; The isolation circuit is used to send a control instruction to the correction circuit according to the feedback signal.
2. The self-identifying communication correction device according to claim 1, characterized in that: The identification circuit includes: a first optocoupler, a second optocoupler, and a trigger; The output end of the communication circuit is respectively connected to the first optocoupler and the second optocoupler, one end of the first optocoupler is connected to the trigger, and the other end of the trigger is connected to the isolation circuit.
3. The self-identifying communication correction device according to claim 1, characterized in that, The communication circuit includes: a UART communication circuit and / or a 485 communication circuit and / or a CAN communication circuit.
4. The self-identifying communication correction device according to claim 1, characterized in that, The first controllable switch tube, the second controllable switch tube, the third controllable switch tube, and the fourth controllable switch tube all adopt MOS tubes.
5. The self-identifying communication correction device according to any one of claims 1-4, characterized in that, The communication line adopts a two-wire serial communication line.
6. The self-identifying communication correction device according to claim 2, characterized in that, The identification circuit further includes: a first resistor, a second resistor, a third resistor, and a fourth resistor; One end of the first resistor is connected to the first optocoupler, and the other end of the first resistor is connected to the power supply voltage; one end of the second resistor is connected to the first optocoupler and the working voltage, and the other end of the second resistor is connected to the input end of the trigger; one end of the third resistor is connected to the second optocoupler, and the other end of the third resistor is connected to the working voltage; one end of the fourth resistor is connected to the output end of the communication circuit and the second optocoupler, and the other end of the fourth resistor is connected to the power supply voltage.
7. The self-identification communication calibration device according to claim 4, It is characterized in that The first controllable switch tube and the second controllable switch tube are normally-on MOS tubes.
8. A method for operating a self-identifying communication correction device, It is characterized in that include: The correction circuit receives an input signal of the communication line and sends it to the communication circuit, and when receiving a control instruction sent by the isolation circuit, corrects the communication line sequence of the communication line according to the control instruction; The communication circuit sends the input signal to the identification circuit; The identification circuit identifies the input signal, determines whether the communication line is normal according to the identification result, and feeds back the signal to the isolation circuit; The isolation circuit sends a control instruction to the correction circuit according to the feedback signal; Wherein, the correction circuit comprises: A first controllable switch tube, a second controllable switch tube, a third controllable switch tube, a fourth controllable switch tube, a first drive circuit, a second drive circuit, a third drive circuit, a fourth drive circuit and an inverter; Dividing the communication line into a first transmitting line, a first receiving line, a second transmitting line and a second receiving line; The first transmitting circuit, the first controllable switch tube, and the input end of the first driving circuit are connected in sequence; the first receiving circuit, the second controllable switch tube, and the input end of the second driving circuit are connected in sequence; the second receiving circuit, the third controllable switch tube, and the input end of the third driving circuit are connected in sequence, and the third controllable switch tube is connected to the first transmitting circuit; the second transmitting circuit, the fourth controllable switch tube, and the fourth driving circuit are connected in sequence, and the fourth controllable switch tube is connected to the first receiving circuit; The first controllable switch tube and the second controllable switch tube are both connected to the communication circuit; The output end of the third driving circuit and the output end of the fourth driving circuit are connected to the input end of the inverter, and the output end of the inverter, the output end of the first driving circuit and the output end of the second driving circuit are all connected to the isolation circuit.
9. The working method according to claim 8, It is characterized in that The identifying the input signal, judging whether the communication line is normal according to the identification result, and feeding back the signal to the isolation circuit, comprises: Identify the input signal, and when the input signal is abnormal, confirm whether the abnormal time exceeds a preset time; If it exceeds, a feedback signal is sent to the isolation circuit, otherwise, the input signal is considered normal.
10. A computer device, It is characterized in that Using the self-identification communication correction device as described in any one of claims 1 to 7; and A processor, the processor being connected to the identification circuit of the self-identification communication correction device.
Citation Information
Patent Citations
A non-polar RS485 communication interface and a method for realizing non-polar RS485 communication
CN109714235A
Self-recognition communication correction device and computer equipment
CN216927402U