3
\$\begingroup\$

If I have two logic gates (made of mosfets) with outputs connected to the same wire or bus, I encounter an issue where, when the logic gates are at opposite logic levels they are both trying to drive the wire to their respective voltage. This creates a current and a unreliable voltage across the wire. As you can see in the photo below, there are two OR gates connected to one another. I want the shared wire to be at logic 1 but it is being held at logic low because of the other gate. Also there is a large amount of current between the two gates. How to people deal with this?

Two OR gates with outputs connected to one another.

\$\endgroup\$
  • 4
    \$\begingroup\$ Most of "us" just get a 4 input logic OR gate. Or if must be just add another one to combine the two outputs, creating an effective 4-OR with three gates. \$\endgroup\$ – Asmyldof May 18 '16 at 0:17
4
\$\begingroup\$

If those gates are both "totem-pole" outputs (where they actively drive the output high or low) then that configuration is undefined and "illegal". For exactly the reason that you have discovered. The diagram you show is simply wrong and must be re-designed.

It is NEVER proper to connect the outputs from two active gates together.

There is a technique called "wired-or" where the node is passively pulled high with a resistor, and EITHER of the gates can pull the node low. But that requires "open collector" outputs where they can only pull the output low.

\$\endgroup\$
3
\$\begingroup\$

Simple answer. Do not hook them [push-pull outputs] together.

Ask yourself why you thought you had to hook them together. If it was because you wanted to signal when the output of either gate output was high level then the simple solution is to add a third gate to take the other two outputs and OR them into the final net signal.

\$\endgroup\$
  • 1
    \$\begingroup\$ I was thinking about a computer BUS and how there are many logic gate outputs connected to it. \$\endgroup\$ – Derek Farkas May 18 '16 at 0:12
  • 1
    \$\begingroup\$ @DerekFarkas - Even on a computer bus (you don't say which one, so I'm thinking of PC ISA as an example), there are never 2 (or more) push-pull or totem pole outputs driving one signal at the same time. \$\endgroup\$ – SamGibson May 18 '16 at 0:15
  • 1
    \$\begingroup\$ But don't logic gates constantly drive their outputs low or high? What kind of logic gate is "neutral'? \$\endgroup\$ – Derek Farkas May 18 '16 at 0:16
  • 3
    \$\begingroup\$ Logic that must share bus lines is designed to work two ways. One way, which is more modern method, set up each driver on the bus with a way to "tri-state" itself. This causes both the totem pole FETs in each gate to be off. Then only the gate that is needed to transmit its state is allowed to come out of "tri-state" mode. \$\endgroup\$ – Michael Karas May 18 '16 at 0:17
  • 3
    \$\begingroup\$ There are "tri-state" gates which can pull high or low, or have a third "high-impedance" state where they neither pull the output high or low. You will find that technique used in some bus circuits. \$\endgroup\$ – Richard Crowley May 18 '16 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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