AugS Posted May 4, 2016 Report Share Posted May 4, 2016 Hi, I have a quick question regarding the FIFO of MPU6050. Using Arduino Uno, I read six raw signals from accelerometer and gyroscope using FIFO. Arduino checks the number of bytes in FIFO periodically (roughly at around 1ms), and when the FIFO has more than 36 bytes (i.e., three samples), it reads in those 36 bytes of raw data from FIFO. (no interrupt for this) Problem is, one or two bytes at the beginning of the 36-byte packet simply disappear from time to time even when there happens no FIFO overflow, and because of this, it is almost impossible to use the data reliably for waveform display on a tablet. Is there any good way to prevent this kind of problem? Your help will be greatly appreciated. Thanks. lapedNok 1 Quote Link to comment Share on other sites More sharing options...
AugS Posted May 5, 2016 Author Report Share Posted May 5, 2016 I have a few more questions, and I hope someone can give me some answers. First, below three are my understanding based on the spec. sheet and register-related documents, and I hope someone can verify them: 1. new data are copied from sensor registers to FIFO only when there is no serial communication (I2C) with external device like Arduino. 2. Assuming sampling is done at 1kHz, new data values should be copied to FIFO within 1ms in order not to be overwritten by new data values. 3. 'data_ready' interrupt has nothing to do with FIFO: the interrupt is issued when all new data values are written to each sensor register, not FIFO. So, it is hard to know when FIFO is actually filled with new sensor data, and FIFO_count is the only way to figure it our roughly. And next are my a few questions: 1. Data copy from sensor registers to FIFO, does it happen simultaneously for all sensor values, or does it happen from low numbered sensor registers to the higher numbered ones sequentially? 2. how long does it take for all sensor values to be copied to FIFO? Can it be done within 100us? 3. Let's assume temperature_H/L, acceleration X_H/L were copied to FIFO, then due to I2C communication, data copy from sensor registers to FIFO was put on hold for the remaining sensor values. And the I2C communication lasted longer than 1ms, so new data values were overwritten in sensor registers. Then, what would happen when I2C communication ended? Will new data values from the first sensor (temperature_H/L) be copied to FIFO? Or will new data values from where it was put on hold (acceleration Y_H/L) be copied to FIFO? Your reply and help will be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
1eye Posted October 27, 2016 Report Share Posted October 27, 2016 I had similar questions. Did you get any answers? You can ifndef and ifdef the quaternion and other vars with OUTPUT_TEAPOT and, if doing a teapot demo reduce the program storage space to 35% Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.