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
i2c speed (Read 1467 times)
cdop
YaBB Newbies
*




Posts: 6
i2c speed
11/29/09 at 6:00am
 
Hi!
I want my i2c bus on lower speed.
In i2c.c it says:
#define PRESCALE120M 12  // factor = 12, 120MHz/10MHz
and later
*pTWI_CLKDIV = CLKLOW(67) | CLKHI(33);  // For 100KHz SCL speed: CLKDIV = (1/100KHz)/(1/10MHz) = 100
 
So if I wanted my bus on 10Khz, would I need to set PRESCALE120M to 120?
Or is there any other way to set the i2c bus speed?
 
Thanks,
Mathias
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: i2c speed
Reply #1 - 11/29/09 at 7:40am
 
It does appear that setting the PRESCALE120M to 120 will give you 10kHz.  Maximum range of the prescaler is 127.  You could also increase CLKLOW and CLKHI to slow the clock further.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Marco
YaBB Newbies
*




Posts: 22
Re: i2c speed
Reply #2 - 02/11/12 at 5:05pm
 
How do I get the I2C on its slowest setting?
Back to top
 
 
Email   IP Logged
tjump
Global Moderator
*****




Posts: 411
Re: i2c speed
Reply #3 - 02/12/12 at 9:30am
 
This is beyond what I understand about the system.
 
T. Jump
Back to top
 
 
  IP Logged
anagnosz
YaBB Newbies
*




Posts: 12
Re: i2c speed
Reply #4 - 02/13/12 at 6:39am
 
Hi,
It seems that prescale is about the number of clock circles that the system use for a internal time reference. I havent completely understood it myself but i suggest for simplicity to have a value of 0, so you use the SCLK(System clock) itsef. Then use clkhigh and clklow so that you adjust your clock. As i said these are suggestions, cause i am confused too! Study the Blackfin537 hardware refernce in the TWI sector for details and to make your own view.
Back to top
 
 
Email   IP Logged
Pages: 1
Send Topic Print