Jump to content
I2Cdevlib Forums

deamonata

Members
  • Posts

    7
  • Joined

  • Last visited

deamonata's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. -65,535 to 65536 would be the range of a 32 bit int (long). hmm bit strange that it is capping out at 255 do you have a logic analyser, it would be useful to sniff the data line and see what the data is that you are getting from the L3G4200D
  2. it sounds like you are using a unsigned short type variable, It would be strange for you to be getting such a perfect range otherwise. I would assume that you would be better of using a signed int data type that would give you a range of -32768 to 32767.
  3. I'm currently trying to understand the 6 axis dmp on the mpu-9150. my end application is to communicate with the mpu-9150 from a SiLab C8015F411 microcontroller. I can currently obtain the raw values from the sensor however it would be much more useful if I could obtain heading data. I've been trying to make sense of what the arduino dmp code is doing, however I've not be making much head way. I was wondering if anyone could give me a DMP-101 lesson on how to get it working. Thanks in advance
  4. do you have a logic analyser or failing that a good occiloscope? if you do it would be worth checking to see if you are getting an acknowledge from either of them
  5. I was writing to every register because my code wasn't working when I was only writing a few settings to it, but I thought that maybe one wan't initialising properly. However it turns out the problem was with the chip and having replaced the chip I can now read from the accelerometer and gyroscope, but the magnometer is still causing me issues. I've determined that I should be at the address 0x0C, and I sent 0x01 to the register 0x0A before reading anything. however all I am getting back are zeros. what are the steps that I should be doing to read from the magnometer? I assume I must be missing something.
  6. Hi there, I've been having a lot of issues with the 9150, I attempting to interface between a C8051F411 and the MPU-9150. I have successfully inmplemented the I2C buss communication and can talk to the device, I can comfortably read and write to most registers however if I read and write to the accel/gyro sensor registers all I get back is zeros. Obviously my first thought was the sleep mode, however I check and I am deffinatly setting the PWR_MGMT_1 register to 0x02 in my code, and more importantly if I read the register back to check the value I can confirm it has been set correctly. I set the following registers SMB_Write_To_Register (REG_PWR_MGMT_1, PWR_MGMT_1_RESET); // resets the chip for (i=0;i<20000;i++); SMB_Write_To_Register (PWR_MGMT_1, 0x02); for (i=0;i<20000;i++); SMB_Write_To_Register (SMPRT_DIV, 0x07); SMB_Write_To_Register (CONFIG, 0x00); SMB_Write_To_Register (GYRO_CONFIG, 0x00); SMB_Write_To_Register (ACCEL_CONFIG, 0x00); SMB_Write_To_Register (FF_THR, 0x00); SMB_Write_To_Register (FF_DUR, 0x00); SMB_Write_To_Register (MOT_THR, 0x00); SMB_Write_To_Register (MOT_DUR, 0x00); SMB_Write_To_Register (ZRMOT_THR, 0x00); SMB_Write_To_Register (ZRMOT_DUR, 0x00); SMB_Write_To_Register (FIFO_EN, 0x00); SMB_Write_To_Register (I2C_MST_CTRL, 0x00); SMB_Write_To_Register (I2C_SLV0_ADDR, 0x00); SMB_Write_To_Register (I2C_SLV0_REG, 0x00); SMB_Write_To_Register (I2C_SLV0_CTRL, 0x00); SMB_Write_To_Register (I2C_SLV1_ADDR, 0x00); SMB_Write_To_Register (I2C_SLV1_REG, 0x00); SMB_Write_To_Register (I2C_SLV1_CTRL, 0x00); SMB_Write_To_Register (I2C_SLV2_ADDR, 0x00); SMB_Write_To_Register (I2C_SLV2_REG, 0x00); SMB_Write_To_Register (I2C_SLV2_CTRL, 0x00); SMB_Write_To_Register (I2C_SLV3_ADDR, 0x00); SMB_Write_To_Register (I2C_SLV3_REG, 0x00); SMB_Write_To_Register (I2C_SLV3_CTRL, 0x00); SMB_Write_To_Register (I2C_SLV4_ADDR, 0x00); SMB_Write_To_Register (I2C_SLV4_REG, 0x00); SMB_Write_To_Register (I2C_SLV4_DO, 0x00); SMB_Write_To_Register (I2C_SLV4_CTRL, 0x00); SMB_Write_To_Register (INT_PIN_CFG, 0x00); SMB_Write_To_Register (INT_ENABLE, 0x00); SMB_Write_To_Register (I2C_SLV0_DO, 0x00); SMB_Write_To_Register (I2C_SLV1_DO, 0x00); SMB_Write_To_Register (I2C_SLV2_DO, 0x00); SMB_Write_To_Register (I2C_SLV3_DO, 0x00); SMB_Write_To_Register (I2C_MST_DELAY_CTRL, 0x00); SMB_Write_To_Register (SIGNAL_PATH_RESET, 0x00); SMB_Write_To_Register (MOT_DETECT_CTRL, 0x00); SMB_Write_To_Register (USER_CTRL, 0x00); SMB_Write_To_Register (PWR_MGMT_2, 0x00); SMB_Write_To_Register (FIFO_R_W, 0x00); The logic analyzer I have confirms that everything is getting sent correctly and I am getting acknowleges back from the MPU-9150. I've kinda run out of ideas now as to why it isn't working
×
×
  • Create New...