EEVblog® Electronics Community Forum

Electronics => Microcontrollers => Topic started by: koray692 on February 19, 2016, 02:39:47 pm

Title: mpu6050 interrupt help ?
Post 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...
Title: Re: mpu6050 interrupt help ?
Post by: Skimask on February 19, 2016, 03:03:53 pm
What?
Title: Re: mpu6050 interrupt help ?
Post by: koray692 on February 19, 2016, 03:09:12 pm
I arrange it :)  it put "?" insted of "I"
Title: Re: mpu6050 interrupt help ?
Post by: Skimask on February 19, 2016, 03:16:57 pm
Still doesn't make sense.
Title: Re: mpu6050 interrupt help ?
Post by: koray692 on February 19, 2016, 03:29:57 pm
how can I get sample from the mpu6050 sensor at every 10 ms ?(by using interrupt)
Title: Re: mpu6050 interrupt help ?
Post by: ChristofferB on February 20, 2016, 12:56:04 pm
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
Title: Re: mpu6050 interrupt help ?
Post by: mikerj on February 20, 2016, 06:20:11 pm
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.
Title: Re: mpu6050 interrupt help ?
Post by: Bruce Abbott on February 20, 2016, 09:26:37 pm
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.