i2c pullups

greencardigan

Senior Member
I hope to use two separate modules that use i2c interfaces. Both have 4K7 pullup resistors on the data lines.

Should I remove the pullups from one module or will it be ok? I'll probably be using i2cslow.
 

Janne

Senior Member
Other than a very slight increase in power consumption, leaving the resistors in place should be ok.
 

inglewoodpete

Senior Member
Other than a very slight increase in power consumption, leaving the resistors in place should be ok.
If you look at the situation logically, consider what happens with a single pullup resistor of 4.7k.

First, lets call the pullup "about 5k ohms" and the PICAXE operating voltage "about 5 volts". So when 5 volts is connected across the 5k resistor,
I=E/R = 5/5000 Amp = 1mA

i2c works with all outputs configured as "open collector" or "open drain". So the output pulls the i2c data or clock line low and then releases it; the "pullup" pulls the line back to Vcc (5 volts).

No current flows in the output when the i2c line is released. When the output is pulled low, the current calculated previously is 1mA. This is well within the capabilities of a PICAXE output. Two pullups would create 2mA flowing into the output of the i2c device (master or slave).
 

westaust55

Moderator
Further to the explanation by Janne and IWP, it is often recommended to reduce the pull-up resistance values with increased i2c bus speed.

The reduction in pull-up resistance results in a faster/steeper rise in the voltage back to the supply level when the IC (PICAXE or external device) releases the signal (clock or data) line. This is importance at faster speeds to ensure the high state is achieve in sufficient time to be correctly registered as a high state by the "listening" device.
 

BillyGreen1973

Senior Member
Further to the explanation by Janne and IWP, it is often recommended to reduce the pull-up resistance values with increased i2c bus speed.
Having more than 1 pullup on each line would be reducing the overall resistance anyway, since they are in parrallel. Due to the overall resistance being reduced in this way, would it not be better to just use the 'standard' 4k7's as the overall resistance would be around 2k4?
 

Lord Grezington

New Member
I have been using pull down resistors rather than pull ups, will this decrease the swithing time?

Why is a pull up more widely used to a pull down?

Graham
 

MartinM57

Moderator
I have been using pull down resistors rather than pull ups, will this decrease the swithing time?
For i2c comms or for simple things like switches?

For the former, pulldown resistors are completely wrong and your i2c communication will simply not work.

For switches the choice is yours. Pullups are probably more common as they make wiring in certain environments simpler (just connect a pin to earth, as opposed to having one of your switch contacts at supply voltage) and most processors have pullups available internally so no external components are required (there are processors with pulldowns as well though ;))
 

MPep

Senior Member
I have been using pull down resistors rather than pull ups, will this decrease the swithing time?

Why is a pull up more widely used to a pull down?

Graham
Please read Post #3 again. IWP mentions open-collector! Then answer the question yourself. I am sure you'll find that a PD is no good in this case. :)
 
Top