Uploaded by vaselie_lot

I2C Bus Pullup Resistor Calculation

advertisement
Application Report
SLVA689 – February 2015
I2C Bus Pullup Resistor Calculation
Rajan Arora
ABSTRACT
Pullup resistor calculation for I2C interface is a commonly asked question. In this application note we
show how to use simple equations for this calculation.
1
2
3
4
Contents
Introduction ...................................................................................................................
Pullup Resistor Calculation .................................................................................................
Speed Versus Power Trade-off ............................................................................................
Example .......................................................................................................................
1
2
4
4
List of Figures
1
Application Example Showing I2C Communication Between the Different IC's on a System and With
Pullup Resistors on I2C Bus ............................................................................................... 2
2
Minimum Pullup Resistance [RP (min)] vs Pullup Reference Voltage (VCC) .......................................... 3
3
Maximum Pullup Resistance [RP (max)] vs Bus Capacitance (Cb) .................................................... 3
List of Tables
1
Parametrics from I2C specifications ....................................................................................... 3
Trademarks
1
Introduction
I2C communication standard is the mostly widely used inter-chip communication standard in today’s
electronic systems. It is an open-drain/open-collector communication standard which implies integrated
circuits (IC’s) with different voltage supply rails can be connected for communication. Pullup resistors need
to be connected from the I2C lines to the supply to enable communication as shown in Figure 1. The
pullup resistors pull the line high when it is not driven low by the open-drain interface. The value of the
pullup resistor is an important design consideration for I2C systems as an incorrect value can lead to
signal loss. In this article we show the simple equations for the pullup resistor calculation which the system
designer can use to do quick calculations for their design.
SLVA689 – February 2015
Submit Documentation Feedback
I2C Bus Pullup Resistor Calculation
Copyright © 2015, Texas Instruments Incorporated
1
Pullup Resistor Calculation
www.ti.com
Figure 1. Application Example Showing I2C Communication Between the Different IC's on a System and
With Pullup Resistors on I2C Bus
2
Pullup Resistor Calculation
A strong pullup (small resistor) prevents the I2C pin on an IC from being able to drive low. The VOL level
that can be read as a valid logical low by the input buffers of an IC determines the minimum pullup
resistance [RP(min)]. RP(min) is a function of VCC, VOL (max), and IOL:
RP (min) =
(VCC - VOL (max))
IOL
(1)
The maximum pullup resistance is limited by the bus capacitance (Cb) due to I2C standard rise time
specifications. If the pullup resistor value is too high, the I2C line may not rise to a logical high before it is
pulled low. The response of an RC circuit to a voltage step of amplitude VCC, starting at time t = 0 is
characterized by time constant RC. The voltage waveform can be written as:
-t
æ
ö
V(t) = VCC ´ ç 1 - e RC ÷
è
ø
(2)
For VIH = 0.7 × VCC:
- t1
æ
VIH = 0.7 ´ VCC = VCC ´ ç 1 - e RP ´Cb
ç
è
ö
÷
÷
ø
(3)
ö
÷
÷
ø
(4)
For VIL = 0.3 × VCC:
- t2
æ
VIL = 0.3 ´ VCC = VCC ´ ç 1 - e RP ´Cb
ç
è
The rise time for the I2C bus can be written as:
tr = t 2 - t1 = 0.8473 ´ Rp ´ Cb
(5)
The maximum pullup resistance is a function of the maximum rise time (tr):
tr
Rp (max) =
(0.8473 ´ Cb )
(6)
where parametrics from I2C specifications are listed in Table 1.
2
I2C Bus Pullup Resistor Calculation
SLVA689 – February 2015
Submit Documentation Feedback
Copyright © 2015, Texas Instruments Incorporated
Pullup Resistor Calculation
www.ti.com
Table 1. Parametrics from I2C specifications
tr
Cb
VOL
Parameter
Standard Mode
(Max)
Fast Mode
(Max)
Fast Mode Plus
(Max)
Unit
Rise time of both SDA and SCL signals
1000
300
120
ns
Capacitive load for each bus line
400
400
550
pF
Low-level output voltage (at 3 mA current sink,
VCC > 2 V)
0.4
0.4
0.4
V
Low-level output voltage (at 2 mA current sink,
VCC ≤ 2 V)
–
0.2 × VCC
0.2 × VCC
V
The RP (min) is plotted as a function of VCC in Figure 2. The RP (max) is plotted as a function of Cb in
Figure 3 for standard-mode and fast-mode I2C.
Figure 2. Minimum Pullup Resistance [RP (min)] vs Pullup Reference Voltage (VCC)
Figure 3. Maximum Pullup Resistance [RP (max)] vs Bus Capacitance (Cb)
SLVA689 – February 2015
Submit Documentation Feedback
I2C Bus Pullup Resistor Calculation
Copyright © 2015, Texas Instruments Incorporated
3
Speed Versus Power Trade-off
3
www.ti.com
Speed Versus Power Trade-off
Once the minimum and maximum value of the pullup resistor has been selected, the decision for the value
of resistor can be made based on trade-off between the speed and power budget. A smaller resistor will
give a higher speed because of smaller RC delay, and a larger resistor will give lower power consumption.
4
Example
For Fast-mode I2C communication with the following parameters, calculate the pullup resistor value.
Cb = 200 pF, VCC = 3.3 V
Solution:
Taking the values from Table 1:
(
)
300 ´ 10-9
tr
RP (max) =
=
= 1.77 kW
(0.8473 ´ Cb ) 0.8473 ´ 200 ´ 10-12
(
RP (min) =
)
(7)
VCC - VOL (max) (3.3 - 0.4 )
=
= 966.667 W
IOL
3 ´ 10-3
(
)
(8)
Therefore, we can select any available resistor value between 966.667 Ω and 1.77 kΩ. The value of the
pullup resistor can be selected based on the trade-off for the power consumption and speed.
4
I2C Bus Pullup Resistor Calculation
SLVA689 – February 2015
Submit Documentation Feedback
Copyright © 2015, Texas Instruments Incorporated
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,
reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are
developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you
(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of
this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI
products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,
enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your
applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications
(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You
represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)
anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that
might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you
will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any
testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include
the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO
ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY
RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information
regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or
endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR
REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO
ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL
PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT
LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF
DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,
COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR
ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your noncompliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.
These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2018, Texas Instruments Incorporated
Download