PDA

View Full Version : I2C speed



MaxG
- 1st February 2006, 13:13
Is there any way to set the I2C bus speed to 400KHz?
I am using a 18F252 with a 20MHz clock. The I2C device is a ADS7828 a to d conversor able to run at 100Khz, 400Khz and several Mhz in HS mode.

It makes no difference to define I2C_SLOW 1 or not, the timming is always the same (about 10µS per bit).
The manual states that slow devices (100Khz) can be used with XTALs higher than 4Mhz defining I2C_SLOW 1 ans so it is, but, can a fast device be used at 400Khz with I2CWRITE/I2CREAD? Must I implement my own fast routines with shiftin/shiftout?

thanks

Qacer
- 2nd February 2006, 21:48
Is there any way to set the I2C bus speed to 400KHz?
I am using a 18F252 with a 20MHz clock. The I2C device is a ADS7828 a to d conversor able to run at 100Khz, 400Khz and several Mhz in HS mode.

It makes no difference to define I2C_SLOW 1 or not, the timming is always the same (about 10µS per bit).
The manual states that slow devices (100Khz) can be used with XTALs higher than 4Mhz defining I2C_SLOW 1 ans so it is, but, can a fast device be used at 400Khz with I2CWRITE/I2CREAD? Must I implement my own fast routines with shiftin/shiftout?

thanks

Hi MaxG,

Try looking through Microchip's Getting Started: I2C Master Mode document. There is one page that shows the following suggested I2C pull-up resistor setting:

4.7k (less than 100kbps), 2.2k (100 kbps), and 1k (400 kbps)

I don't know how true they are. I am still starting with I2C. Hopefully, some of the more experience users can comment on this.