I2C pull-up resistors value with two or more devices ?

Hi all...

I'm using two 24LC512 I2C eeproms. The datasheet (microchip) says that a 10k resistor is typical for 100kHz operation. Is the value of the resistor the same for two eeproms on the bus ?

Thanks

Reply to
Rodo
Loading thread data ...

10k

No. The 10K is total pullup resistance. Use 20k on each eeprom. You can run several dozen devices, as long as total pullup resistance is no more than 10K.

Reply to
Digger

that a

resistor the

is no

What's the rationale for that? In what way will two parallel 20k pull-ups on the same wire behave differently than one 10k pull-up?

I think one resistor will do just fine, Rodo.

Robert

Reply to
Robert Sefton

10K is only a typical value. The Philips (and hopefully Microchip) app notes show min and max resistances for several variables, such as bus capacitance.
--
Mike Page BEng(Hons) MIEE           www.eclectic-web.co.uk
Reply to
Mike Page

One resistor will do just fine at that speed and presumably small distance. If you are going further and faster you need to consider the bus capacitance and terminate things properly. Philips have "Active I2C Termination" but unless you are travelling metres you won't need it.

Peter

Reply to
moocowmoo

It depends on the distributed capacitance on each, data and clock, line. The best method is to use the maximum current possible to keep clean rise times. This is variously rated at 3 milliamperes.

A much better design we've used in the past is to pull up to +12Vdc instead of to +5V but use a diode clamp to prevent the excursion from exceeding 5.5Vdc. This accomplishes two things, first signals transit trough thresholds rapidly and secondly are very noise-immune when floating high. For long runs or cables we add a second signal diode to ground clamping negative excursions. The 1N914B is a good choice as it's current handling capabilities is much higher than most at 100ma.

I've successfully run IIC over 15' inside a cabinet with nasty motor start relays and solenoids using the above design with few errors. Of course your IIC code should be error-tolerant anyhow, right?

-- Regards, Albert

---------------------------------------------------------------------- AM Research, Inc. The Embedded Systems Experts

formatting link
(916) 780-7623

----------------------------------------------------------------------

Reply to
Albert Lee Mitchell

The rationale is that the 10K is meant for termination to prevent noise from being introduced ... much like termination resistors in floppies. In the case of floppies termination resistor HAD to be on one floppy at END of cable. Alternative could have been to have weaker resistors on all floppies. That is the case with I2C. You can put dozens of devices on a single line with > 1K pullup on each device.

Ideally you would want 20K on each line where I2C line enters IC. Practically if both chips are on one board a single 10K will do fine. Just make sure the single pullup is at end of trace so both devices are properly terminated.

Reply to
Gman

It's not really a "termination" because the 10K or 20K is nowhere near the characteristic impedance of traces or wires. And it doesn't matter much since the signals are so slow compared to the signal speed down the bus and back.

The lower limit on the I2C pull up resistors is set by the weakest drive capability of the devices on the bus (to pull it down to a logic

0, plus a bit for noise margin). The upper limit is set by the capacitance of the wires and the maximum frequency (it has to be able to generate a logic 1 (plus a bit for noise margin) in the time available). If you add more length or more devices, you increase the capacitance and the pullup resistor may have to be decreased. Using one resistor per device on the bus sort-of does that.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

END

For proper termination, the resistors would have to match the characteristic impedance of the copper trace. And to give you an indication: a typical trace of 0.3mm over a groundplane on 1.6 mm FR4 has an impedance of appr.

130 Ohms. In I2C, they're just for pull up. Nothing else.

Meindert

Reply to
Meindert Sprang

END

The idea of termination isn't to match impedances, but to lower the impedance to an open-collector input of device such that RF can not induce noise on the bus. If a resistor is not near the open-collector I2C input, then the length of wire from the pullup to the I2C input becomes a high impedance antenna. The great the length of this antenna, the greater the chance of RF induced noise.

The lower limit of I2C pullup is specified in spec as 10K. The upper limit of I2C pullup is determined by number of devices (which collectively must not combine to less than 10K) The upper limit of I2C devices on the bus is also specified in I2C spec (about 128?).

Reply to
Canon

No, that's NOT the primary reason. Calculate the rise-time of a 400pF bus line with a 100K pullup from 0 to 0.7Vdd plus, say 100mV noise margin. Compare with the 10us bit time.

What "spec" are you talking about? A minimum 3mA drive capability is required by all devices meeting the I2C specification, which with a 5V supply is about 1.7K. It can also be a current source.

See "THE I2C-BUS SPECIFICATION VERSION 2.1" (Philips Semiconductors) section 16.1 "Maximum and minimum values of resistors Rp and Rs for Standard-mode I2C-bus devices" if working it out from first principles is too much. There are nomographs to help. It also covers mixed-mode operation and other more complex real-world variations.

There is actually no specific limit on the number of devices, but it's typically at least 20 devices using minimum pullup resistor (the limit is set by the 400pF maximum bus capacitance spec).

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

says

resistance

noise

at

THE I2C-BUS SPECIFICATION VERSION 2.1" (Philips Semiconductors) Been a while since I've read it, but that is the origin of 10K value.

A minimum 3mA drive capability is

There is a limit specified in the spec. Again, I haven't read it in a while. I worked on a system that had roughly100 devices on a single I2C bus that conformed to the spec.

Reply to
Canon

... snip ...

At last an accurate description! The number of old wives tales told on these newsgroups continues to amaze me. They tend to have a germ of misunderstood truth.

--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
 Click to see the full signature
Reply to
CBFalconer

Here are some comments on pullups, crosstalk etc

formatting link

Simon

Reply to
simon

Good information, thanks.

We, also, have our own proprietary IIC buss pinouts with eight wires. There is some redundancy because we also send a fair amount of power. You'll see that there are two identical 8-pin connectors, pinouts are:

1- +12Vdc 2- -12Vdc 3- +5Vdc 4- /Sclk 5- /Sdata 6- /Int 7- Gnd 8- Gnd

In our configuration the cable is manufactured of individual wires randomly located so the absolute pin location isn't important. Included on the pcb is an IIC temperature sensor by Dallas Semi, the DS1621.

I just put up the amrTerminator but have yet to create the schematics in .pdf format so don't complain about the schematic link being incorrect:

formatting link
and move down about 11 items to the amrTerminator. This small pcb
formatting link
actually has three of the pullup channels I spoke of upstream plus LED's to monitor power supplies.

The advantage of this design is that pullup current doesn't peter out near the +5V rail and continues pulling up at about 60% of full current to keep the data and clock lines stiff preventing rfi and emi from corrupting communications.

If you look at the PCF8574 there is a /Int pin. This is extremely important if you're using that concept over a serial bus. Instead of having to poll all IIC(SMB) slaves the controller can simply look at this one pin to determine if any remote action needs to be taken. This releases an incredible amount of CPU overhead! I should note that we use not only the 8574 but designed some of our own IIC slaves using the Atmel family of inexpensive RISC micros. All use the /Int feature to notify an IIC Master when they need attention. Only then does the Master need to devote resources to polling. In one project this increased our main loop execution speed by about 300%.

FYI: Since designing that pcb we've discovered that the problems we had with the DS1621 were not in our code, which we spent many, many days on, but in silicon! It turns out that Dallas knew internally that the part was fatally flawed yet refused to admit it in public for fear of lawsuit. I'll never design with a Dallas sole-sourced part again. The IIC bus is a great way to expand your options with small microcontrollers and can be extended a dozen or more feet but only if you truly understand the complications.

-- Regards, Albert

---------------------------------------------------------------------- AM Research, Inc. The Embedded Systems Experts

formatting link
(916) 780-7623

----------------------------------------------------------------------

Reply to
Albert Lee Mitchell

characteristic

Termination/pullup prevents RF from getting on I2C bus. If a board is laid out willy nilly and I2C pullup is not near input, say 12" away, the I2C bus will be highly subseptible to RF from all kinds of transmitters; police, fire, military, FM. That part of I2C bus that is not terminated properly becomes a high impedance antenna.

Reply to
Canon

Well, I just fail to see why the position of a 10k resistor would matter on a 120 Ohm track. From an HF point of view, a short wire would be very high impedant in free air, but we're talking about 120 Ohm here. From a VHF point of view, it could be resonating but in that case 10k on one side or on both wouldn't make much difference either when the capacitance of the drivers would already account for an RF load of 100 to 200 ohm.

Meindert

Reply to
Meindert Sprang

Two questions.

First, how does the location of a pullup resistor do anything to reduce the susceptibility of a long trace to RF? RF induced on the trace is by definition AC, while the pullup provides a DC reference. Are you claiming that the pullup provides a low-impedance path to ground? Well, at high frequencies doesn't the trace capacitance provide a much lower AC impedance path to ground? I just don't buy this claim. If I'm wrong, please educate me.

Second, in terms of the operation of the I2C bus, what effect would the RF interference have anyway? If your margins are so slim that a few uV of RF cause problems then your design is faulty anyway.

Why try to complicate such a simple thing? We're talking about a pullup resistor on a very slow signal. They only important thing to consider about the resistor is its value. The location makes no difference at all, in my opinion, I don't care how long the trace is. The only exception is if you have devices that can plug into (or off of) the bus and you have to place the pullup in a location where is will always be active (i.e., it can't be unplugged). Simplicity is one of the things that makes I2C so useful.

Robert

Reply to
Robert Sefton

In fact you will find that almost everything you build has an impedance between about 50 and 200 ohms at high frequencies, with

100 being a very usable estimate. At audio (telephone) frequencies twisted pairs look closer to 600 ohms.
--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
 Click to see the full signature
Reply to
CBFalconer

on

point

both

My concern is high power RF in the vicinity of an improperly terminated board. A 1000w linear HF amp driven by a CB, A 1500w Navy transmitter, Underneath a AM tower putting out 50,000w. If your application has high impedance "antenna", your I2C bus will crash.

Reply to
CoinMyster

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.