- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
according to datasheet,number sixth it says it supports single or burst read/writes.i can implement single read/writes and read data from accelerometer register and the value of x,y,z is 0,0,1 respectively.but now i try to burst read to get data from register and the value of x,y,z is 0,0,-0.12 respectively.
could someone help me for this?here is my project.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i've done that before and it worked.according to data sheet page 35 Burst Read Sequence
https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf
for example:
I2C_MasterSendStart(DeviceAddress,0);
I2C_MasterWriteByte(Register);
I2C_MasterSendRestart(DeviceAddress,1);
I2C_MasterReadByte(I2C_ACK_DATA); // Read from register
I2C_MasterReadByte(I2C_NAK_DATA); // Read from register, last byte is NAKed
I2C_MasterSendStop();
if you still don't understand,please let me know or you could attach your project so that i can help you.
sean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have used the MPU9250 with the PSoC with I2C protocol and I have started designing a component for the MPU9250, so I may be able to help you. Could you please state your problem more clearly?
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi, Davide
thank you for your responding.
when i put mpu9250 without tilt,and the value of accelerometer X,Y,Z should show 0,0,1 respectively.and i can do it with spi in One-Byte Read.
but in Multiple-Byte Read,it gave me 0,0,-0.12.i have checked my code and doesn't find out any problem.
sorry my poor english.if you still don't understand my question,please let me know.
Sean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sean,
I always perform multiple byte reads with the MPU9250 in I2C mode and I never experienced such a problem. As soon as I can I'll test it in SPI mode and I'll let you know.
Have you tried to perform multiple byte reads with the MPU9250 in I2C mode?
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i've done that before and it worked.according to data sheet page 35 Burst Read Sequence
https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf
for example:
I2C_MasterSendStart(DeviceAddress,0);
I2C_MasterWriteByte(Register);
I2C_MasterSendRestart(DeviceAddress,1);
I2C_MasterReadByte(I2C_ACK_DATA); // Read from register
I2C_MasterReadByte(I2C_NAK_DATA); // Read from register, last byte is NAKed
I2C_MasterSendStop();
if you still don't understand,please let me know or you could attach your project so that i can help you.
sean