Jump to content
43oh

_Murphy_

Members
  • Content Count

    9
  • Joined

  • Last visited

About _Murphy_

  • Rank
    Noob Class

Profile Information

  • Gender
    Not Telling
  1. Since you asked for more code via a Private message. I will share the project I used to test that the I2C was working using the MPU-6050. It has a printf script in it that someone on this forum created. MSP430_MPU6050.rar Just import this code and connect an MPU-6050 and you should be able to verify that your I2C lines are working through the printf.
  2. I was able to get my code to work once I added some printf code to debug it. Thank you for posting that code though.
  3. Thank you. This makes debugging programs so much easier.
  4. Where exactly in CCS do you see the Printf text? I have the sample program running.
  5. What I currently am using I have based it off of another persons code. It is able to compile but after stepping through the debugger I am not 100% certain that the IMU code is working properly. If anyone who may be in the process of doing something similar to this is able to improve upon this code or has another approach please post it. Attached Files: main.c I2C_MSP430.c I2C_MSP430.h MPU6050.h MSP430_MPU6050.c MSP430_MPU6050.h
  6. I haven't been able to verify if the code I have works since It isn't displaying values correctly in the debugger.
  7. The I2C code I have has been re-written and it may function correctly now. Once I complete testing on it I will know for sure. If I can verify my code to be working I will post it on this topic.
  8. Ok. This is the code I have so far. I currently can verify that it is working up to the if statement that checks if the slave is present. I also have included an attachment of the Read sequence that is in the data sheet. All comments are welcome. #include "msp430g2553.h" #include "TI_USCI_I2C_master.h" #define MPU6050_I2C_ADDRESS 0x68 // Confirmed correct address + communication #define prescale 0x14 // 400kHz #define MPU6050_PWR_MGMT_1 0x6B // Power management register: write 0x00 to wake the device #define MPU6050_ACCEL_XOUT_H 0x3B // Read #define MPU6050_ACCEL_YO
  9. Over the past week I have been attempting to get my MSP430g2553 to act as the master and talk to an MPU-6050 which is the slave. I have so far only been able to get it to receive an ACK to the slave, and the code indicates that it is present and listening. My attempts at writing and reading from the slave have produced no results. Does anyone have any advice or recommendations on how to proceed with this?
×
×
  • Create New...