Do diodes always connect ground?

Thread Starter

ElectroEnthusiast

Joined Jun 22, 2024
11
The easiest way to explain my question is with an example:
Using a NOR gate, only two logic zeros output a one. So this image makes sense.
1733324822780.png

But then I reverse the diode and it still outputs a one.
1733324917069.png
Diodes only let current in one direction, so what I think is happening is that one of these outputs is high impedance an the gate doesn't distinguish it from ground and it considers a zero anything that's not a logic one, even if it's not really a zero.

So my question is: which one is actual ground and which one is high impedance? My guess is the first one is ground.
Perhaps I am totally wrong in my assumptions. Please enlighten me.
I need to use an IC that is enabled with a logic zero but there is a diode in the position of the second image so I need to know if that would be an actual zero.
 

Alec_t

Joined Sep 17, 2013
15,103
I need to use an IC that is enabled with a logic zero but there is a diode in the position of the second image so I need to know if that would be an actual zero.
It depends on the IC inputs. If, for example, there were an internal pull-up on that input then the second circuit would result in a logic 1 at the input. Alternatively, if the input were internally biassed low it would be a logic 0.
 

MrChips

Joined Oct 2, 2009
34,628
Do diodes always connect ground?

That is such a general question that a "yes" answer would have to be categorically incorrect.
In other words, the answer is "no".

That is as asking, do resistors, capacitors, batteries, transistors, etc. always connect ground?
The connection of any and every component depends on the application and the topology of the circuit.
 

MrChips

Joined Oct 2, 2009
34,628
In the example circuit posted, neither orientation of the diode is relevant.

What is missing is proper bias on the input of the logic gate. Without a bias resistor, there is very little current flowing in the diode circuit. One needs to establish the input threshold voltage of the device and ensure that the input voltage is significantly below or above that threshold voltage.

For example, if the input threshold voltage is 2.5 V, one needs to ensure that the input voltage is below 1 V for logic LOW or above 4 V for logic HIGH. (These values will differ depending on the actual IC logic family.)

The diode alone at the input in any orientation does not establish a valid logic level input voltage.

Diode orientation.jpg

Edit: The voltage across the diode as shown above will usually be lower that 0.7 V, i.e. the diode forward biased voltage.
With the diode turned around, one has to take into account the reverse current in the diode. Real diodes, as opposed to ideal diodes, still pass current when reversed biased.
 

Thread Starter

ElectroEnthusiast

Joined Jun 22, 2024
11
Do diodes always connect ground?

That is such a general question that a "yes" answer would have to be categorically incorrect.
In other words, the answer is "no".

That is as asking, do resistors, capacitors, batteries, transistors, etc. always connect ground?
The connection of any and every component depends on the application and the topology of the circuit.
I meant in this example, not as a general question. I thought the diode wouldn't connect to ground in at least one of the two examples.
 

Thread Starter

ElectroEnthusiast

Joined Jun 22, 2024
11
In the example circuit posted, neither orientation of the diode is relevant.

What is missing is proper bias on the input of the logic gate. Without a bias resistor, there is very little current flowing in the diode circuit. One needs to establish the input threshold voltage of the device and ensure that the input voltage is significantly below or above that threshold voltage.

For example, if the input threshold voltage is 2.5 V, one needs to ensure that the input voltage is below 1 V for logic LOW or above 4 V for logic HIGH. (These values will differ depending on the actual IC logic family.)

The diode alone at the input in any orientation does not establish a valid logic level input voltage.

View attachment 337322

Edit: The voltage across the diode as shown above will usually be lower that 0.7 V, i.e. the diode forward biased voltage.
With the diode turned around, one has to take into account the reverse current in the diode. Real diodes, as opposed to ideal diodes, still pass current when reversed biased.
I see, thank you.
 

Thread Starter

ElectroEnthusiast

Joined Jun 22, 2024
11
It depends on the IC inputs. If, for example, there were an internal pull-up on that input then the second circuit would result in a logic 1 at the input. Alternatively, if the input were internally biassed low it would be a logic 0.
But which one guarantees a logic zero independently of the internal configuration of the IC? I would think it's the first one.
 

MisterBill2

Joined Jan 23, 2018
27,186
LOOK AT THE DIODE SPECIFICATION sheet. The manufacturer's data sheet, not the amazon one. And then look at the CMOS gate data sheet for the minimum input current and logic levels.
All of the previous posts are correct, but you need to look at the actual numbers to understand.
Besides that, using a forward diode to pull down a CMOS input is a poor design, because the forward drop is specified at some much greater current, as is already stated.
 

crutschow

Joined Mar 14, 2008
38,322
So my question is: which one is actual ground and which one is high impedance? My guess is the first one is ground.
But which one guarantees a logic zero independently of the internal configuration of the IC? I would think it's the first one.
Neither one.
The first one will have the forward drop of the diode at whatever current is going through it (which is undefined here).
The second one basically generates a floating input, which also has no defined value here.
 

boostbuck

Joined Oct 5, 2017
1,034
Are these 'perfect' diodes and logic gates? It seems this is an exercise in trying to determine the behaviour of a simulator when presented with extreme states. Probably only of very narrow interest tbh.
 

MisterBill2

Joined Jan 23, 2018
27,186
Simulators are often "interesting" in the ways that they differ from what actually happens. Components never burn up in a simulator and capacitors seldom exhibit any leakage current or voltage breakdown. Also, digital logic seldom suffers from propagation time issues or output current (fan-out) limitations. Real CMOS logic has actual threshold levels for changing states that depend on a number of variables, and may cause problems in some applications.
Likewise, real diodes are quite a bit more complex than PERFECT diodes that seldom exist in reality.
 

crutschow

Joined Mar 14, 2008
38,322
Good device Spice models are not PERFECT but show many (but not always all) of the characteristics of real devices.
You, of course, need to know the limitations of simulators to properly use them, just as you need to know the limitations of any tool you use.
Most problems with using simulators is not understanding those limitations.
 
Last edited:

joeyd999

Joined Jun 6, 2011
6,204
The easiest way to explain my question is with an example:
Using a NOR gate, only two logic zeros output a one. So this image makes sense.
View attachment 337315

But then I reverse the diode and it still outputs a one.
View attachment 337316
Diodes only let current in one direction, so what I think is happening is that one of these outputs is high impedance an the gate doesn't distinguish it from ground and it considers a zero anything that's not a logic one, even if it's not really a zero.

So my question is: which one is actual ground and which one is high impedance? My guess is the first one is ground.
Perhaps I am totally wrong in my assumptions. Please enlighten me.
I need to use an IC that is enabled with a logic zero but there is a diode in the position of the second image so I need to know if that would be an actual zero.
Try it with a TTL input.
 
Top