CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

I2C 100kHz or 400kHz

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Emil Kartasian
Guest







I2C 100kHz or 400kHz
PostPosted: Mon Aug 11, 2003 12:48 am     Reply with quote

When they say the chip is ok for 100kHz or 400kHz and to use 2k
resistor for higher freq and 10 k for lower. Does this mean I can choose the speed? Also do I need a pullup for both SCL and SDA? Thanks.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516870
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

Re: I2C 100kHz or 400kHz
PostPosted: Mon Aug 11, 2003 1:22 am     Reply with quote

:=When they say the chip is ok for 100kHz or 400kHz and to use 2k
:=resistor for higher freq and 10 k for lower. Does this mean I can choose the speed? Also do I need a pullup for both SCL and SDA? Thanks.


If the chip supports fast mode then you can select the speed.
If no speed is specified in the #use i2c statement then it defaults to 100kHz.

#use i2c(master,sda=PIN_C4,scl=PIN_C3) // 100kHz
For fast
#use i2c(master,sda=PIN_C4,scl=PIN_C3,FAST) // 400kHz

Yes, you need pullups on both SCL and SDA.
There is a 400pF capacitance limit on the bus so around 2k2
should be used for fast mode so that the edges are fast enough.
Also, keep distances as short as possible.
See the i2c bus specifications for more detail.
<a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank">http://www.semiconductors.philips.com/buses/i2c/</a>
Kenny
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516872
Emil Kartasian
Guest







Re: I2C 100kHz or 400kHz
PostPosted: Mon Aug 11, 2003 6:04 am     Reply with quote

Hi,
The chip I have is 24C02N. Will this support fast mode?

:=:=When they say the chip is ok for 100kHz or 400kHz and to use 2k
:=:=resistor for higher freq and 10 k for lower. Does this mean I can choose the speed? Also do I need a pullup for both SCL and SDA? Thanks.
:=
:=
:=If the chip supports fast mode then you can select the speed.
:=If no speed is specified in the #use i2c statement then it defaults to 100kHz.
:=
:=#use i2c(master,sda=PIN_C4,scl=PIN_C3) // 100kHz
:=For fast
:=#use i2c(master,sda=PIN_C4,scl=PIN_C3,FAST) // 400kHz
:=
:=Yes, you need pullups on both SCL and SDA.
:=There is a 400pF capacitance limit on the bus so around 2k2
:=should be used for fast mode so that the edges are fast enough.
:=Also, keep distances as short as possible.
:=See the i2c bus specifications for more detail.
:= <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank"> <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank">http://www.semiconductors.philips.com/buses/i2c/</a></a>
:=Kenny
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516879
thomas
Guest







Re: I2C 100kHz or 400kHz
PostPosted: Mon Aug 11, 2003 1:56 pm     Reply with quote

With software I2C, what's the minimum crystal speed in order to get 400Khz I2C speed?
Regards,
Thomas
:=:=When they say the chip is ok for 100kHz or 400kHz and to use 2k
:=:=resistor for higher freq and 10 k for lower. Does this mean I can choose the speed? Also do I need a pullup for both SCL and SDA? Thanks.
:=
:=
:=If the chip supports fast mode then you can select the speed.
:=If no speed is specified in the #use i2c statement then it defaults to 100kHz.
:=
:=#use i2c(master,sda=PIN_C4,scl=PIN_C3) // 100kHz
:=For fast
:=#use i2c(master,sda=PIN_C4,scl=PIN_C3,FAST) // 400kHz
:=
:=Yes, you need pullups on both SCL and SDA.
:=There is a 400pF capacitance limit on the bus so around 2k2
:=should be used for fast mode so that the edges are fast enough.
:=Also, keep distances as short as possible.
:=See the i2c bus specifications for more detail.
:= <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank"> <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank">http://www.semiconductors.philips.com/buses/i2c/</a></a>
:=Kenny
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516896
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

Re: I2C 100kHz or 400kHz
PostPosted: Mon Aug 11, 2003 4:47 pm     Reply with quote

:=Hi,
:= The chip I have is 24C02N. Will this support fast mode?
The data sheet says 100kHz so the answer is no.

:=
:=:=:=When they say the chip is ok for 100kHz or 400kHz and to use 2k
:=:=:=resistor for higher freq and 10 k for lower. Does this mean I can choose the speed? Also do I need a pullup for both SCL and SDA? Thanks.
:=:=
:=:=
:=:=If the chip supports fast mode then you can select the speed.
:=:=If no speed is specified in the #use i2c statement then it defaults to 100kHz.
:=:=
:=:=#use i2c(master,sda=PIN_C4,scl=PIN_C3) // 100kHz
:=:=For fast
:=:=#use i2c(master,sda=PIN_C4,scl=PIN_C3,FAST) // 400kHz
:=:=
:=:=Yes, you need pullups on both SCL and SDA.
:=:=There is a 400pF capacitance limit on the bus so around 2k2
:=:=should be used for fast mode so that the edges are fast enough.
:=:=Also, keep distances as short as possible.
:=:=See the i2c bus specifications for more detail.
:=:= <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank"> <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank"> <a href="http://www.semiconductors.philips.com/buses/i2c/" TARGET="_blank">http://www.semiconductors.philips.com/buses/i2c/</a></a></a>
:=:=Kenny
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516903
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group