0
\$\begingroup\$

I am implementing I2C using Bit bang. The slave can accept maximum baud rate of 400kbps. Iam not using external pull up, which is required because of which the fall/rise are not accordingly. I read somewhere fall/rise time can corrected by using external pull up or by running bus at very low speed. Can someone please tell what does running the bus slow means. Please guide me on this.

Thanks

\$\endgroup\$
11
  • \$\begingroup\$ It means a lower baud rate. You still need pullups though. If you are driving the line high and the slave pulls low you'll have a problem. \$\endgroup\$
    – Samuel
    Jun 15, 2015 at 16:42
  • \$\begingroup\$ Do you mean to say, this problem will occur during the ACK time by slave, because at that time SDA line is held high by the master and the slave needs to pull it to acknowledge. \$\endgroup\$ Jun 15, 2015 at 16:47
  • \$\begingroup\$ Also lowering the baud rate means, increasing the delay of pulse. Then how come it will effect fall/rise time? I mean to say what baud rate has to do with fall/rise time of pin val.? Please reply \$\endgroup\$ Jun 15, 2015 at 16:48
  • \$\begingroup\$ The value of the pull-resistor will obviously affect rise times - but the function is to pull the bus high as no device on the I2C bus should ever drive a HIGH. Otherwise you will get a bus conflict with one device driving a HIGH while an other will drive a LOW which will likely result in magic smoke. \$\endgroup\$
    – og1L
    Jun 15, 2015 at 16:51
  • 1
    \$\begingroup\$ As mentioned - you must use pull-ups, as the lines are allowed to be pulled down by either master or slave. \$\endgroup\$
    – Eugene Sh.
    Jun 15, 2015 at 16:52

1 Answer 1

2
\$\begingroup\$

Measure the rise time of your SCL and SDA signals with an oscilloscope.

Then "slow" means slow enough for SCL and SDA to achieve legal logic levels after you release them.

Be aware that if this results in extremely slow transactions, some devices might fail due to time-out behavior.

\$\endgroup\$
7
  • \$\begingroup\$ But the problem which Im facing is that when START is send by master, the SDA line takes more fall time which is not acceptable by the slave, and hence slave cannot detect the START signal because of which it is not acknowledging. In such case how lowering the baud rate will work? Please help \$\endgroup\$ Jun 15, 2015 at 16:54
  • \$\begingroup\$ @AksharaPrasad, you need to explain your problem more clearly. A missing pull-up should make fall-times faster, not slower. \$\endgroup\$
    – The Photon
    Jun 15, 2015 at 16:57
  • \$\begingroup\$ Ya exactly, I mentioned that i am not using external pull up. And I am getting SDA Fall time very large. It should be 40ns max but I am getting SDA fall time of 990ns. And I read somewhere that fall time can be reduced by connecting external pull ups, as internal pull ups are very weak. Is it wrong?? \$\endgroup\$ Jun 15, 2015 at 17:03
  • \$\begingroup\$ @AksharaPrasad, Please add a schematic of your setup to your question. What chips are driving the bus? How are they connected to power and ground? \$\endgroup\$
    – The Photon
    Jun 15, 2015 at 17:45
  • \$\begingroup\$ Using external pull-up resistors vs internal weak ones should not affect fall-time. The drivers should be actively driving the lines low. The effect of the pull-ups would only be on rise-time. Something else is wrong. \$\endgroup\$
    – DoxyLover
    Jun 15, 2015 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.