Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1
Send Topic Print
Srv1 robot - i2c - tmote sky (Read 2365 times)
anagnosz
YaBB Newbies
*




Posts: 12
Srv1 robot - i2c - tmote sky
09/14/11 at 10:22am
 
Hello
 
I am uder a project tha requires to attach a Tmote sky sensor on srv1 robot through i2c protocol.In order to test if i2c connection works properly(debugging) we use PCF8574P which is a 8-bit I/O expander for I2C-bus.I readed the srv-1 c interpreter documentation and i was wondering how the function writei2c works  void writei2c(int device, int register, int value), an example how to use the parameters:device and register, would help  
 
Back to top
 
 
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: Srv1 robot - i2c - tmote sky
Reply #1 - 09/14/11 at 7:52pm
 
You can read up on some great examples in this document for the RCM board (which is all I2C driven):
http://www.surveyor.com/blackfin/SRV1-RCMUserGuide.pdf
 
*Brian
Back to top
 
 
Email WWW   IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: Srv1 robot - i2c - tmote sky
Reply #2 - 09/17/11 at 1:16pm
 
I saw the examples and i guess i should modify the fuction because the 2nd parameter is not useful for me.
I,also, want to ask something else , is it possible for srv1 robot to work as a slave device in i2c??Because i am no sure if the sensor can operate as slave..!
Back to top
 
 
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: Srv1 robot - i2c - tmote sky
Reply #3 - 09/17/11 at 5:00pm
 
It is possible (from a hardware perspective), but you will need to write I2C slave code and add it to the SRV firmware - right now that code is not in the firmware.
 
*Brian
Back to top
 
 
Email WWW   IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: Srv1 robot - i2c - tmote sky
Reply #4 - 09/21/11 at 7:50am
 
Thanks a lot for the answers  ! ! I am about to test the srv1 robot with the i2c expander.After that i ll look into your suggestion about writting an i2c slave code for the robot .
Back to top
 
 
Email   IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: Srv1 robot - i2c - tmote sky
Reply #5 - 09/28/11 at 8:22am
 
hello again!!!
 
The test was successful.The next step is to attach the sensor on the srv1 robot but both of them operate as masters as far as i know.So i am interested in srv1 robot (or tmote sky)working as i2c slave device,the way to do that is to create an i2c software slave if am not mistaken.Is there an easier way to make them communicate via i2c or i must make either of them operate as slave ?
Back to top
 
 
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: Srv1 robot - i2c - tmote sky
Reply #6 - 09/28/11 at 11:30am
 
I believe you will need one of them to operate as a slave. You can download the latest SRV1 firmware and write your own I2C slave routines (the BF processor supports this in hardware).
 
*Brian
Back to top
 
 
Email WWW   IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: Srv1 robot - i2c - tmote sky
Reply #7 - 10/13/11 at 8:51am
 
Hello Brian
 
The srv1 robot would be the slave so I downloaded BF processor hardware reference and in the TWI(two wire interface) sector there is an example of a slave setup code(slave mode setup and sleave interrupt service routine() ) that i am about to use. It seems to serve my cause well! The prescale value for CLK seems to puzzle me a little ,but i ll handle this later . I would like to ask how to add this files to srv1 firmware in order to work? Blackfin\srv\srv.c seems to be the right file but I am not sure!
 
Thanks in advance
Back to top
 
 
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: Srv1 robot - i2c - tmote sky
Reply #8 - 10/13/11 at 1:19pm
 
Sure, that would work fine. Add in a new command into the case statement in main.c, then call your new function in srv.c.
 
*Brian
Back to top
 
 
Email WWW   IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: Srv1 robot - i2c - tmote sky
Reply #9 - 11/02/11 at 5:25am
 
Hello Brian,
 
The code that i found in the hardware reference was in assembly.Should i try to write a C source code that does the same or it would work in that form ?
Back to top
 
 
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: Srv1 robot - i2c - tmote sky
Reply #10 - 11/10/11 at 1:24pm
 
All of the firmware is written in C except for a couple of math functions which are assembly. Are you pretty familiar with Blackfin assembly? If so, that would work. If not, I'd stick to C.
 
*Brian
Back to top
 
 
Email WWW   IP Logged
Pages: 1
Send Topic Print