Shop OBEX P1 Docs P2 Docs Learn Events
I2c Pull Up resistors — Parallax Forums

I2c Pull Up resistors

Mike WMike W Posts: 105
edited 2007-10-28 18:27 in General Discussion

SX28 at 4_000_000

AT24C04 I2C EEPROM

SX tech board onboard 5V regulator



How do you decide what value to use for pull up resistors on a I2C device - SDA SCL lines.

The example in the SX/B help file uses 4.7 K but I have seen several examples that use 2.2 K

How would I decide witch is better or does it matter.

Mike

Comments

  • BeanBean Posts: 8,129
    edited 2007-10-24 02:26
    Mostly it depends on how fast you want to communicate.
    I've seen 10K to 1K values used.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My goal is to live forever...Or die trying.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • bunnibunni Posts: 38
    edited 2007-10-24 05:18
    How does the value of the resistor vary the time? would it be less resistance faster response time or vice versa?

    -Kris
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-10-24 08:18
    When an I²C line (SDA or SCL) is pulled low, this is done by a device output with relatively low impedance, so the potential on the line changes relatively fast from high to low. On the other hand, when the line shall go high, the device output goes to high impedance to release the line, and the line is then brought to high level by a current that flows through the pull-up resistor. So, a smaller resistor means a faster rise-time. Nevetheless, the resistor must be large enough to limit the current flowing when a device pulls the line low to a value below the maximum allowed device output current. In the Microchip 24C04 datasheet, I did not find a spec. for the maximum allowed output current but a current of 3mA is specified together with the low level output voltage, so pull-up resistors of 2.2k or higher @ 5V supply limit the current to values below 3 mA.

    On longer bus lines, lower pull-up resistors, or several resistors in parallel distributed along the bus and at both ends help to also reduce any unwanted reflections.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
  • John CoutureJohn Couture Posts: 370
    edited 2007-10-27 16:52
    Gunther,

    That was an excellent explanation. I had wondered about that too. Thank you!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • MikeKMikeK Posts: 118
    edited 2007-10-28 15:28
    See the section on Bus Pull-up Resistors in Microchip's app note AN1028
    ww1.microchip.com/downloads/en/AppNotes/01028B.pdf

    Mike
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-10-28 18:27
    Mike,

    thank you for this link. Besides information about pull-up resistors it contains other interesting information about serial I²C EEPROMs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
Sign In or Register to comment.