Topic: interfacing i2c with Chumby One?

Hello,

I'm contemplating using a Chumby One to control some i2c BlinkM smart LEDs (http://thingm.com/products/blinkm).  I have code written to run on a gumstix, but this looks like it could be a much slicker way to do it with the added perks of all the sweet stuff Chumby can already do.  Is there any way to get information on how to accomplish this?  I've seen some posts with people discussing i2c to some extent, but since I haven't bought a chumby yet it's a bit hard to look into this myself.  Specifically how do you physically tie into the i2c bus?  Are there any i2c addresses that are reserved for Chumby use only?  Has anyone had any success with writing widgets to access i2c?  If this will work I plan to buy some ASAP! Thanks!

Dean

Re: interfacing i2c with Chumby One?

I2C isn't exposed anywhere except on the board, although it's relatively straightforward to get to.  You can either solder directly to R900 and R901, or you can short them and pick them up on pins 5 and 6 of the unpopulated chumbilical connector.  We did that during development when hooking up a logic analyzer, and it was really useful.

I2C addresses are left-aligned, so the bottom bit should always be 0.  The FM radio is on 0x56, and I believe there are a few eeproms on 0xA2 (cryptoprocessor eeprom), 0xA8, 0xAA, 0xAC, and 0xAE (all four are DCID eeprom).  Everything else should be available.

I think acceld_i2c.c in the acceld source is the easiest thing to steal code from if you're looking for basic i2c examples.  You can pretty much lift I2C_Read_nbyte() and I2C_Write_nbyte() without needing to change anything.

Re: interfacing i2c with Chumby One?

Great!  Thanks for the response.  2 Follow ups to the following:

"I2C isn't exposed anywhere except on the board, although it's relatively straightforward to get to.  You can either solder directly to R900 and R901, or you can short them and pick them up on pins 5 and 6 of the unpopulated chumbilical connector."


To clarify, by short them you mean short R900 directly to R901?  This would then make the chumbilical connector pins 5/6 live?  For R900 and R901 which is clock and which is data?  Same question for pins 5 and 6 of the chumbilical?  Thanks again!  Can't wait to get my Chumby in now.

Re: interfacing i2c with Chumby One?

No, I mean bridge the two pads on R900, and bridge the two pads on R901.  These are basically unpopulated to prevent people from accidentally connecting a chumby classic daughtercard connector (which is almost but not quite entirely like the chumby one daughtercard connector) and sending 12V down a 5V line (and hooking up I2S to an I2C bus).

But yes, if you bridge R900 and bridge R901, chumbilical connector pins 5 and 6 will become live.

From the diagram, it looks like pin 5 is I2C_SDA (which goes through R900), and pin 6 is I2C_SCL (which goes through R901).

Re: interfacing i2c with Chumby One?

Awesome.  Thanks for the help.  happy holidays,

Dean

Re: interfacing i2c with Chumby One?

ChumbyLurker wrote:

I2C addresses are left-aligned, so the bottom bit should always be 0.  The FM radio is on 0x56, and I believe there are a few eeproms on 0xA2 (cryptoprocessor eeprom), 0xA8, 0xAA, 0xAC, and 0xAE (all four are DCID eeprom).  Everything else should be available.


There's also the accelerometer on 0x3A.

Re: interfacing i2c with Chumby One?

Thanks for the responses.  Is there anything at 0x1D (which wouldn't jive with the whole left aligned deal)?  I finished my hardware mods and now have a small polarized molex connector on the back of my chumby that has sda, scl, +5v, and grd.  When I look at the bus with my analyzer the only traffic I'm getting is chatter to 0x1D.  Is there something wrong with my measurement set up or is it something else?  I have a Chumby One.   Just wanted to double check before I start digging into my analyzer setup.  Thanks!

Dean

Picture of Data capture

Re: interfacing i2c with Chumby One?

0x1d would need to be referred to as 0x3a on the chumby one, which as inio pointed out is where the accelerometer lives.  You're seeing the periodic poll being done by acceld.  The datasheet is available from Freescale.

I2C addressing is weird, because it's a 7-bit address, and you can treat it like an 8-bit field with the lower bit being the read/write bit.  The chumby kernel does this, meaning that for some datasheets (such as the Freescale ones), you have to left-shift the address of 0x1d to read 0x3a.  Many datasheets forego giving a hexadecimal address and instead just give a bit pattern.

We actually use the read/write bit when talking to the FM radio, because it requires this really weird I2C packet where you set the "read" bit while writing the address packet.  That special case is achieved I think by sending a packet with the I2C_M_RD flag set, but also with the write bit set on the address.

Anyway, that does look like a valid packet trace, and it will probably go away if you kill acceld.

Re: interfacing i2c with Chumby One?

Were you able to get this to work?  The BlinkM devices seem run on 5V signals but the chumby devices run at 3.3 volts.

Re: interfacing i2c with Chumby One?

no I couldn't get it to work.  I wasn't even trying to hook up BlinkMs that that point, but simply watching the i2c with a logic analyzer.  I couldn't seem to get my own messages to come out so I gave up and went the custom route with a Fez Domino.  Not as cool as if it would have been hacked into a Chumby but it still works.  Have you been able to send your own i2c messages?

Re: interfacing i2c with Chumby One?

Hi,

ChumbyLurker wrote:

But yes, if you bridge R900 and bridge R901, chumbilical connector pins 5 and 6 will become live.

Would be great to have that bus smile is there any other information source to find where R900 and R901 are located? I looked in the gerber files, but didn't find them.