Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

I2C and a slave


  • Please log in to reply
5 replies to this topic

#1 Miha Markic

Miha Markic

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationNova Gorica, Slovenia

Posted 11 December 2011 - 09:26 PM

Hi guys,

I am going to read from barometric pressure sensor through I2C and I am wondering whether I need pull-up resistors or not?
http://www.sparkfun.com/tutorials/253'>http://www.sparkfun.com/tutorials/253

The tutorial suggests that those aren't needed.

Thanks

Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/


#2 Miha Markic

Miha Markic

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationNova Gorica, Slovenia

Posted 11 December 2011 - 09:29 PM

OTOH I guess the BMP085 has already pull-up reistors on-board, correct?

Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/


#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 11 December 2011 - 09:32 PM

I am going to read from barometric pressure sensor through I2C and I am wondering whether I need pull-up resistors or not?
http://www.sparkfun.com/tutorials/253

The pull-ups are mandatory as per the I2C specification, so if you use the sensor alone, you'd have to add them, if you use Sparkfun's breakout board, it already has them (those two small black 4k7 resistors).

#4 Miha Markic

Miha Markic

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationNova Gorica, Slovenia

Posted 11 December 2011 - 10:00 PM

The pull-ups are mandatory as per the I2C specification, so if you use the sensor alone, you'd have to add them, if you use Sparkfun's breakout board, it already has them (those two small black 4k7 resistors).


Thanks, I'll use the breakout board so I am fine. Out of curiosity, what happens if I want to use another board with pull up resistors mounted as well?

Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/


#5 Spork

Spork

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 11 December 2011 - 10:37 PM

Here's some reading:

A thread about BM085, i2c, and pull-up resistors: here.

A really good web page about pull-up resistors and i2c: here.

In a nutshell, you need to choose pull-up resistors to match the characteristics of the bus and all the devices on it, but it seems like i2c is pretty forgiving. If you keep adding breakouts with built-in pull-ups, the total pull-up resistance will be LOWER than the LOWEST value on any given breakout (resistors in parallel rule). I eventually ended up cutting some resistors off a breakout to solve this problem.

#6 Miha Markic

Miha Markic

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationNova Gorica, Slovenia

Posted 12 December 2011 - 07:10 AM

Thanks for a clear explanation. I guess when it comes to it, I'll just add slaves and if problems start then I'll try to figure something out.

Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.