I2C motion processing unit (MPU6050) for Kinetis MK70

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C motion processing unit (MPU6050) for Kinetis MK70

1,552 Views
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.

Labels (2)
Tags (4)
0 Kudos
Reply
2 Replies

892 Views
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 Kudos
Reply

892 Views
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 Kudos
Reply