Three resistors, and a 74HC/AC CMOS gate.
(All resistors have the same value.)
From now on, we suppose that our logic gates
are powered with 5V.
For the input of a logic gate, treshold voltage is
what "separates" the LOW from the HIGH.
While TTL compatible logic (74LS/ALS/F/HCT/ACT)
has a treshold voltage of ca. 1.3 V,
CMOS compatible logic (40xx, 74HC/AC)
has a treshold voltage of half the supply voltage,
what means 2.5 V.
I'm leaving out quite a few little details here,
but to be on the safe side, apply to the input
of a CMOS gate:
for logic HIGH more than ca. 3.33 V
(more than two third of the supply voltage).
for logic LOW less than ca. 1.67 V
(less than one third of the supply voltage).
Warning: logic gates with bipolar output
transistors (74LS/ALS/F) don't give out the full
supply voltage, so don't use them to drive those
resistors.
Let's suppose, that we use 74HC/HCT/AC/ACT
outputs to drive the resistors at the A,B or C
input of our majority gate with either
(nearly) 0V, or (nearly) 5V.
(We now ignore the low input current of the
CMOS gate, and the voltage drop at the MOS
output transistors when sending current
through them.)
If all inputs of our majority gate have the same
logic level, it's easy:
If two inputs are LOW and one input is HIGH,
our resistors form up a voltage divider:
And through our voltage divider, there will flow
a current of I = 5V / (1.5 * R)
For instance, if R = 470 Ohm, I = 7.1 mA.
At the input of our CMOS gate, we would have
a voltage of (0.5 * R) * I = 1.67 V...
in other words, one third of the supply voltage.
If one input is low and two inputs are high,
we would have exactly the same current as in the
previous example.
Except that the voltage at the input of the
CMOS gate would be R * I = 3.33 V...
two third of the supply voltage.
So much for theory.
Warning: to be on the safe side, the current you
sink/source with a 74HC/HCT/AC/ACT better
should be less than 7.8 mA,
so you better use resistors with more than 470 Ohm.
[HOME] [UP]/ [BACK] [1] [2] [3] [4] [5] [6] [7] [8] [NEXT]
(c) Dieter Mueller 2009