Jump to content
I2Cdevlib Forums

Stuck while trying to translate MPU6050 - DMP to PIC C (CCS)


Recommended Posts

Hi all!

 

Currently, I am working on a project where I need some accurate orientation data. Due to this need, I have opted in for MPU-6050 for its DMP capability. Only if there is some explanative documentation, I would have no problem, but there is not. That's why I have a couple of questions.

 

First question is about dmpInitialize function in "https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050_6Axis_MotionApps20.h",starting from line 325

 

-Why we need to change slave address to 0x7F and then back to 0x68 or 69 depending on AD0 pin? Would there be any problems if we skipped those parts? (I thought that these steps are neccesary and thus translated those parts in C)

 

Second is about writing dmpConfig and dmpMemory.

 

As far as I have understood, we perform the writing after

1-selecting proper bank by writing it into MPU6050_RA_BANK_SEL

2-selecting proper address by writing it onto MPU6050_RA_MEM_START_ADDR

 

We write both dmpConfig and dmpMemory into register MPU6050_RA_MEM_R_W, don't we? I am asking this because in source code I couldn't see it.

 

And third question is about setting the clock division rate. Do we need to use gyro_z or it can be anything else?

 

I am planning to share my implementation if I can manage to complete it.

 

Thanks for kind replies and suggestions!

Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...