I2C motion processing unit (MPU6050) for Kinetis MK70

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I2C motion processing unit (MPU6050) for Kinetis MK70

1,376 次查看
angelolerro
Contributor I

Hello, I'm trying to use the MPU6050 Gyroscope with tower MK70 on I2C communication protocol but I have some problems.

To read temperature (for example) values I used the following code:

GI2C1_ReadAddress(DEVICE_ADDRESS, 0x41, 1, &xyz[0], sizeof(xyz));

but it seems that the data I read are  always the same. I tried to write in a register with the following code:

GI2C1_WriteAddress(DEVICE_ADDRESS, 0x23, 1, 197, 1);

but it seems that the register values don't change.

Maybe it is necessary to initialize the device but I don't know how to do it.

Thanks in advance.

标签 (2)
标记 (4)
0 项奖励
2 回复数

716 次查看
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Angelo,

I have no personal experience with InvenSense’s MPU6050, so cannot be of much help with initialization, but if you posted here your I2C timing diagrams, I might be able to check whether it is a communication issue or something else. I would also suggest reading the WHO_AM_I register, it should always return 0x68, regardless of the initialization of the device and state of AD0 pin.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 项奖励

716 次查看
DavidS
NXP Employee
NXP Employee

To add to Tomas good idea to check the WHO_AMI register:

http://playground.arduino.cc/Main/MPU-6050

Regards,

David

0 项奖励