EEVblog® Electronics Community Forum
Electronics => Microcontrollers => Topic started by: koray692 on February 19, 2016, 02:39:47 pm
-
hello friend ..I want to take data in period 10 ms from the sensor I check the register map I didnt understand..Sensor has the pin "int" how can I use this pin...which register arrange I am some confused...
-
What?
-
I arrange it :) it put "?" insted of "I"
-
Still doesn't make sense.
-
how can I get sample from the mpu6050 sensor at every 10 ms ?(by using interrupt)
-
That sounds kinda contradictory. Getting data every time interval sounds like polling, and getting data via interrupt is based on an event. Though I haven't worked with that part, so I could be wrong.
--Christoffer
-
That sounds kinda contradictory. Getting data every time interval sounds like polling, and getting data via interrupt is based on an event. Though I haven't worked with that part, so I could be wrong.
--Christoffer
It's quite possible to poll a device using a timer interrupt.
-
The MPU6050 outputs data at 1kHz (when the digital low pass filter is enabled). To make it send data slower you write a division ratio to the SMPLRT_DIV register.
Sample Rate = Gyroscope Output Rate / (1 + SMPLRT_DIV)
To enable the Data Ready interrupt you must set bit 0 (DATA_RDY_EN) in the INT_ENABLE register. You may also need to modify other bits in this register, depending on what type of interrupt signal you want.