From: Dave H. <dhy...@gm...> - 2008-02-13 08:00:01
|
Hi Yuvraj, Sorry about the last post - finger troubles. > Is there any sample code for interfacing I2C devices > with the gumstix ? Specifically is there any example > code to read data using the I2C bus in C? I've written a bunch of code for doing this. You can find it in the robostix tree. Grab the robostix code by doing these commands: cd gumstix-buildroot cd .. svn co http://svn.gumstix.com/gumstix-buildroot/branches/projects/robostix robostix There is a general purpose program in robostix/gumstix/i2c > I am > looking for a fast data sampling and transfer. The MAX1238 > data sheet says that it supports 94.4Ksamples/s (it's a 12 > channel ADC) and I would like to be able to read it at > least 1Ksamples/s per channel. Is this possible using the I2C bus? Well, 1K samples/sec x 12 channels = 12,000 samples /sec. The I2C bus runs at 100 kHz. That's 8 bits/sample. Even if you increased the i2c speed to 400 kHz, that would only be 32 bits/sample, so no I don't think it's possible. > The data sheet mentions two modes of I2C ...which ones does the > connex support ? Perhaps you could be a bit more specific? I see the Maxim part supports 1.7 Mbps, which the gumstix definitely doesn't support. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |