Go to Post sign up to be an organ donor, and encourage your friends to be organ donors. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2014, 15:07
riftware riftware is offline
Parent Mentor
AKA: Andrew Chandler
FRC #0031
Team Role: Mentor
 
Join Date: Dec 2013
Rookie Year: 2011
Location: Tulsa
Posts: 27
riftware is an unknown quantity at this point
I2C SRF02 Ultrasonic 7bit versus 8bit question

Ok - I've tried searchng a bit on the topic of i2c with the CRIO - most of the results come up in conjunction with talking to an arduino and/or a PI. Those posts gave me a clue but I need some additional data. We have the SRF02 ultrasonic which is an i2c device. I can see the device just fine on my raspberry PI which according to i2cdetect has it at 0x70. Below are my questions or statements (which may need correcting)

1: 0x70 on the PI's i2c bus would be addressed as E0 on the crio due to the need to bit shift 1 left correct?
2: Do I only need to worry about that on the address of the device? OR do I need to perform a similar operation on the command register which sends a ping?
3: Do I need to do the revers of that on values I retrieve from the device once I get the data back on the cRio?

I2c work fine on my PI and my arduino but have been kind of crappy on the CRio. One other tidbit that may be effecting that is in reviewing the specs on the sidecar it looks like they already have pullup resistors on the i2c port where I've been putting them on my sensor spoke probably unecessarily. We were looking at 4 ultrasonics (collision avoidance) and the accelerometer on the i2c bus so we have a single hub that they all connect to.

Any insight is appreciated!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2014, 16:14
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: I2C SRF02 Ultrasonic 7bit versus 8bit question

Quote:
Originally Posted by riftware View Post
1: 0x70 on the PI's i2c bus would be addressed as E0 on the crio due to the need to bit shift 1 left correct?
Correct.

Quote:
Originally Posted by riftware View Post
2: Do I only need to worry about that on the address of the device? OR do I need to perform a similar operation on the command register which sends a ping?
No... Only the device address is 7-bit. All others are simply 8-bit.

Quote:
Originally Posted by riftware View Post
3: Do I need to do the revers of that on values I retrieve from the device once I get the data back on the cRio?
No. Since all others are 8-bit, just use them.

Quote:
Originally Posted by riftware View Post
I2c work fine on my PI and my arduino but have been kind of crappy on the CRio. One other tidbit that may be effecting that is in reviewing the specs on the sidecar it looks like they already have pullup resistors on the i2c port where I've been putting them on my sensor spoke probably unecessarily. We were looking at 4 ultrasonics (collision avoidance) and the accelerometer on the i2c bus so we have a single hub that they all connect to.

Any insight is appreciated!
You do not need additional pull-ups.

One other think you should do is ensure that "compatability mode" is enabled.
Reply With Quote
Reply


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 11:00.

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