Open drain

Thread Starter

MTech1

Joined Feb 15, 2023
181
Is it correct that in I2C, 'open drain' refers to a type of output where a I2C device can only pull the signal line low (logic 0) but cannot drive it high (logic 1)? To achieve a logic high state, an external pull-up resistor is used to pull the line high when no device is pulling it low ?
 

Papabravo

Joined Feb 24, 2006
22,065
That is my understanding of "open drain". It is analogous to the situation with bipolar transistor outputs except there it is called "open collector". In your application you need to be mindful of the choice in resistor value. If the value is "too small", the I2C drives will dissipate excessive current when they are in the low state. You should check the relevant datasheets for absolute maximum and typical ratings. OTOH, if the value is too large it will lead to sloppy, exponentially rising edges, as the large resistor tries to charge the capacitive load of the I2C lines and the connected receivers.

The use of a simulator might be helpful in understanding the two sides of the problem.
 
Last edited:

MrChips

Joined Oct 2, 2009
34,698
Open collector and open drain are useful for implementing "wired-OR" logic in party line situations.

1706559980041.png

It is a way of creating an OR gate for negative logic without using an actual OR-gate.
Either gate, A OR B can pull the node LOW. The pull-up resistor pulls the node HIGH when both A and B are not active.

What do we mean by "negative logic"?
A signal with the circuit label /A means that a LOW voltage is present when the function A is asserted.

For example, it is common to see /RESET. This is the label RESET with a bar over the word RESET.
We do not say RESET is inverted. The bar over the word is part of the label, as if the word is coloured red instead of green.

1706561858238.png

The switch SW needs to be pressed to activate RESET. We say, /RESET is active LOW. We also say /RESET is negative logic.
 

Papabravo

Joined Feb 24, 2006
22,065
For every logic function of two variables, there is a dual function obtained by applying De Morgan's Law. Sometimes people "loosely" refer to this dual function as negative logic.
 

crutschow

Joined Mar 14, 2008
38,407
We used the terms, active high and low logic.
That's a good definition.

I suppose the positive and negative logic definition comes from Boolean logic, where a 1 is logic true and 0 is logic false, with 0V (or the low voltage) in the circuit corresponding to a logic 0 (thus considered to be positive logic).
The inverse would then be negative logic.
 

Papabravo

Joined Feb 24, 2006
22,065
And how would you "non-loosely" refer to it?
Well, I said loosely because there were differences of opinion on what various terms meant when speaking conversationally. I always understood what was going on when looking at circuitry. This was especially true when representing an AND gate (7408) as an OR gate with bubbles on the inputs and output.
 

Irving

Joined Jan 30, 2016
5,065
Going back to the TS original question, this is used for a type of data-bus known as '0-dominant', as a transmitted 0 'overwrites' a transmitted 1. This allows the transmitting device to detect collisions on the bus and supports multi-master protocols. In some protocols the transmitting device sends a '1' after the address and watches to see if the bus is pulled low for that bit, indicating the presence of a device at that address. In another protocol, lower value message IDs have priority, so if two devices transmit simultaneously the first point of contention, when one is sending 0 and the other a 1, the higher value message sender recognises the presence of the 0 when it was sending, and expecting to see, a 1 and stops transmitting.
 

MrChips

Joined Oct 2, 2009
34,698
Active LOW = negative logic, same thing.

The reason open-collector and open-drain is used is because you cannot tie totem-pole outputs together.
If two totem-pole outputs are fighting to control the line, one HIGH and the other LOW, they create a short across the power rails and the output level is indeterminate or something will blow eventually.
 

nsaspook

Joined Aug 27, 2009
16,272
That's a good definition.

I suppose the positive and negative logic definition comes from Boolean logic, where a 1 is logic true and 0 is logic false, with 0V (or the low voltage) in the circuit corresponding to a logic 0 (thus considered to be positive logic).
The inverse would then be negative logic.
As a note:
At the time (when I was learning Digital Logic) there was also lots of ECL (active transistor logic) designs that did use negative power supplies.

-1.75 V LOW False 0
-0.9 V HIGH True 1

So negative logic is an ambivalent term IMO.
 

MrChips

Joined Oct 2, 2009
34,698
Agreed. Positive and negative logic is independent of the voltage representation.
We can use LOW = red, HIGH = green as positive logic. Negative logic would mean the colours are reversed.
 

crutschow

Joined Mar 14, 2008
38,407
-1.75 V LOW False 0
-0.9 V HIGH True 1

So negative logic is an ambivalent term IMO.
Perhaps.
But for all electrical logic types, including that negative-powered ECL, it would seem that the more positive voltage is considered a logic 1 for normal (positive?) logic (and thus would look the same on an oscilloscope).
 

Irving

Joined Jan 30, 2016
5,065
I remember ECL - you had to wear heat-proof gloves when debugging it because it got hot enough to generate serious burns. A lot of our prototypes were wire-wrapped and you had to use specially insulated wrapping wire to avoid shorts due to melted insulation!
 

Papabravo

Joined Feb 24, 2006
22,065
I remember ECL - you had to wear heat-proof gloves when debugging it because it got hot enough to generate serious burns. A lot of our prototypes were wire-wrapped and you had to use specially insulated wrapping wire to avoid shorts due to melted insulation!
The insulation was called Kynar, if I remember correctly. Early TTL was not far behind in too hot to handle.
 

nsaspook

Joined Aug 27, 2009
16,272
Perhaps.
But for all electrical logic types, including that negative-powered ECL, it would seem that the more positive voltage is considered a logic 1 for normal (positive?) logic (and thus would look the same on an oscilloscope).
Smart people designed it, so yes but it could be damn confusing when crossing logic boundaries.

1706641585070.png
1706641817181.png
 

Attachments

Top