|
|
View previous topic :: View next topic |
Author |
Message |
Emil Kartasian Guest
|
I2C 100kHz or 400kHz |
Posted: Mon Aug 11, 2003 12:48 am |
|
|
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
|
Re: I2C 100kHz or 400kHz |
Posted: Mon Aug 11, 2003 1:22 am |
|
|
:=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 |
Posted: Mon Aug 11, 2003 6:04 am |
|
|
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 |
Posted: Mon Aug 11, 2003 1:56 pm |
|
|
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
|
Re: I2C 100kHz or 400kHz |
Posted: Mon Aug 11, 2003 4:47 pm |
|
|
:=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 |
|
|
|
|
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
|