Search the Community
Showing results for tags 'AK8975'.
Hi all, Problem: - Unable to access the magnetometer registers of MPU9150. Output: -What I am getting is 0xFF on reading every register (corresponding to magnetometer). On the other hand I am able to access the registers of the accelerometer and the gyroscope perfectly. I have initialized the system with i2c master mode disabled and i2c bypass mode enabled. Following is the code I have used to initialize the system:- single_byte_write(0x6B,0x01); single_byte_write(0x19,0x01); single_byte_write(0x1A,0x02); single_byte_write(0x1B,0x11); single_byte_write(0x1C,0x10); single_byte_write(0x6A,0x00); single_byte_write(0x37,0x02); (‘single_byte_write(address,data) writes the data byte to the register with ‘address’ to the slave address as 0x69’) I accessed the registers of accel. and gyro. as following:- single_byte_read(0x75,wia_mpu); which returns 0x68 which is correct as the who_i_am register. But when I tried to access the magnetometer registers as:- single_byte_read_compass(0x00,wia_compass); it returns 0xFF while it should return 0x48. In order to ensure that single_byte_read_compass()/single_byte_write_compass() works correctly I have used these functions with a change in slave address(from ‘0x0C’ to ‘0x69’)to access the registers of accel. and gyro. and it worked correctly. (The difference between ‘single_byte_read()’ and ‘single_byte_read_compass()’ is just that the former uses the slave address as ‘0x69’ while the later uses ‘0x0C’ as the slave address. I have also tried ‘0x0D’, ‘0x0E’ and ‘0x0F’ as the slave address but the output remained the same.) I have also ensured whether the MPU9150 is in pass-through mode. I have checked the output at the pins ‘ES_DA’ i.e. pin6 and the SDA i.e. pin24 with the help of oscilloscope which comes out to be exactly same, with by-pass mode enabled. With master-mode disabled and by-pass mode disabled the output at ‘ES_DA’ is zero always. I have also tried the same procedure as above with not just one but many MPU9150s but the output remained the same, thus most likely there is some problem with the code. Please help me figure it out.
Hi all, Need some help. I have successfully used the AK8975 library with the MPU-9150 which according to the data sheet uses the ak8963 magnetometer. However, when using the same library with a MPU-9250 which has a AK8975 I keep getting a connection failure when using the test sketch. I have gone through all the possible addresses 0x0C through 0x0F with the same results. For reference I am using a CJMCU-117 breakout board that I got over ebay. I have tried also disabling mastermode and enabling bypass but still does not work. Also, getting the accel and gryo data seem to be working fine. Anyone have any suggestions or experience with this issue? Thanks Mike ==================================================== Update 5/11/2014 Ok - came to the conclusion that it is a bad chip and nothing I am doing. After going through the register maps (8963 and 9250), the motion driver software I set up the self test option which the board failed - i checked it against the 9150 which passed. Also, ran a i2cscanner on the 9150 and the 9250. The scanner picked up the magnetometer on the 9150 but not the 9250.