On 9/21/2014 4:55 PM, Gökhan Tarim wrote:
> Hello everyone,
> 
> I have a project about earthquake and i'm using accelerometer sensors to 
> measure earthquake data. But I have a problem with that. 
> 
> I want to measure two accelerometer sensors that support I2C with 
> Beaglebone Black at the same time but these sensors will be different I2C 
> port and 
> The timing is so important for me. I have to take all data from sensors at 
> the same time. I readed some article about that situation and mostly people 
> using 
> MCU that support RTOS but I'm using Linux kernel. 
> 
> So is it possible with software ? and how should i do ?

You don't mention which sensors you are using, but normally they have
some sort of mechanism to start a conversion or measure a sample
triggered via the I2C bus.  Also, the I2C bus typically isn't real
high-speed, so you can "bit-bang" it with the CPU.  Just write some code
that triggers samples on both sensors at the same time.

If timing is _really_ important, you can use the PRU to do the I2C
bit-banging instead of the ARM core.

Note you may need to modify the pins used for the I2C bus.  If you want
to start the conversions at exactly the same time, the bits used for the
I2C bus should be in the same GPIO bank.

-- 
Charles Steinkuehler
[email protected]

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to