Anti-interference circuit for data bus

By designing an anti-interference circuit in the I2C bus, detecting and adding the slew rate of the bus signal, the problem of excessive time and poor stability of the I2C bus signal during long distance transmission is solved, and the rapid stability and anti-interference of the signal are achieved Improved, ensuring the reliability of communication.

CN112994664BActive Publication Date: 2024-11-15BEIJING XINWANG RUIJIE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110145291.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-02
Publication Date
2024-11-15
Estimated Expiration
2041-02-02

AI Technical Summary

Technical Problem

The rising edge time and falling edge time of the I2C bus signal in long distance transmission are too long, resulting in poor signal stability and easy interference, affecting communication reliability.

Method used

An anti-interference circuit is designed, including a slope detection circuit, a filter circuit, a first voltage comparison circuit, a second voltage comparison circuit, a falling edge drive circuit and a rising edge drive circuit. By detecting the slew rate signal of the bus signal, Suppress high-frequency interference noise and perform driving processing when the signal enters the rising or falling edge to quickly stabilize the bus signal voltage.

Benefits of technology

It effectively shortens the rising and falling edge times of the I2C bus signal, improves the anti-interference of the signal, and realizes reliable communication of long-distance transmission of the data bus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112994664B_ABST
    Figure CN112994664B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an anti-interference circuit for a data bus. In the embodiment of the present application, when the bus signal enters the falling edge stage, the falling edge of the bus signal is driven by the falling edge driving circuit, so that the voltage of the bus signal drops quickly to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the falling edge time is shortened. At the same time, when the bus signal enters the rising edge stage, the rising edge of the bus signal is driven by the rising edge driving circuit, so that the voltage of the bus signal rises quickly to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the rising edge time is shortened. Thus, the anti-interference of the bus signal is improved, and reliable communication of long-distance transmission of the data bus is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of signal processing, and in particular to an anti-interference circuit for a data bus. Background Art

[0002] At present, the I2C (Inter Integrated Circuit, two-wire serial bus) bus is used in various long-distance transmission communications, and the rising edge time and falling edge time of the I2C bus signal are proportional to the length of the I2C bus cable. At present, during long-distance transmission communications, the rising edge time and falling edge time of the I2C bus signal are too long. Among them, the rising edge time of the I2C bus signal is too long, that is, the time required for the voltage of the I2C bus signal to change from a low level to a high level and stabilize to a high voltage is long, and the falling edge time of the I2C bus signal is too long, that is, the time required for the voltage of the I2C bus signal to change from a high level to a low level and stabilize to a low voltage is long. The I2C bus signal is subject to more interference signals, and the stability of the I2C bus signal is poor. Summary of the invention

[0003] The present application provides an anti-interference circuit for a data bus, which is used to improve the anti-interference performance of bus signals and realize reliable communication of long-distance transmission of the data bus.

[0004] The embodiment of the present application provides an anti-interference circuit for a data bus, comprising: a slope detection circuit, a filtering circuit, a first voltage comparison circuit, a second voltage comparison circuit, a falling edge driving circuit and a rising edge driving circuit; the input end of the slope detection circuit is connected to the data bus, and is used to perform slope detection on the voltage of the bus signal on the data bus to obtain a slew rate signal, and output it to the filtering circuit; the input end of the filtering circuit is connected to the slope detection circuit, and is used to filter the slew rate signal, and output the filtered slew rate signal to the first voltage comparison circuit and the second voltage comparison circuit; the first voltage comparison circuit is used to compare the filtered slew rate signal with a first slew rate threshold voltage, and When the filtered slew rate signal is greater than the first slew rate threshold voltage, a falling edge drive control signal is output; the falling edge drive circuit is used to increase the discharge current of the data bus to reduce the voltage of the bus signal according to the falling edge drive control signal; the second voltage comparison circuit is used to compare the filtered slew rate signal with the second slew rate threshold voltage, and output a rising edge drive control signal when the filtered slew rate signal is less than the second slew rate threshold voltage; the rising edge drive circuit is used to increase the charging current of the data bus to increase the voltage of the bus signal according to the rising edge drive control signal; wherein the second slew rate threshold voltage is not equal to the first slew rate threshold voltage.

[0005] The anti-interference circuit for the data bus provided in the embodiment of the present application detects the slew rate signal of the bus signal through the slope detection circuit, and uses the filter circuit to suppress the high-frequency slope interference noise, and uses the first voltage comparison circuit to determine whether the bus signal enters the falling edge stage, and when the bus signal enters the falling edge stage, the falling edge driving circuit is used to drive the falling edge of the bus signal, so that the voltage of the bus signal is quickly reduced to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the falling edge time is shortened. At the same time, the second voltage comparison circuit is used to determine whether the bus signal enters the rising edge stage, and when the bus signal enters the rising edge stage, the rising edge driving circuit is used to drive the rising edge of the bus signal, so that the voltage of the bus signal is quickly increased to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the rising edge time is shortened. Thus, the anti-interference of the bus signal is improved, and the long-distance transmission and reliable communication of the data bus is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0007] Figure 1 A schematic diagram of the structure of an anti-interference circuit for a data bus provided by an exemplary embodiment of the present application;

[0008] Figure 2 A schematic diagram of the structure of a falling edge driving circuit provided by an exemplary embodiment of the present application;

[0009] Figure 3 A schematic diagram of the structure of a rising edge driving circuit provided by an exemplary embodiment of the present application;

[0010] Figure 4 A schematic structural diagram of another anti-interference circuit for a data bus provided by an exemplary embodiment of the present application;

[0011] Figure 5 A schematic diagram of the structure of a first limiting circuit provided by an exemplary embodiment of the present application;

[0012] Figure 6 A schematic diagram of the structure of a second limiting circuit provided for an exemplary embodiment of the present application;

[0013] Figure 7 A schematic structural diagram of a third voltage comparison circuit provided by an exemplary embodiment of the present application;

[0014] Figure 8 An exemplary I2C bus topology circuit and anti-interference circuit;

[0015] Fig. 9 The waveform diagram is the key node. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0017] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0018] Figure 1 FIG. 1 is a schematic diagram of a structure of an anti-interference circuit for a data bus 10 provided by an exemplary embodiment of the present application. Figure 1 As shown, the circuit includes: a slope detection circuit 11, a filter circuit 14, a first voltage comparison circuit 12, a second voltage comparison circuit 15, a falling edge driving circuit 13 and a rising edge driving circuit 16; wherein, the input end of the slope detection circuit 11 is connected to the data bus, and is used to perform slope detection on the voltage of the bus signal on the data bus 10 to obtain a slew rate signal, and output it to the filter circuit 14; the input end of the filter circuit 14 is connected to the slope detection circuit, and is used to filter the slew rate signal, and output the filtered slew rate signal to the first voltage comparison circuit 12 and the second voltage comparison circuit 15; the first voltage comparison circuit 12 is used to compare the filtered slew rate signal with the first slew rate threshold The first voltage comparison circuit 11 is used to compare the filtered slew rate signal with the second slew rate threshold voltage, and output a falling edge drive control signal when the filtered slew rate signal is greater than the first slew rate threshold voltage; the falling edge drive circuit 13 is used to increase the discharge current of the data bus to reduce the voltage of the bus signal according to the falling edge drive control signal; the second voltage comparison circuit 15 is used to compare the filtered slew rate signal with the second slew rate threshold voltage, and output a rising edge drive control signal when the filtered slew rate signal is less than the second slew rate threshold voltage; the rising edge drive circuit 16 is used to increase the charging current of the data bus to increase the voltage of the bus signal according to the rising edge drive control signal; wherein the second slew rate threshold voltage is not equal to the first slew rate threshold voltage.

[0019] In this embodiment, the data bus 10 can be any data bus 10, such as an I2C bus. Taking the I2C bus as an example, the I2C bus is used for short-distance I2C transmission communications of various electronic devices, and the communication bit error rate is very low; at the same time, the I2C bus is used for various long-distance transmission communications, including but not limited to HDMI communication and VGA communication. At present, the maximum allowable cable length for reliable transmission of the I2C bus is 10 meters. If the transmission cable length of the I2C bus is to be extended, the I2C bus signal must be driven. The I2C bus is a bidirectional transmission signal, and the difficulty of driving a bidirectional transmission signal is much higher than that of a unidirectional transmission signal. During the long-distance transmission of the I2C bus, there are radiation coupling crosstalk, common-mode crosstalk between devices, and power supply crosstalk.

[0020] In this embodiment, the slope detection circuit 11 can be any existing positive phase amplification slope detection circuit or inverting phase amplification slope detection circuit that can detect the slope of voltage change. Preferably, the slope detection circuit 11 is an inverting phase amplification slope detection circuit. When a rising edge appears in the bus signal, the slew rate signal corresponding to the rising edge output by the positive phase amplification slope detection circuit 11 is greater than 0, while the slew rate signal corresponding to the rising edge output by the negative phase amplification slope detection circuit 11 is less than 0. Similarly, when a falling edge appears in the bus signal, the slew rate signal corresponding to the rising edge output by the positive phase amplification slope detection circuit 11 is less than 0, while the slew rate signal corresponding to the rising edge output by the negative phase amplification slope detection circuit 11 is greater than 0. It should be pointed out that the slope detection circuit outputs a slope signal, i.e., a slew rate signal. It can be understood that the slew rate signal output by the slope detection circuit is a slope signal of the voltage of the bus signal.

[0021] In this embodiment, the input end of the filter circuit 14 is connected to the slope detection circuit, which is used to filter the slew rate signal output by the slope detection circuit 11 and output the filtered slew rate signal to the first voltage comparison circuit 11 and the second voltage comparison circuit 12.

[0022] Specifically, after filtering by the filtering circuit 14, high-frequency noises such as radiation coupling noise, I2C response step signal jump noise, power supply crosstalk noise and common-mode crosstalk noise between devices can be suppressed, ensuring that the anti-interference circuit will not incorrectly drive the high-frequency noise and cause I2C communication errors.

[0023] In this embodiment, the first voltage comparison circuit 12 can be any existing circuit that can detect and compare voltages. The first input end of the first voltage comparison circuit 12 is connected to the output end of the filter circuit 14, and the second input end of the first voltage comparison circuit 12 is connected to a power supply circuit that provides a first slew rate threshold voltage. The first slew rate threshold voltage can be calibrated according to the comprehensive requirements of transmission distance and anti-interference.

[0024] When the slew rate signal connected to the first input terminal of the first voltage comparison circuit 12 is greater than the first slew rate threshold voltage connected to the second input terminal of the first voltage comparison circuit 12, the output terminal of the first voltage comparison circuit 12 outputs a high level signal, which is a falling edge plus drive control signal. When the slew rate signal connected to the first input terminal of the first voltage comparison circuit 12 is less than the first slew rate threshold voltage connected to the second input terminal of the first voltage comparison circuit 12, the output terminal of the first voltage comparison circuit 12 outputs a low level signal, which is not a falling edge plus drive control signal.

[0025] In this embodiment, when the falling edge driving circuit 13 receives the falling edge driving control signal, it indicates that the bus signal of the data bus 10 has entered the falling edge stage. At this time, the falling edge of the bus signal needs to be driven to make the voltage of the bus signal drop quickly to a stable voltage value, stabilize the voltage of the bus signal as soon as possible, shorten the falling edge time, and improve the anti-interference of the bus signal. When the falling edge driving circuit 13 does not receive the falling edge driving control signal, it indicates that the bus signal has not yet entered the falling edge stage, the voltage of the bus signal is relatively stable, and there is no need to perform the falling edge driving process.

[0026] In an optional implementation, Figure 2 As shown, the falling edge driving circuit 13 includes a first switch circuit T1, a resistor R15, and a resistor R17. The first control input terminal of the first switch circuit T1 is connected to the output terminal of the first voltage comparison circuit 12 via the resistor R17, the second control input terminal of the first switch circuit T1 is grounded, and the output terminal of the first switch circuit T1 is connected to the data bus 10 via the resistor R15; wherein, when the output terminal of the first voltage comparison circuit 12 outputs a falling edge driving control signal, the first switch circuit T1 is turned on, increasing the discharge current of the data bus 10 to reduce the voltage of the bus signal.

[0027] In this embodiment, the first switch circuit T1 may be a switch circuit composed of any power electronic devices, including but not limited to: NPN transistor, PNP transistor, MOS transistor (Metal-Oxide-Semiconductor Field-Effect Transistor, MOSFET).

[0028] Preferably, the first switch circuit T1 includes an NPN transistor, the base of the NPN transistor is the first control input terminal of the first switch circuit T1, the emitter of the NPN transistor is the second control input terminal of the first switch circuit T1, and the collector of the NPN transistor is the output terminal of the first switch circuit T1.

[0029] Specifically, when the first voltage comparison circuit 12 outputs a high level signal, the NPN transistor is turned on, and the falling edge drive is turned on, which increases the discharge current in the data bus 10, and the discharge current flows to the ground point through R15. At this time, the voltage of the bus signal is pulled down until the voltage of the bus signal stabilizes. Taking the stable low voltage of the bus signal as 0 voltage as an example, the end time point of the falling edge drive is the time when the bus signal is adjusted to 0 voltage.

[0030] It should be noted that the falling edge driving current mainly depends on the resistance of resistor R15, which is inversely proportional to the magnitude of the driving current, and the resistance of resistor R15 should be set appropriately according to the actual situation. Resistor R17 is also set according to the actual situation.

[0031] In this embodiment, the second voltage comparison circuit 15 can be any existing circuit that can detect and compare voltages. The first input end of the second voltage comparison circuit 15 is connected to the output end of the filter circuit 14, and the second input end of the second voltage comparison circuit 15 is connected to a power supply circuit that provides a second slew rate threshold voltage. The second slew rate threshold voltage can be calibrated based on a large amount of test data. The second slew rate threshold voltage is not equal to the first slew rate threshold voltage. The second slew rate threshold voltage can be calibrated based on the comprehensive requirements of transmission distance and anti-interference.

[0032] It can be understood that, since the rising edge driving and the falling edge driving cannot exist at the same time, that is, the first voltage comparison circuit 12 and the second voltage comparison circuit 15 cannot be in the cut-off state or in the working state at the same time. Since the slew rate signal output by the slope detection circuit 11 is simultaneously connected to the first input terminals of the first voltage comparison circuit 12 and the second voltage comparison circuit 15, the threshold voltages connected to the second input terminals of the first voltage comparison circuit 12 and the second voltage comparison circuit 15 cannot be the same, and must be one larger than the other, that is, the second slew rate threshold voltage is greater than or less than the first slew rate threshold voltage, to ensure that the rising edge driving and the falling edge driving cannot exist at the same time.

[0033] Taking the bus signal as an I2C signal as an example, when the voltage of the I2C signal is at a high level (assuming the high level is VCC) or a low level, the slew rate signal output by the slope detection circuit is 1 / 2VCC. Since the I2C signal will be interfered with, the slew rate signal will fluctuate in a small range around 1 / 2VCC. Therefore, when setting the second slew rate threshold voltage and the first slew rate threshold voltage, 1 / 2VCC should be avoided. Taking VCC as 5V as an example, the first slew rate threshold voltage can be 2V, and the second slew rate threshold voltage can be 3V; or, the first slew rate threshold voltage can be 3V, and the second slew rate threshold voltage can be 2V.

[0034] When the slew rate signal at the first input terminal connected to the second voltage comparison circuit 15 is greater than the second slew rate threshold voltage at the second input terminal connected to the second voltage comparison circuit 15, the output terminal of the second voltage comparison circuit 15 outputs a high level signal, which is not a rising edge drive control signal. When the slew rate signal at the first input terminal connected to the second voltage comparison circuit 15 is less than the second slew rate threshold voltage at the second input terminal connected to the second voltage comparison circuit 15, the output terminal of the second voltage comparison circuit 15 outputs a low level signal, which is a rising edge drive control signal.

[0035] In this embodiment, when the rising edge driving circuit 16 receives the rising edge driving control signal, it indicates that the bus signal of the data bus 10 has entered the rising edge stage. At this time, the rising edge of the bus signal needs to be driven to quickly increase the voltage of the bus signal to a stable voltage value, stabilize the voltage of the bus signal as soon as possible, shorten the rising edge time, and improve the anti-interference of the bus signal. When the rising edge driving circuit 16 does not receive the rising edge driving control signal, it indicates that the bus signal has not yet entered the rising edge stage, the voltage of the bus signal is relatively stable, and there is no need to perform the rising edge driving process.

[0036] In an optional implementation, Figure 3 As shown, the rising edge driving circuit 16 includes: a second switch circuit T2, a resistor R12, and a resistor R16. The first control input terminal of the second switch circuit T2 is connected to the output terminal of the second voltage comparison circuit 15 via the resistor R12, the second control input terminal of the second switch circuit T2 is connected to the power supply, and the output terminal of the second switch circuit T2 is connected to the data bus 10 via the resistor R16; wherein, when the output terminal of the second voltage comparison circuit 15 outputs a rising edge driving control signal, the second switch circuit T2 is turned on, and the charging current of the data bus is increased to increase the voltage of the bus signal.

[0037] In this embodiment, the second switch circuit T2 may be a switch circuit composed of any power electronic devices, and the power electronic devices include but are not limited to: NPN transistor, PNP transistor, MOS transistor.

[0038] Preferably, the switch circuit T2 includes a PNP transistor, the base of the PNP transistor is the first control input terminal of the second switch circuit T2, the emitter of the PNP transistor is the second control input terminal of the second switch circuit T2, and the collector of the PNP transistor is the output terminal of the second switch circuit T2.

[0039] It should be noted that the rising edge driving current mainly depends on the resistance of resistor R16, which is inversely proportional to the magnitude of the driving current, and the resistance of resistor R16 should be set appropriately according to the actual situation. Resistor R12 is also set according to the actual situation.

[0040] The anti-interference circuit for the data bus 10 provided in the embodiment of the present application detects the slew rate signal of the bus signal through the slope detection circuit 11, and uses the filter circuit to suppress the high-frequency slope interference noise, and uses the first voltage comparison circuit 12 to determine whether the bus signal enters the falling edge stage, and when the bus signal enters the falling edge stage, the falling edge driving circuit is used to drive the falling edge of the bus signal, so that the voltage of the bus signal is quickly reduced to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the falling edge time is shortened. At the same time, the second voltage comparison circuit 15 is used to determine whether the bus signal enters the rising edge stage, and when the bus signal enters the rising edge stage, the rising edge driving circuit is used to drive the rising edge of the bus signal, so that the voltage of the bus signal is quickly increased to a stable voltage value, the voltage of the bus signal is stabilized as soon as possible, and the rising edge time is shortened. Thus, the anti-interference of the bus signal is improved, and reliable communication of long-distance transmission of the data bus is realized.

[0041] exist Figure 1 Based on the anti-interference circuit shown, Figure 4 As shown, the anti-interference circuit may also include: a first limiting circuit 17; the first limiting circuit 17 is connected between the first input terminal of the first voltage comparison circuit 12 and the output terminal of the second voltage comparison circuit 15, and is used to control the falling edge drive circuit 13 to stop working when the rising edge drive circuit 16 is working.

[0042] In an optional implementation, Figure 5 As shown, the first limiting circuit 17 includes a capacitor C14, a resistor R33, a resistor R34 and a diode D3 connected in series in sequence, one end of the capacitor C14 is connected between the resistor R33 and the resistor R34, the other end of the capacitor C14 is grounded, one end of the resistor R33 is connected to the first input end of the first voltage comparison circuit, and one end of the diode D3 is connected to the output end of the second voltage comparison circuit.

[0043] When the output terminal of the second voltage comparison circuit 15 outputs a low level, the rising edge drive circuit 16 works, and at the same time, the diode D3 is turned on, the capacitor C14 is discharged to a lower voltage, and the input voltage of the first input terminal of the first voltage comparison circuit 12 is reduced and is less than the first slew rate threshold voltage connected to the second input terminal of the first voltage comparison circuit 12, the first voltage comparison circuit 12 outputs a low level, and the falling edge drive circuit 13 does not work. In this way, it is ensured that when the rising edge drive circuit 16 works, the falling edge drive circuit 13 is controlled to stop working, thereby ensuring the stability of the anti-interference circuit.

[0044] exist Figure 1 Based on the anti-interference circuit shown, Figure 4As shown, the anti-interference circuit may further include: a second limiting circuit 18; the second limiting circuit 18 is connected between the first input terminal of the second voltage comparison circuit 15 and the output terminal of the first voltage comparison circuit 12, and is used to control the rising edge drive circuit 16 to stop working when the falling edge drive circuit 13 is working.

[0045] In an optional implementation, Figure 6 As shown, the second limiting circuit 18 includes: a capacitor C13, a resistor R32, a resistor R31 and a diode D2 connected in series in sequence, one end of the capacitor C13 is connected between the resistor R32 and the resistor R31, the other end of the capacitor C13 is grounded, one end of the resistor R32 is connected to the first input end of the second voltage comparison circuit, and one end of the diode D2 is connected to the output end of the first voltage comparison circuit.

[0046] When the output terminal of the first voltage comparison circuit 12 outputs a high level, the falling edge driving circuit 13 works, and at the same time, the diode D2 is turned on, the capacitor C13 is charged to a higher voltage, and the input voltage of the first input terminal of the second voltage comparison circuit 15 increases and is greater than the second slew rate threshold voltage connected to the first input terminal of the second voltage comparison circuit 15. The second voltage comparison circuit 15 outputs a high level, and at this time, the rising edge driving circuit 16 does not work. Therefore, when the falling edge driving circuit 13 works, the rising edge driving circuit 16 is controlled to stop working, ensuring the stability of the anti-interference circuit.

[0047] exist Figure 1 Based on the anti-interference circuit shown, Figure 4 As shown, the anti-interference circuit may also include: a third voltage comparison circuit 19; the third voltage comparison circuit 19 is connected between the data bus 10 and the first input terminal of the second voltage comparison circuit 15, and is used to receive a bus signal, compare the voltage of the bus signal with the low-level threshold voltage, and output a disable control signal to the second voltage comparison circuit 15 when the voltage of the bus signal is less than the low-level threshold voltage; the second voltage comparison circuit 15 is driven by the disable control signal to control the rising edge drive circuit 16 to stop working.

[0048] The rising edge stage is characterized by a sudden change of the I2C signal from a low voltage to a high voltage. In order to prevent the I2C response low-level step change and noise from causing erroneous I2C signal drive, the third voltage circuit detects that the amplitude of the low voltage of the I2C signal is very small, and disables the rising edge drive circuit 16. For example, the low level threshold is set to 600mV, and when the voltage of the I2C signal is less than 600mV, the rising edge drive circuit 16 is disabled.

[0049] In this embodiment, the third voltage comparison circuit 19 can be any existing circuit that can detect and compare voltages. Figure 7The output end of the third voltage comparison circuit 19 is connected to the first input end of the second voltage comparison circuit 15 via the diode D1 and the resistor R30. The first input end of the third voltage comparison circuit 19 is connected to the low-level threshold voltage, the second input end of the third voltage comparison circuit 19 is connected to the data bus 10, the output end of the third voltage comparison circuit 19 is connected to the anode of the diode D1, the cathode of the diode D1 is connected to one end of the resistor R30, and the other end of the resistor R30 is connected to the first input end of the second voltage comparison circuit 15.

[0050] Specifically, when the third voltage circuit detects that the amplitude of the low voltage of the I2C signal is less than the low level threshold voltage, the third voltage circuit outputs a high level, the diode D1 is turned on, the input voltage of the first input terminal of the second voltage comparison circuit 15 increases and is greater than the second slew rate threshold voltage connected to the first input terminal of the second voltage comparison circuit 15, the second voltage comparison circuit 15 outputs a high level, and the PNP transistor T2 is in the cut-off state, that is, the rising edge drive circuit 16 does not work, and will not drive the rising edge of the I2C signal. In addition, the third voltage circuit outputs a low level, the diode D1 is reversely cut off, and other drive control inputs are not affected.

[0051] The working principle of the anti-interference circuit is described in detail below with reference to a specific embodiment.

[0052] Figure 8 An exemplary I2C bus topology circuit and anti-interference circuit.

[0053] exist Figure 8 In the I2C bus topology circuit on the left, resistor R1, Schottky diode SD2, I2C signal (short-distance communication), constant current source IS1, Zener diode Z1 and Schottky diode SD1 are used to simulate the I2C bus signal with OD drain open-circuit output and pull-down current limiting capability. Resistors R5 and R6 are pull-up resistors for the I2C bus Source device and Sink receiving terminal device respectively. Capacitor C8 is used to simulate the equivalent capacitive reactance of long cables for long-distance transmission. Noise_P and Noise_N are used to simulate high-frequency noise interference. SW1 is a fixed-time control switch for simulation. In the simulation circuit, SW1 is disconnected within 0 to 50us, and the corresponding simulation output I2C signal (long-distance communication) is not driven. After 50us, SW1 is closed, and the corresponding simulation output I2C signal (long-distance communication) is driven. There is an obvious difference in the simulation output I2C signal (long-distance communication) before and after the SW1 switch is closed. Fig. 9 In the simulation results shown, the rising and falling edge times of the I2C signal without drive are very long, and the waveform is closer to a triangle wave. The rising and falling edge times of the I2C waveform with drive are short, and the waveform is closer to a square wave.

[0054] exist Figure 8 The I2C bus topology circuit on the left includes the I2C bus short-distance communication topology circuit and the I2C bus long-distance communication topology circuit. The I2C bus signal during short-distance communication can be collected at one end of the resistor R1, and the I2C bus signal during long-distance communication can be collected at one end of the resistor R6. When the switch SW1 is disconnected, the anti-interference circuit is disconnected from the I2C bus topology circuit, and the anti-interference circuit cannot drive the I2C bus signal. When the switch SW1 is closed, the anti-interference circuit is connected to the I2C bus topology circuit, and the anti-interference circuit can drive the I2C bus signal.

[0055] exist Figure 8 In the circuit shown, the voltage of VDD is 5 V and the voltage of VSS is 0 V. U1, U2, U3, and U4 are operational amplifiers.

[0056] The input end of the slope detection circuit 11 is connected to one end of the switch SW1 , and the output end of the slope detection circuit 11 is the output end of the operational amplifier U4 .

[0057] The filter circuit 14 includes a resistor R35 and a capacitor C15. The slew rate signal output from the filter circuit 14 is input to the first input terminal of the first voltage comparison circuit 12 via the resistor R9. The slew rate signal output from the filter circuit 14 is input to the first input terminal of the second voltage comparison circuit 15 via the resistor R18.

[0058] The first input terminal of the first voltage comparison circuit 12 is between resistors R24 and R9, the second input terminal of the first voltage comparison circuit 12 is connected to a power supply circuit (including resistors R28, C12, R14, C7, and R13) that can provide a first slew rate threshold voltage, and the output terminal of the first voltage comparison circuit 12 is connected to resistor R17.

[0059] The first input terminal of the second voltage comparison circuit 15 is between the resistors R23 and R18, the second input terminal of the second voltage comparison circuit 15 is connected to a power supply circuit (including resistors R29, C11, R4, C3, R3) that can provide a second slew rate threshold voltage, and the output terminal of the second voltage comparison circuit 15 is connected to the resistor R12.

[0060] Among them, resistors R9 and R24 form a hysteresis comparator, and resistors R18 and R23 form a hysteresis comparator. The main function of the hysteresis comparator is to prevent signal jitter.

[0061] The rising edge driving circuit 16 includes a second switch circuit T2, a resistor R12, and a resistor R16. The rising edge driving circuit 16 is connected to one end of the switch SW1 via the resistor R16. The rising edge driving circuit 16 is connected to the output end of the second voltage comparison circuit 15 via the resistor R12.

[0062] The falling edge driving circuit 13 includes a first switch circuit T1, a resistor R15, and a resistor R17. The falling edge driving circuit 13 is connected to one end of the switch SW1 via the resistor R15. The falling edge driving circuit 13 is connected to the output end of the first voltage comparison circuit 12 via the resistor R15.

[0063] The first limiting circuit 17 includes a capacitor C14, a resistor R33, a resistor R34 and a diode D3 connected in series in sequence, one end of the capacitor C14 is connected between the resistor R33 and the resistor R34, the other end of the capacitor C14 is grounded, one end of the resistor R33 is connected to the first input end of the first voltage comparison circuit, and one end of the diode D3 is connected to the output end of the second voltage comparison circuit. Figure 8 In the embodiment, the VF2 terminal marked in the first limiting circuit 17 and the VF2 terminal marked in the second comparison circuit are connected.

[0064] The second limiting circuit 18 includes: a capacitor C13, a resistor R32, a resistor R31 and a diode D2 connected in series, one end of the capacitor C13 is connected between the resistor R32 and the resistor R31, the other end of the capacitor C13 is grounded, one end of the resistor R32 is connected to the first input end of the second voltage comparison circuit, and one end of the diode D2 is connected to the output end of the first voltage comparison circuit. Figure 8 In the embodiment, the VF3 terminal marked in the second limiting circuit 18 and the VF3 terminal marked in the first comparison circuit are connected.

[0065] The first input end of the third comparison circuit is connected to a power supply circuit (the power supply circuit includes resistors R20, R21, R22, C9, and C10) that can provide a low-level threshold voltage. The second input end of the third comparison circuit is connected to one end of the switch SW1. The output end of the third comparison circuit is connected to the first input end of the second voltage comparison circuit 15 via a diode D1 and a resistor R30.

[0066] Figure 8 The specific working principle of the circuit shown is:

[0067] The slew rate signal output by the slope detection circuit 11 is input into the first input terminal of the first voltage comparison circuit 12 and the first input terminal of the second voltage comparison circuit 15 through the filter circuit 14 .

[0068] It should be noted that Figure 8 The middle slope detection circuit 11 is an inverting slope detection circuit 11. At this time, the voltage of the rising edge slew rate signal output by the inverting slope detection circuit 11 is a negative voltage, and the voltage of the falling edge slew rate signal is a positive voltage. The first slew rate threshold voltage is greater than the second slew rate threshold voltage.

[0069] Rising edge drive principle: When the voltage of the slew rate signal is less than the second slew rate threshold voltage, the second voltage comparison circuit 15 outputs a low level, the PNP transistor T2 is turned on, and the rising edge drive circuit 16 works to drive the rising edge of the I2C signal. At this time, the charging current flows into the I2C signal through R16, and the voltage of the I2C signal rises quickly to a stable voltage, shortening the rising edge time. At the same time, the diode D3 is turned on, the capacitor C14 is discharged to a lower voltage, and the input voltage of the first input terminal of the first voltage comparison circuit 12 is reduced and is less than the first slew rate threshold voltage connected to the second input terminal of the first voltage comparison circuit 12. The first voltage comparison circuit 12 outputs a low level, and the NPN transistor T1 is in the cut-off state, that is, the falling edge drive circuit 13 does not work, and will not drive the falling edge of the I2C signal. It can be understood that when the rising edge drive circuit 16 works, the first limiting circuit 17 can ensure that the falling edge drive circuit 13 must stop working.

[0070] In addition, when the voltage of the slew rate signal is greater than the second slew rate threshold voltage, the second voltage comparison circuit 15 outputs a high level, the PNP transistor T2 is turned off, and the rising edge driving circuit 16 does not work.

[0071] Falling edge drive principle: When the voltage of the slew rate signal is greater than the first slew rate threshold voltage, the first voltage comparison circuit 12 outputs a high level, the NPN transistor T1 is turned on, and the falling edge drive circuit 13 works to drive the falling edge of the I2C signal. At this time, the discharge current flows from the I2C signal to the ground point through R15, and the voltage of the I2C signal drops rapidly to a stable voltage, shortening the falling edge time. At the same time, the diode D2 is turned on, the capacitor C13 is charged to a higher voltage, the input voltage of the first input terminal of the second voltage comparison circuit 15 increases and is greater than the second slew rate threshold voltage connected to the first input terminal of the second voltage comparison circuit 15, the second voltage comparison circuit 15 outputs a high level, and the PNP transistor T2 is in the cut-off state, that is, the rising edge drive circuit 16 does not work, and will not drive the rising edge of the I2C signal. It can be understood that when the falling edge drive circuit 13 works, the second limiting circuit 18 can ensure that the rising edge drive circuit 16 must stop working.

[0072] In addition, when the voltage of the slew rate signal is less than the first slew rate threshold voltage, the first voltage comparison circuit 12 outputs a low level, the NPN transistor T1 is turned off, and the falling edge driving circuit 13 does not work.

[0073] The rising edge stage is characterized by a sudden change of the I2C signal from a low voltage to a high voltage. In order to prevent the I2C response low-level step change and noise from causing erroneous I2C signal drive, the third voltage circuit detects that the amplitude of the low voltage of the I2C signal is very small, and disables the rising edge drive circuit 16. For example, the low level threshold is set to 600mV, and when the voltage of the I2C signal is less than 600mV, the rising edge drive circuit 16 is disabled.

[0074] Specifically, when the third voltage circuit detects that the amplitude of the low voltage of the I2C signal is less than the low level threshold voltage, the third voltage circuit outputs a high level, the diode D1 is turned on, the input voltage of the first input terminal of the second voltage comparison circuit 15 increases and is greater than the second slew rate threshold voltage connected to the first input terminal of the second voltage comparison circuit 15, the second voltage comparison circuit 15 outputs a high level, and the PNP transistor T2 is in the cut-off state, that is, the rising edge drive circuit 16 does not work, and will not drive the rising edge of the I2C signal. In addition, the third voltage circuit outputs a low level, the diode D1 is reversely cut off, and other drive control inputs are not affected.

[0075] Fig. 9 is the waveform diagram of the key node. Fig. 9 In the figure, the first row shows the waveform of the I2C signal (short-distance communication). Since the I2C cable for short-distance communication is shorter, the I2C signal is less interfered with, the I2C signal is more stable, and the waveform of the I2C signal is a very standard square wave.

[0076] exist Fig. 9 In the figure, the second row shows the waveform of the I2C signal (long-distance communication). Due to the long length of the I2C cable for long-distance communication, the I2C signal is subject to greater interference. The I2C signal without anti-interference control is relatively unstable, and the waveform of the I2C signal is a triangular wave. After the anti-interference control is introduced, the I2C signal is relatively stable, and the waveform of the I2C signal is a relatively standard square wave.

[0077] exist Fig. 9 In FIG. 1 , the third row shows the waveform of the slew rate signal that has not been filtered by the filter circuit 14. The fourth row shows the waveform of the slew rate signal that has been filtered by the filter circuit 14. Obviously, filtering by the filter circuit 14 can suppress high-frequency noise.

[0078] exist Fig. 9 In FIG. 1 , the fifth row shows a waveform of the rising edge drive control signal output by the second voltage comparison circuit. The voltage amplitude of the high level is 5V, the voltage amplitude of the low level is 0V, when the rising edge drive control signal is 0V, the rising edge drive circuit 16 works, and when the rising edge drive control signal is 5V, the rising edge drive circuit 16 does not work.

[0079] exist Fig. 9 In FIG. 1 , the sixth row shows a waveform of the falling edge drive control signal output by the comparison circuit of the first circuit. The voltage amplitude of the high level is 5V, the voltage amplitude of the low level is 0V, when the falling edge drive control signal is 0V, the falling edge drive circuit 13 does not work, and when the falling edge drive control signal is 5V, the falling edge drive circuit 13 works.

[0080] exist Fig. 9 In the seventh row, the waveform of the driving current at the rising edge / falling edge is shown.

[0081] Depend on Fig. 9 It can be seen that after the rising edge / falling edge of the I2C signal for long-distance communication is driven and controlled, the noise signal of the I2C signal can be reduced, the stability of the I2C signal can be improved, and the long-distance transmission of the I2C signal can be achieved.

[0082] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. An anti-interference circuit for a data bus, characterized in that: include: A slope detection circuit, a filter circuit, a first voltage comparison circuit, a second voltage comparison circuit, a falling edge drive circuit and a rising edge drive circuit; The input end of the slope detection circuit is connected to the data bus, and is used to perform slope detection on the voltage of the bus signal on the data bus to obtain a slew rate signal, and output it to the filter circuit; The input end of the filter circuit is connected to the slope detection circuit, and is used for filtering the slew rate signal, and outputting the filtered slew rate signal to the first voltage comparison circuit and the second voltage comparison circuit; The first voltage comparison circuit is used to compare the filtered slew rate signal with a first slew rate threshold voltage, and output a falling edge plus drive control signal when the filtered slew rate signal is greater than the first slew rate threshold voltage; The falling edge driving circuit is used to increase the discharge current of the data bus to reduce the voltage of the bus signal according to the falling edge driving control signal; The second voltage comparison circuit is used to compare the filtered slew rate signal with a second slew rate threshold voltage, and output a rising edge drive control signal when the filtered slew rate signal is less than the second slew rate threshold voltage; The rising edge driving circuit is used to increase the charging current of the data bus to increase the voltage of the bus signal according to the rising edge driving control signal; The second slew rate threshold voltage is not equal to the first slew rate threshold voltage.

2. The circuit according to claim 1, characterized in that The falling edge driving circuit comprises a first switch circuit T1, a resistor R15 and a resistor R17, wherein a first control input terminal of the first switch circuit T1 is connected to an output terminal of the first voltage comparison circuit via the resistor R17, a second control input terminal of the first switch circuit T1 is grounded, and an output terminal of the first switch circuit T1 is connected to the data bus via the resistor R15; When the output terminal of the first voltage comparison circuit outputs the falling edge driving control signal, the first switch circuit T1 is turned on to increase the discharge current of the data bus to reduce the voltage of the bus signal.

3. The circuit according to claim 2, characterized in that The first switch circuit T1 includes an NPN transistor, the base of the NPN transistor is the first control input terminal of the first switch circuit T1, the emitter of the NPN transistor is the second control input terminal of the first switch circuit T1, and the collector of the NPN transistor is the output terminal of the first switch circuit T1.

4. The circuit according to claim 1, characterized in that The rising edge driving circuit comprises: a second switch circuit T2, a resistor R12, and a resistor R16, wherein a first control input terminal of the second switch circuit T2 is connected to an output terminal of the second voltage comparison circuit via the resistor R12, a second control input terminal of the second switch circuit T2 is connected to a power supply, and an output terminal of the second switch circuit T2 is connected to the data bus via the resistor R16; When the output terminal of the second voltage comparison circuit outputs the rising edge driving control signal, the second switch circuit T2 is turned on to increase the charging current of the data bus to raise the voltage of the bus signal.

5. The circuit according to claim 4, characterized in that The second switch circuit T2 includes a PNP transistor, the base of the PNP transistor is the first control input terminal of the second switch circuit T2, the emitter of the PNP transistor is the second control input terminal of the second switch circuit T2, and the collector of the PNP transistor is the output terminal of the second switch circuit T2.

6. The circuit according to claim 1, characterized in that Also includes: a first limiting circuit; The first limiting circuit is connected between the first input terminal of the first voltage comparison circuit and the output terminal of the second voltage comparison circuit, and is used to control the falling edge drive circuit to stop working when the rising edge drive circuit is working.

7. The circuit according to claim 6, characterized in that The first limiting circuit includes a capacitor C14, a resistor R33, a resistor R34 and a diode D3 connected in series in sequence, one end of the capacitor C14 is connected between the resistor R33 and the resistor R34, the other end of the capacitor C14 is grounded, one end of the resistor R33 is connected to the first input end of the first voltage comparison circuit, and one end of the diode D3 is connected to the output end of the second voltage comparison circuit.

8. The circuit according to claim 1, characterized in that Also includes: a second limiting circuit; The second limiting circuit is connected between the first input terminal of the second voltage comparison circuit and the output terminal of the first voltage comparison circuit, and is used to control the rising edge drive circuit to stop working when the falling edge drive circuit is working.

9. The circuit according to claim 8, characterized in that The second limiting circuit comprises: A capacitor C13, a resistor R32, a resistor R31 and a diode D2 connected in series in sequence, one end of the capacitor C13 is connected between the resistor R32 and the resistor R31, the other end of the capacitor C13 is grounded, one end of the resistor R32 is connected to the first input end of the second voltage comparison circuit, and one end of the diode D2 is connected to the output end of the first voltage comparison circuit.

10. The circuit according to claim 1, characterized in that Also included: a third voltage comparison circuit; The third voltage comparison circuit is connected between the data bus and the first input terminal of the second voltage comparison circuit, and is used to receive the bus signal, compare the voltage of the bus signal with the low-level threshold voltage, and output a disable control signal to the second voltage comparison circuit when the voltage of the bus signal is less than the low-level threshold voltage; the second voltage comparison circuit, under the drive of the disable control signal, controls the rising edge drive circuit to stop working.

11. The circuit according to claim 10, characterized in that The output terminal of the third voltage comparison circuit is connected to the first input terminal of the second voltage comparison circuit via a diode D1 and a resistor R30; The first input terminal of the third voltage comparison circuit is connected to the low-level threshold voltage, the second input terminal of the third voltage comparison circuit is connected to the data bus, the output terminal of the third voltage comparison circuit is connected to the anode of the diode D1, the cathode of the diode D1 is connected to one end of the resistor R30, and the other end of the resistor R30 is connected to the first input terminal of the second voltage comparison circuit.