Electronic – I2C Issue at 400KHz

i2c

I am having two boards(1.5Feet x 1Feet each) which are connected in a backplane. I2C master is in BOARD1 and the slave(Temperature Sensor) in BOARD2. In 100KHz mode, I am able to read the slave properly but when I move to 400KHz mode I am not gettign any response from slave.

Please find the attached diagram for the I2C diagram, there are some MUX and SWITCHES are connected on the I2C lines. I have shown only SCL in the picture but SDA is also the same connection.

In the above case there are 3 pull up resistors on both SCL and SDA line. Can anyone tell us how to find the right pull up value for all three resistors.

And one more thing is BOARD1 and BOARD2 has their own 3.3V supply generated on board. I have also written the input capacitance of each devices in the picture.

Best Answer

Since your I2C works at 100Khz, but not 400 Khz, it is a good idea to look at the various factors that have an effect on timing.

1: Check that your slave board supports 400Khz.

2: Resistor values are too big.

When the timing is increased from 100k to 400k, the period of the clock drops from 10 us to 2.5 us.

This means that the rising edge of your data/clock signals has a significantly less amount of time to settle. the time taken is calculated as follows:

t = rc

the capacitance on the bus is usually constant and a property of each device. It sounds like you have these. Add them up.

The resistor values are the next variable. Since you have three in parallel, you need to add them using 1/Rt = 1/R1 + 1/R2 + 1/R3 and so on. You only need one resistor on the bus, so having three in parallel is going to lower the total resistance.

You can now calculate t using the above formula. If it is more than 300ns (just over 10% of your clock period at 400k), then the rise time is out of I2C spec. Here, table 5, page 32.

If you'd like to calculate the correct resistor value, you can re-arrange the above formula to get R=t/c and work from there, where T is 300ns or less.

Related Topic