I²c Pull-up resistor

Source: Internet
Author: User

In some PCB layout, we will often see in the interface of the I²C communication, often access a 4.7K resistor, some datasheet above clearly have requirements, need to access, and some do not require.

I²c interface

For single-chip microcomputer, some IO internal pull-up resistor can be enabled, this eliminates the external pull-up resistor, which is for the microcontroller with standard I²C communication protocol interface, if only with the analog I²c protocol interface, then you need to consider the access to the pull-up resistor problem. is when the camera is configured to communicate when the SCL and SDA need to be connected to the pull-up resistor.

In most cases, because the I²c interface uses the open drain mechanism, the device itself can only output low level, can not actively output high level, only through the external pull-up resistor RP to pull the signal line to high level. The pull-up resistor on the I²C bus is therefore required, as shown in 1.

Figure 1

Because the I²C bus in idle must pull high, only the high can pull into low, so this is the reason why the provision of idle must be high, if keep "low", it is impossible to become "multi-master" bus.

In fact, the I²c bus interface in the work will only detect high and low levels, he does not care about the problem of pull-up resistor, so the bus must meet the timing requirements.

The size of the pull-up resistor will involve two problems, one is the power consumption, the other is the speed problem, the two are a contradiction. If you want to try to improve speed, then the problem of the bus capacitance, it is easy to understand that the pull-up resistor and the bus capacitor formed RC, high-speed will directly affect the communication! Because there is a charging time and high threshold when the bus is pulled high, if the main device is not charged enough to ensure that the device can recognize the high level of the valve value when the master thought that the completion of a bus action, then the communication must not be carried out!
If you want to reduce power consumption as much as possible, you need to increase the resistance as much as possible to minimize the current consumption of each part of the circuit to achieve overall power consumption reduction! But it can't be infinite, otherwise you can't stand the charge time!

//========================================================

I²c pull-up resistance size

The I²c pull-up resistor determines that there is a calculation formula:

Rmin={vdd (min)-o.4v}/3ma

rmax= (t/0.874) *c, (T=1us 100KHz, T=0.3us 400KHz)

C is bus capacitance

The RP maximum is determined by the bus maximum tolerance (Cbmax), and the RP minimum value is determined by the vio and pull-up drive current (max. 3mA);

So rpmin=5v/3ma≈1.7k (@Vio =5v) or 2.8v/3ma≈1k (@Vio =2.8v)

Rpmax value: Standard mode, 100Kbps bus load maximum tolerance <=400pF; fast mode, 400Kbps bus load maximum tolerance <=200pf, according to the specific use of the current device manufacturing process, PCB trace distance and other factors as well as standard backward compatibility, the design of the rapid mode-based, that is, the bus load capacitance <200pf, that is, the transmission speed can be up to 400Kbps is not a problem. So Rpmax can take the range is 1.8k~7k @ vio=5v corresponding 50pf~200pf.

According to the limits of rpmin and Rpmax, generally take 5.1K @ vio=5v, load tolerance environment requirements are also easy to achieve. In the 2.8V system, the console design selected 3.3k,portable/handset and other low-cost design to choose 4.7K sacrifice speed in exchange for battery life.

Overall: The supply voltage limits the minimum value of the pull-up resistor, and the load capacitance (bus capacitance) limits the maximum value of the pull-up resistor

Supplement: the 300 ohm resistor RS can be concatenated on the I²C bus to prevent high voltage glitches from SDA and SCL lines. The I²C protocol also defines the resistor RS in series on the SDA, SCL line. The effect of this resistor is to effectively suppress interference pulses on the bus into the slave device to improve reliability. The choice of this resistor is generally around 100~200ohm. Of course, this resistor is not required, in the harsh noise environment, can be selected.

//========================================================

I²c pull-up resistance discussion

RP should not be too small, generally not less than 1kω

The drive capability of the general IO port is at 2ma~4ma magnitude. If the RP resistance is too small, the current on the VDD sink port will be larger, which causes the low level value of the port output to increase (the maximum allowable value for the port output low is 0.4V), and the port may be damaged if the incoming port has too much current. Therefore, usually the pull-up resistor should choose a resistance of not less than 1kω (when vdd=3v, the sink current does not exceed 3mA).

RP should not be too large, generally not higher than 10kω

Since the port output high level is achieved through the RP, when the line level changes from low to high, the power supply through the RP to the line load capacitance cl charge, which takes a certain amount of time, that is, rise time. The rise time of the port signal can be approximated by the RPCL product of the charge time constant.

The Signal line load capacitance (to the ground) is composed of many aspects, including the device PIN, PCB signal line, connector and so on. If there are multiple devices hanging on the signal line, the load capacitance will also increase. For example, the bus regulation, for the 400kbps rate application, the signal rise time should be less than 300ns, assuming that the line CL is 20PF, the corresponding RP value can be calculated as 15kω.

If the RC charging time constant is too large, it will change the signal rising edge slowly, not to the requirements of data transmission.

Therefore, the general application of the selection is a few kω magnitude of the pull-up resistor, such as the selection of 4K7 resistor.

The RP resistor with small resistance increases the port sink current, so the RP value should be slightly larger in case of possible, to reduce power consumption. In addition, typically, the pull-up resistor on the SDA,SCL two line is consistent and pulled up onto the same power supply.

//========================================================

The problem of pull-up resistor power supply in I²C application

In the part of the application, there is also a master-slave device and the pull-up resistor power supply inconsistencies, such as the camera module. In many design scenarios, when the camera module is not working, it does not enter power down mode, but instead directly shuts down the module-powered VDDs. At this point, the processor and the module are connected to each other signal lines should enter a high impedance state, or there will be a current leakage module, and for the I²c control signal line at this time, due to the presence of the pull-up resistor, the pull-up resistor power supply VDDP must be turned off. If the pull-up resistor uses the system power VDDM (VDDP=VDDM), can not be shut down, there will be leakage current into the module, so in this case, you should use the VDDs as a pull-up resistor power (VDDP=VDDS), so that the pull-up resistor power and slave power can be closed simultaneously, The leakage path is cut off.

It is also important to note that the IO selected in the above application example should be selected as input (or high resistance) by the power-on default.

I²c Pull-up resistor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.