Member #322505

Member Since: May 5, 2012

Country: United States

  • Product SEN-09801 | about 2 years ago

    Hi everyone ;

    I have a ITG3200 and I am controlling it a with PIC 16F877a. But I have a problem. I don’t read data it. I am using mikroC and I am using I2C protocol. Written program that ;

    void main(){ int X; TRISB=0; PORTB=0; TRISC=0xFF; PORTC=0; while(1){ I2C_Init(400000); I2C_Start(); I2C_Wr(0xD2); I2C_Wr(0x3E); I2C_Wr(0x80); I2C_Stop();

    Delay_ms(100);

    I2C_Start(); I2C_Wr(0xD2); I2C_Wr(0x00); I2C_Wr(0x69); I2C_Stop();

    Delay_ms(100);

    I2C_Start(); I2C_Wr(0xD2); I2C_Wr(0x16); I2C_Wr(0x18); I2C_Stop();

    Delay_ms(100);

    I2C_Start(); I2C_Wr(0xD2); I2C_Wr(0x3E); I2C_Wr(0x00); I2C_Stop();

    Delay_ms(100);

    I2C_Start(); I2C_Wr(0xD2); I2C_Wr(0x22); I2C_Repeated_Start(); I2C_Wr(0xD3); X = I2C_Rd(0u); PORTB=X; I2C_Stop(); } }

    What’s the problem this ? Can you help me ? please .. (S.O.S)

No public wish lists :(