Unable to read more than two bytes from MPU-6050 via I2C

By mscheer , 31 January 2013

I have tried to read data from MPU6050, it works well when reading two bytes only. However, it fails to do burst read. (I am trying to read 14bytes at the same I2C transaction). The following is the procedure of burst read,

I2C_Start();
I2C_Send_Byte(0xD0);
I2C_Wait_Ack();

I2C_Send_Byte(0x3B);
I2C_Wait_Ack();

I2C_Start();
I2C_Send_Byte(0xD0+1);
I2C_Wait_Ack();

for(i=0;i<14;i++)
{
if (i < 13) buf = I2C_Read_Byte(1); //with ACK
else buf = I2C_Read_Byte(0); //with NACK
}

I2C_Stop();

phpbb Topic ID
15015