A kind of for the drawing upwardly device on data/address bus
Technical field
The present invention relates to serial communication bus field, especially relate to the locked technical field of a kind of automatic recovery bus.
Background technology
In some communication system of single-chip microcomputer as I2C/SMbus interface bus in, some needs external pull-up resistor (chip internal structure is for leaking level/open collector), taking I2C interface as example, I2C bus only need to be made up of two holding wires, one is serial data line SDA, and another root is serial time clock line SCL.In system, the typical connection of I2C bus, need to be altogether while noting connecting as shown in Fig. 1.Its SDA of device and the SCL pin generally with I2C bus are all open-drain (or open collector) export structures.Therefore when reality is used, SDA and SCL holding wire all must add and draw resistance R p(Pull-Up Resistor).The general value 3~10K of pull-up resistor Ω.
Adopt the benefit of Floating drain to be: in the time that bus is idle, SDA and SCL two signal line all keep high level, can current sinking; Electric compatibility is good.Pull-up resistor connect 5V power supply just can with 5V logical device interface, pull-up resistor connect 3V power supply again can with 3V logical device interface; Because be Floating drain, so between the SDA and SDA of different components, can directly be connected between SCL and SCL, do not need extra change-over circuit.
The rising time of the code requirement SDA/SCL of I2C bus is less than 1000us, and trailing edge is 300us.Meanwhile, in I2C bus request bus, total equivalent capacity is added up and is less than 400pf.Owing to being subject to, bus is spuious, the impact of distributed capacitance, inductance, and communication distance is longer, and device is more, and rising time is longer, and traffic rate/communication stability can decline, and the probability of make mistakes/packet loss can rise.
If reduce the resistance of pull-up resistor, low level maximum can become greatly, becomes implacable contradiction, especially in fast mode or plug-in interface protective circuit, manages with series resistance and TVS.
The rise time of I2C bus determines by pull-up resistor Rp, terminating resistor Rs, capacitive load Cb etc. are common, and while determining in the I2C bus rise time, the correlation of pull-up resistor Rp, terminating resistor Rs, capacitive load Cb as shown in Figure 2.
As shown in Figure 2, the rise time of I2C bus is mainly determined by honoured load and pull-up resistor, in the time that terminating resistor is certain numerical value, IC bus rise time tr is approximate to be directly proportional to the achievement of upper resistance and capacitive load, in the time that the I2C bus rise time remains unchanged, if the capacitive load of I2C bus increases, for ensureing the rise time inconvenience of I2C bus, need to reduce the numerical value of pull-up resistor.
Summary of the invention
In order to solve the problems of the technologies described above, the invention discloses for the drawing upwardly device on data/address bus.
Of the present invention a kind of for the drawing upwardly device on data/address bus, described data/address bus comprises a serial data line SDA, and a serial time clock line SCL, and described serial data line SDA is connected respectively a pull-up current source circuit with serial time clock line SCL.
Further, described pull-up current source circuit comprises at least two transistors.The first transistor is connected with serial data line SDA, and transistor seconds is connected with serial time clock line SCL.
Further, two described transistors are PNP transistor.
Further, described pull-up current source circuit also comprises two NPN transistor.
Further, described pull-up current source circuit also comprises a resistance, and described resistance is connected with a NPN transistor, can regulate the current value of described pull-up current source circuit.
Further, on described data/address bus, total equivalent capacity is less than 400pf.
Further, in described pull-up current source circuit, flowing through each transistorized electric current equates.
The invention has the advantages that: the invention provides a kind of for the drawing upwardly device on data/address bus, described data/address bus comprises a serial data line SDA, with a serial time clock line SCL, described serial data line SDA is connected respectively a pull-up current source circuit with serial time clock line SCL.By adopting current source circuit to replace pull-up resistor of the prior art, thoroughly solve because pull-up resistor reduces, the low level maximum of the I2C bus causing becomes large, thereby affects traffic rate and communication stability.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing relevant of the present invention in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the connecting circuit figure of pull-up resistor and I2C bus in prior art;
Fig. 2 is pull-up resistor in prior art, capacitive load and the graph of a relation of I2C bus rise time;
Fig. 3 is the annexation figure of pull-up current source circuit of the present invention and I2C bus.
Embodiment
The invention provides a kind of for the drawing upwardly device on data/address bus, as shown in Figure 1, the connecting circuit figure of prior art pull-up resistor and I2C bus, serial data line SDA is connected respectively a pull- up resistor 11 and 12 with serial time clock line SCL, and the Standard resistance range of pull- up resistor 11 and 12 is 3 K Ω~10K Ω.I2C bus connects a total equipment 10, for the traffic control of responsible whole I2C bus communication, initiates various communications commands, also comprises that at least one,, from equipment 20, for accepting the order of main equipment 10, processes accordingly on I2C bus node.
Because the rise time of the code requirement SDA/SCL of I2C bus is less than 1000us, trailing edge is 300us.In I2C bus request bus, total equivalent capacity is added up and is less than 400pf.Due to be subject to bus spuious/impact of distributed capacitance/inductance, communication distance is longer, device is more, rising time is longer, traffic rate/communication stability can decline, the probability of make mistakes/packet loss can rise.If reduce the resistance of pull-up resistor, low level maximum can become greatly, becomes implacable contradiction, especially in fast mode or plug-in interface protective circuit, manages with series resistance and TVS.
The present embodiment adopts a current source circuit to substitute pull-up resistor of the prior art.Fig. 3 illustrates the annexation figure of pull-up current source circuit of the present invention and I2C bus, of the present invention a kind of for the drawing upwardly device on data/address bus, described data/address bus comprises a serial data line SDA, with a serial time clock line SCL, described serial data line SDA is connected respectively a pull-up current source circuit with serial time clock line SCL.
Described pull-up current source circuit comprises at least two transistors.Current source circuit shown in Fig. 3 comprises 5 transistors, and wherein transistor 221, transistor 222 are PNP transistor, and transistor 221 is connected with serial data line SDA, and transistor 222 is connected with serial time clock line SCL.Described pull-up current source circuit also comprises two NPN transistor 224 and transistor 225, and wherein transistor 224 connects a resistance 226, can regulate the current value of described pull-up current source circuit.Transistor 225 connects a PNP transistor, for described pull-up current source circuit is regulated.Equivalent capacity total on data/address bus of the present invention is less than 400pf, meets the requirement of I2C bus.In described pull-up current source circuit, flowing through each transistorized electric current equates.
The invention has the advantages that: the invention provides a kind of for the drawing upwardly device on data/address bus, described data/address bus comprises a serial data line SDA, with a serial time clock line SCL, described serial data line SDA is connected respectively a pull-up current source circuit with serial time clock line SCL.By adopting current source circuit to replace pull-up resistor of the prior art, thoroughly solve because pull-up resistor reduces, the low level maximum of the I2C bus causing becomes large, thereby affects traffic rate and communication stability.
Be to be understood that, although this specification is described according to execution mode, but be not that each execution mode only comprises an independently technical scheme, this narrating mode of specification is only for clarity sake, those skilled in the art should make specification as a whole, technical scheme in each execution mode also can, through appropriately combined, form other execution modes that it will be appreciated by those skilled in the art that.
Listed a series of detailed description is above only illustrating for feasibility execution mode of the present invention; they are not in order to limit the scope of the invention, all do not depart from the equivalent execution mode that skill spirit of the present invention does or change and all should be included in protection scope of the present invention within.