I2C Address Question - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
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 Address Question

I2C

Best Answer NooM, 01 May 2013 - 06:19 AM

yes one i2c bus (thats netmf limit) - in hardware, but you can write a software i2c bus too, than you can have unlimited (they are very slow compared to hardware one)

 

if the device has 2 addresses you can use 2 devices (it has one pin wich you can pull high/low to change the address?)

 

an i2c address is 8 bit, where you only have to care about 7, the 8th is the read/write bit wich gets set automatically.

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 netduino88

netduino88

    New Member

  • Members
  • Pip
  • 2 posts

Posted 30 April 2013 - 07:15 PM

Hi. First off, this is my first post. I got my Netduino Plus 2 a few days ago, and have been playing non stop. I currently have some analog sensors on it (Light and Temp+Humid) One of the projects I want to build will need an array of light sensors. (10 sensors in total, posibally 12) I am looking at the MAXIM MAX44009 light sensor. It uses I2C for comms, and has a very good light range.  My question is, on my ND 2+ I only have one I2C bus correct? And the MAX44009 sensor only has 2 possible addresses. So would I only be able to connect two of these sensors to my board? I have read up on I2C some, but I am still a little unsure if this would be the case. If this is so, are there any good I2C expander cards that I can attach to my board to allow me to connect more of the sensors? Also, has anyone ever used the MAX44009? Does it work well? Thanks so much for any info. Have a good day. Quintin



#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 01 May 2013 - 06:19 AM   Best Answer

yes one i2c bus (thats netmf limit) - in hardware, but you can write a software i2c bus too, than you can have unlimited (they are very slow compared to hardware one)

 

if the device has 2 addresses you can use 2 devices (it has one pin wich you can pull high/low to change the address?)

 

an i2c address is 8 bit, where you only have to care about 7, the 8th is the read/write bit wich gets set automatically.



#3 netduino88

netduino88

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 May 2013 - 08:18 AM

Thanks! Yes, it has a pin that allows you to switch betewwn the 2 addresses. I will look into the software I2C, but will most probably just make another plan and choose a different sensor/communication interface :) That is what I love about these netduino's. There are so many ways to skin a cat! Thanks again. Have a nice day.



#4 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 02 May 2013 - 10:45 AM

The [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]MAX44009 [/color]only draws 0.65µA (virtually nothing) so you can power it from a GPIO.

 

An idea would bet to attach all 12 [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]MAX44009 devices to the same single h/w I2C bus [/color]and have every other use A0=hi and every other use A0=low. You would then use a total of 6 x GPIOs where each single one of these powers one pair of devices, like this:

 

Attached File  schematics.jpg   87.06KB   18 downloads

 

You have to make sure only one of the 6 x GPIOS are active at once or else you will get bus collisions. Typically, your software would activate one GPIO and read/write to the corresponding pair of devices, then deactivate that GPIO and activate another to read/write another pair of devices.

 

If you can't afford to spend 6 pins on this, you can use the PCF8574 8 bit I/O-expander (an I2C device itself) and use 6 of its 8 GPIO pins to power the devices from.

 

Oh, and I haven't used the [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]MAX44009 so I don't know how well it works but if your devices will be placed far apart you will probably have to deal with long cables and the effect that could have on the I2C bus due to interference and such.[/color]







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.