Snippet - I2C EEPROM/HUB module


This is the driver (and example code) for the modules shown here : and here :

The modules contain an EEPROM and are also acting as a I2C hub, both for Gadgeteer I2C modules (Compass, Accelerometer, and so on).
Both modules can be chained together to extend the I2C line.

The smallest one is a very simple module and is using Gadgeteer sockets, standard 0.1" headers and screw-terminals for connecting devices.

The second one is a shield version and can be put on a PandaII (or Domino, Panda). It will then use the Arduino headers to connect to the I2C lines of the board and share it to the outside world using Gadgeteer headers, screw-terminals and 0.1" PTH headers.

It is programmed in plain NETMF because it can’t be a Gadgeteer module (no sharing allowed for I2C in the Gadgeteer world).
It’s working with NETMF 4.1 & 4.2.

1 Like

fantastic work :slight_smile:

quick question - are you offering the module for sale, if so details needed and put me down for one. :slight_smile:

Thank you !

I can sell it, of course. Just ask what you want :wink:

I’ve just made some changes on the small module :
[ul]changed the orientation of one Gadgeteer socket so that there’s some kind on “in” and “out” direction (although it doesn’t matter, but it’s easier to connect). Thanks to Ransomhall for pointing this out
removed the Groove connector
added 2 row of PTH for powering devices
removed the pullup resistors because this module is not meant to be used with software i2c (the “shield” version has this feature, though)
changed the 8 switches dip to a 3 switches one[/ul]

I’ve also put the (so far) definitive layout of the bigger module, for information.

Round off the corners? OSHW logo?

Corners are already rounded. The drawing does not show it clearly but the picture is more accurate.

Ok for the OSHW logo.

Just a note : for NETMF 4.1 device, you have to add the following somewhere in your project.

namespace System.Runtime.CompilerServices
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
    public sealed class ExtensionAttribute : Attribute { }

Otherwise you will get a compile error. This code generates a warning for NETMF 4.2 but can safely be ignored. I’ve removed this for tests on 4.2 but forgot to put it back :frowning:

Now, for the happy owners of Panda 1, Panda 2 and Domino : enjoy I2C Gadgeteer modules ! :wink:

This leads me to a question : since those modules can’t be Gadgeteer modules, would it be useful/nice to connect unused pins (not i2c related, that is) on Gadgeteer headers to some IOs on NETMF 4.1 devices ?
I think for example at devices of type X, A, C, K & O modules that could then be used on a Panda 2. Right now it’s just a thought, but I don’t see why it wouldn’t be possible at first glance.

What do you think ?

Since it’s OSHW, here are the Eagle files for the “full” version :

The “small” version is really pretty simple to do and was more a feasibility test.

You can do whatever you want with this, even remove my name and put yours instead. It won’t bother me


Good bye

What is the status of the project?