PDA

View Full Version : Pull up resistor for 24LC256



Enrique
01-26-2009, 01:20 AM
Hi,
·
In a project I’m building I will be connecting a 24LC256 EEPROM to a PX32A-Q44 Propeller.
·
In the Propeller Datasheet there is a Propeller Demo Board schematic in which the SDA line of the EEPROM has a 10K pull up resistor, but in the schematic for the #3812 Proto Board both the SDA and SCL lines have pull up resistors. Are both needed?
·
·
Thanks,
·
Enrique

Leon
01-26-2009, 01:33 AM
Only if you are going to put other devices on the same I2C bus.

Leon

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle

Enrique
01-26-2009, 01:51 AM
Thanks

Cluso99
01-26-2009, 08:15 AM
The specifiation says you should put a pullup on both. Suggest you do that - my pasm driver will require pullups on both lines.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index (http://forums.parallax.com/showthread.php?p=778427)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)

My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)

virtuPIC
01-29-2009, 02:50 AM
I just had a look at the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/21203P.pdf). In section 2.2 they say that serial data (SDA) is an 'open drain terminal'. This means you need a pullup on the data line - no matter whether you use one or many I2C slaves.

I have not checked it so far, but I suspect that this is an I2C feature.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets (http://www.airspace-v.com/ggadgets) for tools & toys

Andrew E Mileski
01-29-2009, 03:12 AM
Only masters control the clock, so if the master's output isn't open drain, no pull-up is needed if it can source the current.

However the data line is bidirectional, and always needs a pull-up.

Here's the I2C spec. (http://www.semiconductors.philips.com/acrobat_download/literature/9398/39340011.pdf)

The value of the pull-up depends on the number of devices on the bus. Refer to 16.1 "Maximum and minimum values of resistors Rp
and Rs for Standard-mode I2C-bus devices"


EDIT: Here is the latest I2C 3.0 spec (http://www.nxp.com/acrobat_download/usermanuals/UM10204_3.pdf) from NXP (founded by Philips, the creators of I2C)..

Post Edited (Andrew E Mileski) : 1/28/2009 7:24:36 PM GMT

Phil Pilgrim (PhiPi)
01-29-2009, 04:11 AM
Andrew E Mileski said...
Only masters control the clock, so if the master's output isn't open drain, no pull-up is needed if it can source the current.

This is a common misconception about the I2C bus. Slaves can control the clock, too, by holding it low to pace the transfer. One must always read the data sheet to see if a particular device implements this so-called "clock hold" function. (The 24LC256 does not.)

IMO, it's false economy to cut corners in a design just to save the cost of a resistor.

-Phil

Cluso99
01-29-2009, 10:34 AM
Also, you can improve the speed and reduce the instruction count if SCL has a pullup. My pasm driver uses this (incomplete) which will be used to read/write to >32KB eeprom. I need it to be small. Chips prop boot code does not require a pullup as it drives the SCL. Put in the resistor (or at least make room for it)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index (http://forums.parallax.com/showthread.php?p=778427)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)

My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)

Peter Jakacki
01-29-2009, 11:30 AM
How can passive pullup be faster than direct drive? (Unless you are implementing the complete I2C spec)

True, it doesn't hurt to include a pullup on the SCL line but the reality is that there is not a single I2C device I have ever come across that can or will try to assert the SCL itself which a slave device if capable is allowed to do to pause the transfer. Multi-master I2C will need a pullup on the SCL line but I haven't seen an implementation of that either.

IMO however, to avoid confusion about this simple matter it might be wise if all schematics show a pullup on SCL.

SUMMARY: ALways include a pullup on the SDA and SCL liness but don't be confused if you don't see a pullup on SCL on other designs. The pullup is normally 10K for short connections but can safely be decreased to 2K2 or less.

*Peter*

Cluso99
01-29-2009, 01:51 PM
Sorry Peter, I wasn't clear. Faster in pasm (software point of view) but really it doesn't matter as the prop is fast enough. I am using waitcnt to time the eeprom clocking. I REQUIRE a minimum footprint in pasm and therefore will NOT be driving the SCL line, but rather controlling the DIR bit in a wired or situation, just as SDA is used.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index (http://forums.parallax.com/showthread.php?p=778427)
· Search the Propeller forums (via Google) (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)

My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)