CN112702176B - I2C bus power supply control circuit, control method and chip - Google Patents

I2C bus power supply control circuit, control method and chip Download PDF

Info

Publication number
CN112702176B
CN112702176B CN202011523660.XA CN202011523660A CN112702176B CN 112702176 B CN112702176 B CN 112702176B CN 202011523660 A CN202011523660 A CN 202011523660A CN 112702176 B CN112702176 B CN 112702176B
Authority
CN
China
Prior art keywords
value
bus
switching
voltage
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011523660.XA
Other languages
Chinese (zh)
Other versions
CN112702176A (en
Inventor
顾艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haiguang Information Technology Co Ltd
Original Assignee
Haiguang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haiguang Information Technology Co Ltd filed Critical Haiguang Information Technology Co Ltd
Priority to CN202011523660.XA priority Critical patent/CN112702176B/en
Publication of CN112702176A publication Critical patent/CN112702176A/en
Application granted granted Critical
Publication of CN112702176B publication Critical patent/CN112702176B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/10Current supply arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electronic Switches (AREA)

Abstract

The embodiment of the invention discloses an I2C bus power supply control circuit, a control method and a chip, which relate to the technical field of semiconductors and are convenient for accurately controlling the starting time of an active pull-up circuit. The I2C bus power supply control circuit comprises: the sampling circuit is used for acquiring an electric signal value of the bus; the switch control circuit is used for determining a switching element switching value control signal according to a comparison result of an electric signal value of the bus and a preset reference value, and sending the switching element switching value control signal to a switching element control end; and the switching device is used for controlling the signal to be switched on or switched off according to the switching value so as to control the bus to supply power. The invention is suitable for integrated circuits or equipment supporting I2C bus communication.

Description

I2C bus power supply control circuit, control method and chip
Technical Field
The invention relates to the technical field of semiconductors, in particular to an I2C bus power supply control circuit, a control method and a chip.
Background
An I2C (Inter-Integrated Circuit) bus is a communication protocol bus for connecting a microcontroller and its peripherals, and is mainly used for transmitting Serial data (Serial data). With the development of semiconductor technology, the transmission rate of serial data between I2C bus devices can reach a bit rate of 3.4Mbit/s (high speed HS mode), and the production cost of the interface circuit hardly increases.
The I2C bus is an open-drain (i.e. an open-drain of the MOS transistor) structure, and needs to be connected with a pull-up resistor, and the bus rise time is mainly determined by a capacitive load on the bus and a pull-up resistance value. However, in the I2C high-speed mode, the level rise time of the I2C bus cannot be satisfied only by the external pull-up resistor, that is, the high-speed mode cannot be achieved.
The inventor finds out in the process of realizing the invention: in some prior arts, an Active pull-up power supply module (i.e., an Active pull-up circuit) is connected to an I2C bus for accelerating a bus pull-up charging speed to implement a high-speed mode; however, the active pull-up power supply module is too short in turn-on time, which cannot effectively accelerate bus pull-up, and the average power consumption is increased due to too long turn-on time.
Disclosure of Invention
In view of this, embodiments of the present invention provide an I2C bus power supply control circuit, a control method, and a chip, which are convenient to accurately control the on-time of an active pull-up circuit.
In order to achieve the purpose of the invention, the following technical scheme is adopted:
in a first aspect, an embodiment of the present invention provides an I2C bus power supply control circuit, including: the sampling circuit comprises a sampling circuit, a switch control circuit and a switch device, wherein the input end of the sampling circuit is connected with a bus, the output end of the sampling circuit is connected with the input end of the switch control circuit, the output end of the switch control circuit is connected with the control end of the switch device, the input end of the switch device is connected with a power supply, and the output end of the switch device is connected with the bus; the sampling circuit is used for acquiring the electric signal value of the bus; the switch control circuit is used for determining a switching value control signal of the switching device according to a comparison result of the electric signal value of the bus and a preset reference value; sending the switching value control signal to a control end of the switching device; and the switching device is used for controlling the signal to be switched on or switched off according to the switching value.
With reference to the first aspect, in a first implementation manner of the first aspect, the sampling circuit is specifically configured to obtain a current value of the bus; the switch control circuit comprises a current-voltage conversion unit and a switching value determination unit; the current-voltage conversion unit is used for converting the current value of the bus into the voltage value of the bus; the switching value determining unit is configured to determine a switching value control signal of the switching device according to a comparison result between the voltage value of the bus and a preset reference value, where the preset reference value is a preset voltage threshold.
With reference to the first aspect or the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the acquiring an electrical signal value of the bus includes: acquiring a voltage value of the bus; the switching control circuit includes a switching amount determination unit including: the switching value determining unit is configured to determine a switching value control signal of the switching device according to a comparison result between the voltage value of the bus and a preset reference value, where the preset reference value is a preset voltage threshold.
With reference to the first or second embodiment of the first aspect, in a third embodiment of the first aspect,
the switching value determining unit is further used for reading a first voltage value of the bus at a first moment and a second voltage value of the bus at a second moment from the voltage values of the bus; performing a difference operation on the first voltage value and the second voltage value; comparing the result of the difference operation with the preset voltage threshold value to obtain a comparison result; determining the switching device switching value control signal based on the comparison result.
With reference to any one of the first to third embodiments of the first aspect, in a fourth embodiment of the first aspect,
the switch control circuit comprises a switching value determining unit; the switching value determining unit is configured to determine that the switching value control signal of the switching device is a conducting signal if the electrical signal value is judged to be greater than the preset reference value; and if the electric signal value is judged to be less than or equal to the preset reference value, determining the switching element switching value control signal as a switching-off signal.
In a second aspect, an embodiment of the present invention provides an I2C bus power supply control method, where at least one power supply end of a bus is connected to an active switching device; the method comprises the following steps: acquiring an electric signal value of the bus; determining a switching value control signal of the switching device according to a comparison result of the electric signal value of the bus and a preset reference value; and sending the switching value control signal to a control end of the switching device so that the switching device is switched on or off according to the switching value control signal.
With reference to the second aspect, in a first implementation manner of the second aspect, the acquiring the electrical signal value of the bus includes: acquiring a current value of the bus; the determining a switching value control signal of the switching device according to a comparison result of the electrical signal value of the bus and a preset reference value includes: converting the current value of the bus into a voltage value of the bus; and determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value, wherein the preset reference value is a preset voltage threshold value.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the acquiring the electrical signal value of the bus includes: acquiring a voltage value of the bus; the determining a switching value control signal of the switching device according to a comparison result of the electrical signal value of the bus and a preset reference value includes: and determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value, wherein the preset reference value is a preset voltage threshold value.
With reference to the first or second implementation manner of the second aspect, in a third implementation manner of the second aspect, the determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value includes: reading a first voltage value of the bus at a first moment and a second voltage value of the bus at a second moment from the voltage values of the bus; performing a difference operation on the first voltage value and the second voltage value; comparing the result of the difference operation with the preset voltage threshold value to obtain a comparison result;
determining the switching device switching value control signal based on the comparison result.
With reference to any one of the first to third embodiments of the second aspect, in a fourth embodiment of the second aspect, the determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus line and a preset reference value includes: if the electric signal value is judged to be larger than the preset reference value, determining that the switching element switching value control signal is a conducting signal; and if the electric signal value is judged to be less than or equal to the preset reference value, determining the switching element switching value control signal as a switching-off signal.
In a third aspect, a further embodiment of the present invention provides an electronic device, which has an I2C bus interface and a power supply module for supplying power to the I2C bus interface, where the power supply module includes any one of the I2C bus power supply control circuits in the first aspect, and an input end of a sampling circuit of the power supply control circuit and an output end of a switching device are respectively connected to the bus interface.
With reference to the third aspect, in a first implementation manner of the third aspect, the electronic device is a chip.
According to the I2C bus power supply control circuit, the control method and the chip, a bus electric signal value is obtained through a sampling circuit, the switch control circuit determines a switching element switching value control signal according to a comparison result of the bus electric signal value and a preset reference value, and the switching element switching value control signal is sent to a switching element control end; and the switching element controls the signal to be switched on or switched off according to the switching value so as to control the bus to supply power. The on-off time of the active pull-up circuit at the power supply end of the I2C bus is controlled based on the control signal determined by the bus electric signal value acquired in real time, so that the on-off time of the active pull-up circuit is conveniently and accurately controlled, the requirement of accelerated charging of the capacitor load on the I2C bus can be self-adapted, and the power consumption can be effectively saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic circuit block diagram of an embodiment of an I2C bus power supply control circuit according to the present invention;
FIG. 2A is a schematic circuit block diagram of an I2C bus power supply control circuit according to an embodiment of the present invention;
FIG. 2B is a schematic circuit block diagram of another embodiment of an I2C bus power supply control circuit according to the present invention;
FIG. 3 is a schematic circuit topology diagram of an embodiment of an I2C bus power supply control circuit of the present invention;
FIG. 4 is a schematic diagram of an I2C bus-based communication circuit of a master device and a slave device having an I2C bus power supply control circuit according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of signal transmission and handshaking in the communication process between the master device and the slave device in FIG. 4;
FIG. 6A is a schematic diagram of a waveform of a change in an I2C bus signal according to some embodiments of the prior art;
FIG. 6B is a schematic diagram of a waveform of an I2C bus signal variation according to some embodiments of the I2C bus power supply control circuit of the present invention;
FIG. 7 is a flowchart illustrating an I2C bus power supply control method according to an embodiment of the present invention;
FIG. 8 is a schematic flowchart illustrating a method for controlling power supply to an I2C bus according to another embodiment of the present invention;
FIG. 9 is a schematic flowchart illustrating a method for controlling power supply to an I2C bus according to another embodiment of the present invention;
FIG. 10 is a schematic flowchart illustrating a method for controlling power supply to an I2C bus according to another embodiment of the present invention;
fig. 11 is a schematic flowchart illustrating an electrical control method for I2C bus power supply according to another embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The I2C bus power supply control circuit provided in the embodiment of the present invention is suitable for development and design of a chip (sometimes also referred to as an Integrated circuit), and particularly, is suitable for an Integrated circuit or a device supporting I2C bus communication. The high-speed mode of the I2C bus is convenient to realize, and the average power consumption can be controlled in an adaptive mode.
Example one
FIG. 1 is a schematic circuit block diagram of an embodiment of an I2C bus power supply control circuit according to the present invention; referring to fig. 1, the I2C bus power supply control circuit includes: sampling circuit, switch control circuit and switching device.
The I2C bus is simple in physical connection and respectively consists of an SDA (serial data line), an SCL (serial clock line) and a pull-up resistor. The communication principle is to generate signals required by an I2C bus protocol for data transmission through the control of high-low level timing of SCL and SDA lines. In the bus idle state, the two lines are typically pulled high by the pull-up resistor connected above, holding a high level.
The information is transmitted between devices, circuits or equipment connected to the I2C bus through the bus, wherein the device, circuit or equipment for transmitting the information is a master device or a host, and the device, circuit or equipment for receiving the information is a slave device or a slave.
For convenience of description, only the data line SDA of the I2C bus is illustrated in the figure, and it is understood that the serial clock line SCL is also applicable to the scheme of the embodiment of the present invention.
The sampling circuit input is used for being connected with the bus, the sampling circuit output with the switching control circuit input is connected, the switching control circuit output with the switching device control end is connected, the switching device input is connected with power supply, the switching device output be used for with bus connection.
The sampling circuit is used for acquiring the electric signal value of the bus. And the switch control circuit is used for determining the switching element switching value control signal according to the comparison result of the electric signal value of the bus and a preset reference value, and sending the switching element switching value control signal to the control end of the switching element.
The electrical signal may comprise a current signal or a voltage signal.
In some embodiments, the preset reference value is a preset Voltage Threshold (VTH).
Referring to fig. 2A, in some embodiments, the electrical signal value is a current value; the sampling circuit is specifically used for acquiring a current value of the bus.
The switch control circuit comprises a current-voltage conversion unit and a switching value determination unit; the current-voltage conversion unit is used for converting the current value of the bus into the voltage value of the bus; and the switching value determining unit is used for determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value.
In some embodiments, the preset voltage threshold is a power supply ground voltage, i.e., 0v; after the current value of the bus is obtained, the current is converted into voltage, and specifically, the sampled current value can be converted into a voltage value by adopting a sampling resistor, so that the switching control circuit indirectly determines a switching value control signal according to the comparison between the bus current value and a preset voltage value.
Referring to fig. 2B, in some embodiments, the electrical signal may include a voltage signal, and the sampling circuit is further configured to directly obtain the voltage value of the I2C bus, so that a current-voltage conversion process is not required, and the timeliness of the power supply control may be improved to some extent.
After the voltage value of the bus is obtained, the switching value determining unit is configured to determine a switching value control signal of the switching device according to a comparison result between the voltage value of the bus and a preset reference value.
The switch control circuit is also used for sending the switching value control signal to a control end of the switching device after determining the switching value control signal; and the switching device is used for switching on or off according to the switching value control signal after receiving the switching value control signal so as to control the bus to supply power.
The switch device is a metal-oxide-semiconductor (semiconductor) field effect transistor (MOS tube for short); and can also be a triode. For clarity of description, the term "MOS transistor" will be used hereinafter, unless otherwise specified, to refer to a switching device.
It will be appreciated that some capacitance (not shown) may be connected to the I2C bus, since the I2C bus line capacitance is charged through the low impedance active pull-up circuit (i.e., including the switching device in this embodiment) at a much greater rate than the I2C bus line capacitance is powered through the external pull-up resistor alone. Therefore, by using the power supply control circuit of the embodiment to charge the capacitor on the bus, the bus transmission rate between all circuits or devices supporting I2C communication is accelerated, so as to implement the I2C communication high-speed mode.
According to the I2C bus power supply control circuit provided by the embodiment of the invention, an electric signal value of a bus is obtained through a sampling circuit, the switching control circuit determines a switching element switching value control signal according to a comparison result of the electric signal value of the bus and a preset reference value, and the switching element switching value control signal is sent to a switching element control end; and the switching element controls the signal to be switched on or switched off according to the switching value so as to control the bus to supply power. The on-off time of the active pull-up circuit at the power supply end of the I2C bus is controlled based on the control signal determined by the bus electric signal value acquired in real time, so that the on-off time of the active pull-up circuit is conveniently and accurately controlled, the requirement of accelerated charging of the capacitor load on the I2C bus can be self-adapted, and the power consumption can be effectively saved.
Referring to fig. 1 to 3, in some embodiments, the power supply control circuit further includes a pull-down circuit, an upper end of the pull-down circuit is connected to the I2C bus, and a lower end of the pull-down resistor is connected to a power ground. The pull-down circuit comprises an NMOS tube NGO and a resistor Rs; the NMOS tube NGO is a switching device, and the resistor Rs mainly plays a role in current limiting protection. When the pull-up switch device is turned off, a control signal is sent to the pull-down circuit to enable the pull-down switch device (for convenience of distinguishing description, the switch device of the pull-down circuit is called as the pull-down switch device) to be turned on, and the current supplies power to the capacitor on the I2C bus from bottom to top to maintain the low level state of the bus.
Referring to fig. 3, in some embodiments, the switching value determining unit may include a comparator or an operational amplifier comp, which respectively includes a non-inverting input terminal +, an inverting input terminal, and an output terminal, wherein the sampling circuit is further configured to convert the current magnitude of the bus into a voltage value; or directly acquiring the voltage value of the bus, and then outputting the voltage value to the non-inverting input end and the inverting input end of the switch control circuit.
In this embodiment, after the voltage value is compared with the threshold voltage, a high level or a low level is output, that is, a switching value control signal 1 or 0 is output. Specifically, the switching value determining unit is configured to determine that the switching value control signal of the switching device is a conducting signal, that is, a high level 1, if it is determined that the electrical signal value is greater than the preset reference value after performing a comparison operation based on the voltage value and a preset voltage threshold. If the electric signal value is judged to be less than or equal to the preset reference value, determining that the switching element switching value control signal is a turn-off signal, namely low level 0; wherein the preset reference value is a preset voltage threshold.
For the case that the preset reference value is a preset voltage threshold, in other embodiments where a switching control amount is determined to implement power supply control on an I2C bus, the switching amount determining unit is further configured to read a first voltage value of the bus at a first time and a second voltage value of the bus at a second time from voltage values of the bus; carrying out difference operation on the first voltage value and the second voltage value; comparing the result of the difference operation with a preset voltage threshold value to obtain a comparison result; determining the switching device switching value control signal based on the comparison result.
In this embodiment, the switch control circuit determines the power supply state of the I2C bus by reading the voltage values of the bus at different times and comparing the difference between the voltage values at different times with a preset voltage threshold, where the preset voltage threshold is 0, for example; if the difference value between the first voltage value and the second voltage value is a negative number, namely the voltage is increased, the I2C bus is in a charging state for the capacitor on the bus in a power supply mode, and the switch control circuit outputs a switch conduction starting signal; otherwise, the capacitor on the I2C bus is in a discharge state, and the switch control circuit outputs a switch disconnection signal.
In some embodiments, the first voltage value and the second voltage value obtained at different times may also be directly compared, where if the first time is smaller than the second time, if the first voltage value is greater than the second voltage value, it is determined that the voltage is increasing, which indicates that the I2C bus is in a charging state for the capacitor on the bus in the power supply mode, and the switch control circuit outputs a switch conduction start signal; otherwise, the voltage is determined to be reduced, the capacitor on the I2C bus is in a discharge state, and the switch control circuit outputs a switch off signal.
Of course, in the above-mentioned embodiment, when the preset voltage threshold is 0v, the switching value control signal is determined substantially by comparing the first voltage value with the second voltage value.
In the present embodiment, when performing the difference calculation, the first voltage value is a decrement, and the second voltage value is a decrement.
It is understood that the decrement and the subtree can be exchanged, that is, the second voltage value is the decrement, and the first voltage value is the subtree; after the exchange, the standard for determining the switch control quantity is opposite to the judgment standard, namely if the difference value is a positive number, the switch control circuit outputs a switch conduction starting signal; otherwise, it is a switch off signal.
In still other embodiments of determining the switch control amount to control the bus power supply, the preset reference value is a preset voltage slope threshold; the sampling circuit is further used for acquiring a voltage value of the bus or converting the current of the bus into the voltage value.
The switch control circuit is specifically used for reading a first voltage value of a sampled bus at a first moment and a second voltage value of the sampled bus at a second moment; differentiating the voltage change at the first moment and the second moment to obtain a voltage slope; comparing the voltage slope with a preset voltage slope threshold value to obtain a comparison result; determining the switching device switching value control signal based on the comparison result.
The voltage slope is the steepness of the rising edge or the falling edge of the signal, and whether the signal is at the rising edge or the falling edge can also be determined according to the voltage slope. For example, the voltage slope is greater than 0 at the rising edge, the voltage slope is less than 0 at the falling edge.
In the embodiment of the invention, the charging and discharging states of the capacitor on the bus can be determined by obtaining the voltage slope of the bus at a certain time interval, so as to control the on and off of the pull-up MOS tube MPO. If the voltage slope is greater than 0, the power supply is in a charging state, a switching device starting signal is output, and the pull-up MOS tube MPO is started; otherwise, a switch-off signal of the switching device is output, and the pull-up MOS tube MPO is closed. Wherein, the pull-up MOS tube is a PMOS tube.
In some realizable embodiments, the switching amount determination unit includes: the sampling circuit comprises a sampling resistor Rt, the non-inverting input end and the inverting input end of the comparator or the operational amplifier COMPO are respectively connected to two ends of the sampling resistor Rt, and the output end of the comparator or the operational amplifier COMPO is connected with the control end of the MOS tube MPO of the switching device through the inverter INVO.
In other embodiments, as shown in fig. 3, the switch control circuit comprises: the sampling circuit comprises a sampling resistor Rt, the non-inverting input end and the inverting input end of the comparator or the operational amplifier COMPO are respectively connected to two ends of the sampling resistor Rt, and the output end of the comparator or the operational amplifier COMPO is connected with the control end of the switching device through the inverter INVO; the grounding end of the sampling circuit is connected in series with a capacitor Ct, and the lower polar plate of the capacitor Ct is grounded.
In this embodiment, the capacitor Ct is connected in series with the ground terminal of the sampling resistor Rt in the sampling circuit, so that the leakage current of the sampling resistor Rt can be reduced; and secondly, the sampling resistor Rt can be realized by selecting a resistor with a smaller resistance value. Of course, the capacitor also functions as a low pass filter to some extent.
When the switch control circuit comprises a comparator, the comparator is preferably a hysteresis comparator, also referred to as a hysteresis comparator. The anti-interference capability of the bus can be enhanced by selecting the hysteresis comparator.
In some embodiments, the switch control circuit is further configured to determine the direction of the current based on the comparison result after acquiring the value of the electrical signal of the bus. Specifically, the comparison determination can be directly performed by comparing the electric signal value with a preset reference value; the current may also be converted to a voltage, or the voltage may be directly obtained and determined based on a comparison of the voltage with a preset reference value (here, a preset voltage threshold).
Illustratively, in an embodiment where the switching value determining unit includes a comparator or an operational amplifier comp, referring to fig. 3, after the comparator or the operational amplifier comp performs voltage comparison, if Δ V > 0, it is determined that the current ic is directed downward, low level 0 is output, high level 1 is output after passing through an inverter INVO, mos transistor MPO is turned on, and power is supplied to I2C bus; if the delta V is less than 0, determining that the current ic is upward in direction, and outputting a high level 1; when Δ V =0, the current ic =0, and a high level 1 is output. And after passing through the inverter INVO, a low level 0 is output, the MOS tube MPO is switched off, and the I2C bus is supplied with power only by an external pull-up resistor.
To help understand the technical solutions and technical effects of the embodiments of the present invention, a communication process between a master device and a slave device is described below with reference to a specific I2C bus-based communication example:
FIG. 4 is an I2C-based master/slave device with an I2C bus power supply control circuit according to an embodiment of the present invention
A bus communication circuit schematic diagram; fig. 5 is a schematic diagram of signal transmission and handshaking in the communication process between the master device and the slave device in fig. 4. Referring to fig. 4 and 5, in general, I2C bus communications include data transfer and handshaking; in the data transmission and handshaking process, the power supply control circuit controls the power supply of the I2C bus. Taking the data line SDA as an example, as shown in fig. 4, t0 to t2 are data transmission phases, and time t2 is a handshake phase. At the time of t0, the Master device Master control signal NGO is from 0- > 1, the Slave device Slave control signal NG1=0, the voltage of the data line SDA is from VCC- > 0, at this time, the ic current direction is upward, Δ V is less than 0, pgo =1, the pull-up MOS transistor MPO is turned off, and the pull-up MOS transistor MPO does not rapidly charge the capacitor on the data line SDA.
At the time t1, the Master device Master control signal NGO is from 1- > 0, the Slave device Slave control signal NG1=0, the data line SDA is from 0- > 1, at this time, the ic current direction is downward, Δ V > 0, pgo =0, the pull-up MOS transistor MPO is turned on, and the pull-up MOS transistor MPO charges the capacitor on the bus SDA rapidly.
When the bus voltage rises to be close to VCC, ic ≈ 0 and Δ V ≈ 0 (the voltage slope is also close to 0), the output of the hysteresis comparator is 0, PGO =1, and the pull-up MOS transistor MPO is turned off. At the time of t2, a Master control signal NG is controlled from 1- > 0, a Slave control signal is controlled from 0- > 1, at the moment, the data line SDA maintains a low level, ic is approximately equal to 0, delta V is approximately equal to 0, and the pull-up MOS tube MPO is closed.
As can be seen from a comparison between fig. 6A and fig. 6B, the steepness of the rising edge and the falling edge in fig. 6A is smaller than that in fig. 6B. Therefore, the power supply control method for the I2C bus provided by the embodiment of the invention can accelerate the pull-up speed of the I2C bus.
According to the I2C bus power supply control method provided by the embodiment of the invention, whether the active pull-up circuit (specifically, the active pull-up switching device) is started or not is determined by detecting the electrical signal value of the I2C bus, and no additional control signal is needed. The on-time and the off-time of the active pull-up circuit can be accurately controlled, and the power consumption can be saved while the I2C bus pull-up is accelerated.
Example two
The embodiment of the invention also provides an I2C bus power supply control method, which is suitable for integrated circuits and equipment supporting I2C bus communication, is convenient for accurately controlling the starting time of an active pull-up circuit, and is beneficial to reducing the average power consumption while realizing the high-speed mode of the I2C bus.
FIG. 7 is a flowchart illustrating an I2C bus power supply control method according to an embodiment of the present invention; referring to fig. 1 and 7, an active switching device is connected to at least one power supply terminal of the I2C bus; the method comprises the following steps:
s110, acquiring an electric signal value of the bus;
s120, determining a switching element switching value control signal according to a comparison result of the electric signal value of the bus and a preset reference value;
s130, sending the switching value control signal to the control end of the switching device so that the switching device is switched on or switched off according to the switching value control signal.
According to the I2C bus power supply control method provided by the embodiment of the invention, the electrical signal value of the I2C bus is obtained, and the switching value control signal of the switching element is determined according to the comparison result of the electrical signal value of the bus and the preset reference value; and sending the switching value control signal to the control end of the switching element so that the switching element is switched on or off according to the switching value control signal to control the bus to supply power. The on-off time of the active pull-up circuit at the power supply end of the I2C bus is controlled based on the control signal determined by the acquired I2C bus electric signal value, so that the on-off time of the active pull-up circuit is conveniently and accurately controlled, the requirement of accelerated charging of a capacitor load on the I2C bus can be self-adapted, and the power consumption can be effectively saved.
FIG. 8 is a schematic flowchart illustrating a method for controlling power supply to an I2C bus according to another embodiment of the present invention; referring to fig. 8, in further embodiments, the preset reference value is a preset voltage threshold, and the S110 acquiring the electrical signal value of the bus includes: S111A, acquiring a current value of the bus;
in step S120, determining a switching value control signal of the switching device according to a comparison result between the electrical signal value of the bus and a preset reference value includes:
s122, converting the current value of the bus into a voltage value of the bus;
and S124, determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value.
As previously mentioned, in some alternative embodiments, referring to FIG. 9, the method S111A in FIG. 8 may also be S111B: and acquiring the voltage value of the bus. For example, the bus voltage is directly sampled, so that the steps of subsequent signal processing can be reduced, and the timeliness of switch control can be improved.
Step S120, determining a switching value control signal of the switching device according to a comparison result between the electrical signal value of the bus and a preset reference value, including: and S124, determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value.
In this embodiment, specifically, the determining the switching value control signal of the switching device according to the comparison result of the voltage value of the bus and the preset reference value includes:
if the electric signal value is judged to be larger than the preset reference value, determining that the switching element switching value control signal is a conducting signal;
and if the electric signal value is judged to be less than or equal to the preset reference value, determining the switching element switching value control signal as a switching-off signal.
FIG. 10 is a schematic flowchart illustrating a power supply control method for an I2C bus according to another embodiment of the present invention; referring to fig. 10, in further embodiments, the determining, at S120, a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value further includes: S123B, reading a first voltage value of the bus at a first moment and a second voltage value of the bus at a second moment from the voltage values of the bus; S125B, performing difference operation on the first voltage value and the second voltage value; S127B, comparing the result of the difference operation with a preset voltage threshold value to obtain a comparison result; and S129B, determining a switching value control signal of the switching device based on the comparison result.
And the first time is less than the second time, the first voltage value is a decrement, and the second voltage value is a decrement. Specifically, in step S127B, comparing the difference operation result with a preset voltage threshold, and obtaining a comparison result includes: if the difference result is judged to be greater than or equal to the preset voltage threshold, determining that the switching element switching value control signal is closed; and if the difference result is judged to be smaller than the preset voltage threshold, determining that the switching element switching value control signal is turned on. For example, if the preset voltage threshold is 0V and the difference result is positive or 0, i.e. greater than or equal to the preset voltage threshold, the switch control amount is determined to be off; and if the difference result is a negative number, namely the difference result is smaller than the preset voltage threshold, determining that the switch control quantity is on.
FIG. 11 is a schematic flowchart illustrating a method for controlling power supply to an I2C bus according to another embodiment of the present invention; referring to fig. 11, in some embodiments, the preset reference value is a preset voltage slope threshold; the determining the switching value control signal of the switching device according to the comparison result of the voltage value of the bus and the preset reference value includes: S123C, reading a first voltage value of the sampled bus at a first moment and a second voltage value of the sampled bus at a second moment from the voltage values of the bus; S125C, differentiating the voltage changes at the first moment and the second moment to obtain a voltage slope; S127C, comparing the voltage slope with a preset voltage slope threshold value to obtain a comparison result; and S129C, determining the switching element switching value control signal based on the comparison result.
In still other embodiments, before sending the switching amount control signal to the switching device control terminal, the method further comprises: and the phase of the switching value control signal is reversed by 180 degrees.
Specifically, the output ends of the comparator, the operational amplifier and the like can be connected with an inverter INVO to realize the phase inversion of the signals.
For each embodiment provided by the present invention, since the first embodiment is based on the same technical concept, the technical scheme and the technical effect are substantially the same, and the related points can be referred to each other, and are not repeated for clarity and brevity of description.
EXAMPLE III
Based on the same technical concept as the first and second embodiments, the embodiment of the present invention provides an electronic device, which has an I2C bus interface and a power supply module for supplying power to the I2C bus interface, where the power supply module includes the I2C bus power supply control circuit described in any one of the embodiments, and an input end of a sampling circuit of the power supply control circuit and an output end of a switching device are respectively connected to the bus interface.
The electronic device may include, but is not limited to, a chip.
The electronic equipment provided by the embodiment of the invention supports I2C communication, can realize the quick charging of the capacitor on the I2C bus by pulling up the active device, and can accurately judge whether the I2C bus needs to be started or not by the bus power supply control circuit so as to accelerate the pull-up closing process of the I2C bus and realize the high-speed mode of the I2C bus; and when the pull-up charging is close to saturation, the active switching device can be accurately and timely closed, so that the power consumption can be reduced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same or similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments.
For convenience of description, the above relay control system is described separately in terms of functional division into various functional units/circuits/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may also be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. An I2C bus power supply control circuit, which is suitable for a chip, comprises: the sampling circuit comprises a sampling circuit, a switch control circuit and a switch device, wherein the input end of the sampling circuit is connected with a bus, the output end of the sampling circuit is connected with the input end of the switch control circuit, the output end of the switch control circuit is connected with the control end of the switch device, the input end of the switch device is connected with a power supply, and the output end of the switch device is connected with the bus;
the sampling circuit is used for acquiring the electric signal value of the bus;
the switch control circuit is used for determining a switching value control signal of the switching device according to a comparison result of the electric signal value of the bus and a preset reference value;
sending the switching value control signal to a control end of the switching device;
the switch device is used for controlling the on or off of the signal according to the switching value so as to accurately control the on time of the active pull-up circuit, wherein the active pull-up circuit is mainly formed by connecting the input end of the switch device with a power supply.
2. The control circuit according to claim 1, wherein the sampling circuit is configured to obtain a current value of the bus;
the switch control circuit comprises a current-voltage conversion unit and a switching value determination unit;
the current-voltage conversion unit is used for converting the current value of the bus into the voltage value of the bus;
the switching value determining unit is configured to determine a switching value control signal of the switching device according to a comparison result between the voltage value of the bus and a preset reference value, where the preset reference value is a preset voltage threshold.
3. The control circuit of claim 1, wherein said obtaining the value of the electrical signal of the bus comprises: acquiring a voltage value of the bus;
the switching control circuit includes a switching amount determination unit including:
the switching value determining unit is configured to determine a switching value control signal of the switching device according to a comparison result between the voltage value of the bus and a preset reference value, where the preset reference value is a preset voltage threshold.
4. The control circuit according to claim 2 or 3, wherein the switching value determining unit is further configured to read a first voltage value of the bus at a first time and a second voltage value of the bus at a second time from the voltage values of the bus;
performing a difference operation on the first voltage value and the second voltage value;
comparing the result of the difference operation with the preset voltage threshold value to obtain a comparison result;
determining the switching device switching value control signal based on the comparison result.
5. The control circuit according to claim 1, wherein the switching control circuit includes a switching amount determination unit;
the switching value determining unit is configured to determine that the switching value control signal of the switching device is a conducting signal if the electrical signal value is judged to be greater than the preset reference value;
and if the electric signal value is judged to be less than or equal to the preset reference value, determining the switching element switching value control signal as a switching-off signal.
6. The power supply control method of the I2C bus is characterized by being applicable to a chip, wherein at least one power supply end of the bus is connected with an active switch device; the method comprises the following steps:
acquiring an electric signal value of the bus;
determining a switching value control signal of the switching device according to a comparison result of the electric signal value of the bus and a preset reference value;
and sending the switching value control signal to a control end of the switching device so that the switching device is switched on or off according to the switching value control signal to accurately control the on-time of an active pull-up circuit, wherein the active pull-up circuit mainly comprises the active switching device.
7. The control method of claim 6, wherein said obtaining the electrical signal value of the bus comprises: acquiring a current value of the bus;
the determining a switching value control signal of the switching device according to a comparison result of the electrical signal value of the bus and a preset reference value includes:
converting the current value of the bus into a voltage value of the bus;
and determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value, wherein the preset reference value is a preset voltage threshold value.
8. The control method of claim 6, wherein said obtaining the electrical signal value of the bus comprises: acquiring a voltage value of the bus;
the determining a switching value control signal of the switching device according to a comparison result of the electrical signal value of the bus and a preset reference value includes:
and determining a switching value control signal of the switching device according to a comparison result of the voltage value of the bus and a preset reference value, wherein the preset reference value is a preset voltage threshold value.
9. The control method according to claim 7 or 8, wherein the determining of the switching amount control signal of the switching device according to the comparison result of the voltage value of the bus line and a preset reference value comprises:
reading a first voltage value of the bus at a first moment and a second voltage value of the bus at a second moment from the voltage values of the bus;
performing a difference operation on the first voltage value and the second voltage value;
comparing the result of the difference operation with the preset voltage threshold value to obtain a comparison result;
determining a switching amount control signal of the switching device based on the comparison result.
10. The control method according to claim 6, wherein the determining the switching value control signal of the switching device according to the comparison result of the voltage value of the bus line and a preset reference value comprises:
if the electric signal value is judged to be larger than the preset reference value, determining that the switching element switching value control signal is a conducting signal;
and if the electric signal value is judged to be less than or equal to the preset reference value, determining the switching element switching value control signal as a switching-off signal.
11. An electronic device, characterized in that, it has an I2C bus interface and a power supply module for supplying power to the I2C bus interface, the power supply module includes the I2C bus power supply control circuit of any one of claims 1 to 5, the input end of the sampling circuit of the power supply control circuit and the output end of the switching device are respectively connected with the bus interface.
12. The electronic device of claim 11, wherein the electronic device is a chip.
CN202011523660.XA 2020-12-22 2020-12-22 I2C bus power supply control circuit, control method and chip Active CN112702176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011523660.XA CN112702176B (en) 2020-12-22 2020-12-22 I2C bus power supply control circuit, control method and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011523660.XA CN112702176B (en) 2020-12-22 2020-12-22 I2C bus power supply control circuit, control method and chip

Publications (2)

Publication Number Publication Date
CN112702176A CN112702176A (en) 2021-04-23
CN112702176B true CN112702176B (en) 2022-11-29

Family

ID=75509997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011523660.XA Active CN112702176B (en) 2020-12-22 2020-12-22 I2C bus power supply control circuit, control method and chip

Country Status (1)

Country Link
CN (1) CN112702176B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4179649A (en) * 1976-07-28 1979-12-18 Sun Electric Corporation Voltage supply apparatus powered from a vehicular electrical system
CN1952668A (en) * 2005-10-20 2007-04-25 鸿富锦精密工业(深圳)有限公司 Voltage detector of universal serial bus interface
CN101770685A (en) * 2009-01-06 2010-07-07 凹凸电子(武汉)有限公司 Vertical bus circuit, a battery management system and a signal transmission method
CN104483913A (en) * 2014-10-31 2015-04-01 山东超越数控电子有限公司 Method employing I2C bus to realize Loongson blade server power source state monitoring
CN107346905A (en) * 2016-05-06 2017-11-14 中兴通讯股份有限公司 Method of supplying power to and device
CN111682760A (en) * 2020-05-21 2020-09-18 西安博特睿电子科技有限公司 Isolation circuit and method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7800408B2 (en) * 2008-09-08 2010-09-21 Microchip Technology Incorporated High speed transient active pull-up I2C
CN202840923U (en) * 2012-08-29 2013-03-27 成都芯源系统有限公司 Control circuit and switch mode converter
CN102801288B (en) * 2012-08-29 2015-05-13 成都芯源系统有限公司 Control circuit, switch mode converter and control method
CN103259519A (en) * 2013-05-27 2013-08-21 苏州贝克微电子有限公司 Active upward-pulling circuit of drain electrode open circuit signal
US10558607B2 (en) * 2017-02-01 2020-02-11 Qorvo Us, Inc. Bus interface system for power extraction
CN107562671B (en) * 2017-08-02 2020-09-11 广东美的制冷设备有限公司 Communication bus power supply circuit
CN207473599U (en) * 2017-12-04 2018-06-08 山东高云半导体科技有限公司 A kind of I2C bus control interfaces circuit
CN108134599B (en) * 2017-12-04 2019-03-08 山东高云半导体科技有限公司 A kind of I3C bus control interface circuit
CN108647171B (en) * 2018-05-25 2024-02-13 深圳市度信科技有限公司 Signal slope control system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4179649A (en) * 1976-07-28 1979-12-18 Sun Electric Corporation Voltage supply apparatus powered from a vehicular electrical system
CN1952668A (en) * 2005-10-20 2007-04-25 鸿富锦精密工业(深圳)有限公司 Voltage detector of universal serial bus interface
CN101770685A (en) * 2009-01-06 2010-07-07 凹凸电子(武汉)有限公司 Vertical bus circuit, a battery management system and a signal transmission method
CN104483913A (en) * 2014-10-31 2015-04-01 山东超越数控电子有限公司 Method employing I2C bus to realize Loongson blade server power source state monitoring
CN107346905A (en) * 2016-05-06 2017-11-14 中兴通讯股份有限公司 Method of supplying power to and device
CN111682760A (en) * 2020-05-21 2020-09-18 西安博特睿电子科技有限公司 Isolation circuit and method

Also Published As

Publication number Publication date
CN112702176A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
JP6359459B2 (en) Mobile terminal and charging device and method thereof
CN101102119B (en) A charging detection circuit of appliance device and charging detection method
CN101150313B (en) Semiconductor integral circuit device and electronic device
CN103384184A (en) Transmitter circuit and method for controlling operation thereof
CN100369379C (en) Device and method for matching output impedance in signal transmission system
US9954672B1 (en) Digital signal input circuit
CN107589340B (en) Load insertion detection circuit, plug-in port and electric appliance
CN204465489U (en) A kind of New Low Voltage electrify restoration circuit
CN112380080B (en) USB equipment detection system and method
CN101897100A (en) Arrangement and approach for coupling power supplies using controlled switching techniques
CN110932712A (en) Interface circuit of connector and electronic device
CN112650377B (en) I2C bus pull-up power supply method, circuit and chip
CN103326315B (en) A kind of under-voltage protecting circuit and high voltage integrated circuit
CN112702176B (en) I2C bus power supply control circuit, control method and chip
CN105281719A (en) High-speed clocked comparator and method thereof
EP2487795A2 (en) Output circuit, system including output circuit, and method of controlling output circuit
CN117040515A (en) Circuit, circuit control method, chip, active cable and data transmission system
CN202602615U (en) Control circuit of rail-to-rail enable signals and electric level conversion circuit
CN102638258B (en) Output circuit, system including output circuit, and method of controlling output circuit
CN112018839B (en) Load detection circuit
CN111984575B (en) Signal transmission circuit and method
CN103457447B (en) Power supply chip modulation and switching width control device
CN103138738B (en) Tracking circuit
CN105099431B (en) Inter-integrated circuit interface arrangement and its signal generating method
CN214098415U (en) Switching control circuit based on USB interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant