Go to Post Safety glasses may be a nice forehead protector, but thats not what they are made for. - Quatitos [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 31-12-2014, 00:38
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
SPI bus working on the RoboRIO!

Greetings Everyone!

We can now say that we have the SPI interface working on the RoboRIO. We used the Sparkfun ADXL345 board as our test subject so folks could compare the I2C code for this part against the SPI code. There are definitely some weirdnesses over what you would see with an Arduino. The unit we have working is the Sparkfun ADXL345 module that we previously had working in I2C.

Additionally, the Sparkfun part is different from the one in the KOP in a couple of substantial ways. First, the Sparkfun unit is active low instead of active high. This alone will keep you from using the Sparkfun unit with the class that's supplied in WPILib.

Also, I'm not entirely convinced that the SPI interface code in WPILib is doing everything that it should. I'll reserve judgement until the WPILib is made publically available after kickoff and I can get a SPI bus analyzer on the lines. But, at a minimum, the return data has an extra byte artifact in the multi-byte return.

So, if you want to use the ADXL345_SPI class in the new WPILib, just be aware that this code will only work with the KOP ADXL345 sensor and likely not with any other unit that's available from suppliers like Sparkfun or Adafruit.

As always, we'll made our SPI bus code available to anyone who wants it. Cruse by https://www.facebook.com/FRC2015ControlsBeta for more info.

HTH,

FRC #116
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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