Short circuits in Communication protocols.

Thread Starter

Electrodood

Joined Aug 31, 2023
23
I'm learning I2c and i learnt that the slaves if busy and unable to communicate will pull the clock low even if the master tries to pull it up. Does this not cause large current to flow. I know this does not cause problems, but how? Is the flow of current minuscule, but micro controller can provide a current enough to cause permanent damage. Or is it because 'pulling up' means the microcontroller leaves the GPIO floating for the pullup resistors to do the work? Please educate me.
Thanks in advance.
 

MrChips

Joined Oct 2, 2009
34,628
There is no apparent short circuit because the pull-up and pull-down capabilities are current limited.
In other words, there are series resistors in the pull-up and pull-down drivers that will limit how much current can flow when there is contention.

For example, if the pull-up and pull-down resistors are 470 Ω each, the maximum current that will flow in a 5 V system is 5 mA when there is a conflict.

Bus systems employ what is known as "wired-OR logic" using "negative logic". That is, any controller can sink current in order to pull the bus line LOW.
If the pull-up resistor is 470 Ω, then the maximum current that will flow is 10 mA.
 

Ian0

Joined Aug 7, 2020
13,097
Or is it because 'pulling up' means the microcontroller leaves the GPIO floating for the pullup resistors to do the work?
for I2C that is correct.
I2C devices have no transistor drive the output to V+. It is only done by an external resistor, usually between 1k and 10k.
The lower the resistor, the faster it pulls up which allows the interface to run at a higher speed, but it takes more current.
 
I'm learning I2c and i learnt that the slaves if busy and unable to communicate will pull the clock low even if the master tries to pull it up. Does this not cause large current to flow. I know this does not cause problems, but how? Is the flow of current minuscule, but micro controller can provide a current enough to cause permanent damage. Or is it because 'pulling up' means the microcontroller leaves the GPIO floating for the pullup resistors to do the work? Please educate me.
Thanks in advance.
When a slave device pulls the clock line (SCL) low, it is not directly driving a large current. Instead, it grounds the line through a transistor with a low impedance state. While, the master pulls up the clock line using a pull-up resistor, which means the GPIO pin isn't actively driving the line high but allows the resistor to bring the line to a logical HIGH state.

I hope this helps.
 
Top