[ARM] I2c bit rate settings and correspondingly selecting oscillator and system frequency.

Status
Not open for further replies.

kshitij_lakhani

Newbie level 5
Joined
Feb 15, 2015
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
69
Hey i am using ARM 7 LPC2148 , and to it , i am interfacing accelerometer mma8451 via I@C.
However , what i am confused about is
1) what bit rate for i2c block should i be setting. And what is the reason that i should be selecting a particular bit rate
2) what should be the corresponding ON and OFF time , i.e the duty cycle.
3) Only after knowing this requirement , i can select an oscillator for my requirements. What frequency oscillator should i choose..... i mean what are the selecting parameters ?

Note : I am newbie , so please keep it as simple as possible. Thanks in advance :smile:
 

1) I2C can run between 100KHz and 400KHz. Does your accelerometer specify a frequency you should use?
2) 50%
3) Run at as low a frequency as possible. Higher frequencies are more difficult to deal with.
 

1)The datasheet of the accelerometer (mma8451) doesnt really mention anything for the frequency of operation of i2c.
it just says scl should be between 0-400
2)any specific reason for 50% duty cycle ? why not other duty cycles ?
3) lower frequencies . okay . does 12 Mhz sound good ?

thank you

- - - Updated - - -

i would be really thankful if u could look up the datasheet (mma8451 ) and see if anything of that sort exists. i cant find anything of that sort , except a min scl Ton and min scl Toff. tHNK !!!
 

I guess your question is motivated by the fact that LPC2148 has (unusually) separate timing registers for low and high period of I2C timing. But what detains you from simply selecting safe standard values suggested in the user manual and turn to essential design problems?

Most microprocessors have similar settings, just I2C frequency or baud rate, and they are fine with it.

I don't understand in which relation you consider 12 MHz, it's surely not feasible as I2C frequency. As said 400 kHz is maximum.

O.K., reading your initial post again I see that you're asking about processor clock frequency. It really doesn't depend on I2C parameters.
 

Yes , when i say 12Mhz , i am talking of the oscillator.

So, should i go with a 50% duty cycle and a i2c bit rate of 100khz or 400khz ?
(If u think differently , please tell me the apt values according to you.)
 

1) I2C can run between 100KHz and 400KHz. Does your accelerometer specify a frequency you should use?
2) 50%
3) Run at as low a frequency as possible. Higher frequencies are more difficult to deal with.



Barry , why do you suggest 50% . Any reason for it ?
And what is your suggestion for both
1) oscillator frequency .... 12 mhz ? { Most standard value i have come across}
2)100khz or 400khz for the bit rate for i2c ?
2)
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…