MPU9150 EVB AK8975C Data

By naps69 , 29 October 2012

I've been able to obtain the accelerometer, gyro, and temp data via the 9150 FIFO without too much trouble, and am now trying to incorporate the AK8975C "External Sensor Data" into the FIFO as well. I'm using the MPU9150 EVB hooked up to a microcontroller board via I2C and have also been able to inject the FSYNC pin data into the LSB of the temp. My problem is that when I try to obtain the AK8975C compass data via the external sensor register setup, I get all zeros from the FIFO (good because at least I'm getting something). Here's what I have so far:

1.) Setup I2C Bypass (Reg 0x37, bit 1 = '1')
2.) Set I2C Master Mode off (Reg 0x6A, bit 5 = '0') Is this right?
3.) Set Slave 0 output byte to 0x01 (Reg 0x63, Data 0x01)
4.) Set I2C Master Delay Ctrl (Reg 0x67, Data 0x03)
5.) Set I2C Slave4 Ctrl (Reg 34, Data 0x31) maximum delay due to 1kHz sample rate?
6.) Configure Slave0 to write :


    Register 0x25 = 0x0C (upper bit set to write)
    Register 0x26 = 0x0A (Control Register)
    Register 0x27 = 0x81 (enable slave, and single byte length)

7.) Configure Slave1 to read :

    Register 0x28 = 0x8C (upper bit set to read)
    Register 0x29 = 0x03 (Data registers, starting at 0x03)
    Register 0x2A = 0x86 (enable slave, and 6 byte length)

8.) Set FIFO enables (Reg 0x23, Data 0x82) Should give me temperature and AK8975C Data


The result is that I see this:

Temp Data
0x00 0x00 0x00 0x00 0x00 0x00
Temp Data
0x00 0x00 0x00 0x00 0x00 0x00
......

Any help would be appreciated, thanks in advance.
phpbb Topic ID
14802