Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   New digital accelerometer wiring/LabView programming (http://www.chiefdelphi.com/forums/showthread.php?t=80640)

TD912 19-01-2010 22:30

New digital accelerometer wiring/LabView programming
 
Hello CD,
I'm attempting to wire up the new accelerometer that came in the 2010 KoP, as I somehow managed to fry the one from 2009 >_>

I've already seen the manual page here:
http://www.usfirst.org/uploadedFiles...ual%20RevA.doc

I'm jut asking a few questions here just to help make sure I don't fry the new one as well!

So it seems there are two ways to wire the accelerometer to the DigiSidecar, one using I2C or SPI. SPI uses up 4 I/O slots where I2C has it's own area behind the phone-plug-like NXT connector. I'm guessting the resulting output fm the accelerometer will be the same in either case. Are there any advantages to using one method over the other?

Also, how would you properly go about reading the output from the accelerometer in LabView? The old analog accelerometer was pretty simple to work with, but I'm not totally sure how to access the I2C or SPI inputs...

Edit: I searched before I posted this, but i must have missed this thread. It partly answers my question:
http://www.chiefdelphi.com/forums/sh...ad.php?t=80419

But that still leaves the question of which protocol/port is better to use.

And a bit off-topic, but would there be any reason why the gyro is outputting really insane data, as I'm obviously not rotating at 2000 degrees per second... Or did I damage or program the gyro wrong too?

Alan Anderson 19-01-2010 23:22

Re: New digital accelerometer wiring/LabView programming
 
Quote:

Originally Posted by TD912 (Post 902745)
And a bit off-topic, but would there be any reason why the gyro is outputting really insane data, as I'm obviously not rotating at 2000 degrees per second... Or did I damage or program the gyro wrong too?

You might be trying to read the temperature output instead of the rate output.

jhersh 20-01-2010 01:50

Re: New digital accelerometer wiring/LabView programming
 
Quote:

Originally Posted by TD912 (Post 902745)
So it seems there are two ways to wire the accelerometer to the DigiSidecar, one using I2C or SPI. SPI uses up 4 I/O slots where I2C has it's own area behind the phone-plug-like NXT connector. I'm guessting the resulting output fm the accelerometer will be the same in either case. Are there any advantages to using one method over the other?

I2C requires fewer wires and is supported in all 3 languages. SPI may be somewhat faster. I prefer I2C.

Quote:

Originally Posted by TD912 (Post 902745)
Also, how would you properly go about reading the output from the accelerometer in LabView? The old analog accelerometer was pretty simple to work with, but I'm not totally sure how to access the I2C or SPI inputs...

You should look at the examples in the LabVIEW Getting Started Window >> Examples. Look for ADXL345.


All times are GMT -5. The time now is 12:30.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi