Shop Learn
Pull up resistors on SCL and SDA — Parallax Forums

Pull up resistors on SCL and SDA

edited 2012-11-12 06:19 in Propeller 1
I've been looking through the schematics for the various Prop boards out there.

All have pull up resistors on the SDA line but only some have pull ups on the SCL line. These are usually 10K resistors but I note that one board uses 4.7K on both the SCL and SDA lines.

The P8X32A Datasheet shows a 10K pull up on the SDA line only so I'm guessing that is probably a safe way to go?

Why wouldn't the application of resistors be consistent across the various designs?

Alexander (Sandy) Hapgood


  • Mike GreenMike Green Posts: 23,046
    edited 2012-11-11 19:13
    According to NXP's website and application notes on I2C, there should be pullup resistors on both SCL and SDA. Their application notes discuss how to choose resistor values. Mostly the issues have to do with power loss in the pullup vs. noise and RC effects on speed. For short distances between Propeller and I2C device(s) and with maybe one or two I2C devices, something between 4.7K and 10K should work fine. You have to have a pullup on SDA for I2C to work. SDA, although formally required, is not absolutely necessary if there's only one I2C bus master.

    The application of resistors is not consistent across various designs because different people have done the designs. For example, I'm partial to using both resistors even though you can get by with only a resistor on SDA.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,057
    edited 2012-11-11 19:57
    My recommendation is 4.7K on both lines. 10K -- especially in 3.3V systems -- is too high a value, particularly for high-speed operation.

  • edited 2012-11-11 21:54
    Thanks guys,

    I'll install 4.7K resistors on both lines. Interesting there's such a variation between circuits that do the same thing.

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-11 22:53
    Thanks guys,

    I'll install 4.7K resistors on both lines. Interesting there's such a variation between circuits that do the same thing.


    You shouldn't really think that this is unusual at all. For instance many pullup resistors are given as a nominal value but for most purposes can vary greatly. A circuit that works with a pullup of 10K can usually work just as well with 1K or 100K. The 10K value specified for I2C is fine for pulling the line up when it would otherwise be floating, the problem is that the bus capacitance could delay how long it takes to charge sufficiently. Hence therefore the reason that 4K7 was mentioned and I have in fact used 2K myself but this depends upon speed and capacitance etc. In fact the lower value won't hurt it at all as I2C devices are specified to handle lower value pullups to less than 1K in fact. The SCL line is usually driven high and low from the Prop and never needs to be floating in most systems which is why some don't even bother to have a pullup on this line. If you do have one it doesn't hurt.
  • tonyp12tonyp12 Posts: 1,950
    edited 2012-11-12 06:19
    Open drain Pull-up resistor circuit.
    As this is not push/pull, a high Vcc level is only accomplished through the Resistor.

    A low level on the other hand is done through a N-Channel mosfet and is fast.
    And if multiple locations by mistake are pulling the line low (ORed) safe against a blown circuit.


    So it's like filling up the bath tub with different water spicket settings.

    The above pic is for a 10K Ohm pull-up and a 70cm long wire (=large bathtub) results in a 540ns rise time,
    a 15cm wire/trace will get you a much faster 30ns.

    So why not using 2k Ohm all the time?
    Is because you are nearly creating a short through the system when you want a zero level.
    So it's a compromise between speed and power it uses.

    A higher value will also have better immunity against noise on the Vcc line,
    just like a smaller spicket settings will run water in a slower but steadier pace even if main line is fluctuating in pressure.
Sign In or Register to comment.