I have checked via oscilloscope, seems to be sending some data, but as i said before, i still could not communicate.. I think it will be better to establish communication between gumstix and Pic 18f2550 first, before getting tired of IMU works..
If the slave address of PIC is 0x0A, will this code work?

uint8_t data=5;
fh=open("/dev/i2c-3",O_RDWR);
if (fh < 0) {
               perror("open");
               return 1;
      }

if (ioctl(fh, I2C_SLAVE,0x0A) < 0) {
               perror("ioctl");
               return 1;
       }
write(fh,data,1);
close(fh);



2011/12/4 AKS <aungkyas@gmail.com>
Have you checked underlying hardware? I2C needs "open-drain",
sometimes peripheral registers have to be configured explicitly.
I will probe with an oscilloscope to see whether the bit stream
sent from driver via I2C pins will be on the wires before worrying
about extending addresses. My 2 cents!

On 12/4/11, silex <mertoztoprak@gmail.com> wrote:
> Hello,
>
> I have Gumstix Overo, with 2.6.35 kernel on it.. I need to achieve
> communication with Sparkfun IMU3000 Accelerometer&Gyro. I had spent so much
> hours on it, but i could not succeed on using "ioctl" function, i need your
> help.
> I can open i2c-3 port without any problem. But, after running (ioctl(fh,
> I2C_SLAVE,GYRO_W) function ,as i used at the below, i get this error:
> "ioctl: Invalid Argument"
> I have realized that, if i write 7 bits of data to  the address of slave
> device, i dont get any errors. But all of my r/w slave address bits are 8
> bit, so how can i use ioctl without problem??
>
> Here is the code;
>
> #include <stdint.h>
> #include <stdio.h>
> #include <fcntl.h>
> #include <linux/i2c-dev.h>
> #include <linux/i2c.h>
> #include <sys/ioctl.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <errno.h>
>
> //addresses of imu
> #define GYRO_W 0xD0
> #define GYRO_R 0XD1
> #define ACC_W 0xA6
> #define ACC_R 0xA7
>
> int main(void)
> {
>
> int fh;
> char buff[16];
>
> fh=open("/dev/i2c-3",O_RDWR);
>
> if (fh < 0) {
>               perror("open");
>               return 1;
>      }
>
>  if (ioctl(fh, I2C_SLAVE,GYRO_W) < 0) {
>               perror("ioctl");
>               return 1;
>       }
>
> //rest of code.. not important for now..
> return 0;
> }
>
> --
> View this message in context:
> http://gumstix.8.n6.nabble.com/I2C-Problem-For-a-Newbie-tp891074p891074.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users