On 2010 Oct 29, at 2:10 PM, Tony Duell wrote:
For those who are wondeirng, the 'trivial' solution I mentioned uses 7
off 74150 16-input multiplexers, one for each segment. You tie the
inputs
high low to determine if that segment is on or off for a given set fo 4
input bits.
After posing that, I thought of other solutions that make no
assumptions
about the segment patterns -- they always work. For example 7 off
74151 8
input muxes and a single inverter (1/6 of a 7404) That has the
advantage
of automatically providing actrive high and active low outputs.
That only gives you 8 patterns, not 16 .. ?
Err, no. That's what the extra inverter is for.
You know hos to use a 2^n input mux to make an arbitrary combinartorial
function of n signals. Feed the n signals to the select inputs of the
multiplexer and wire the 'data' inputs high or low as the truth table
requires.
But you can also yuse a 2^(n-1) input mux and maybe a single inverte, you
connect n-1 of the input lines to the select inputs of the mux. And then
for each of those combinations you consider the 2 truth table lines that
apply (the last input, the one you've not used yet, of course
distinguishes between the 2 lines in each pair). There are 4 possibilites
:
a) The output of the function is 0 in both cases (it doesn't depend on
the last input at all) --> wire that input of thr mux to ground
b) It's 1 in both cases -> wire the input to Vcc
c) It's 0, 1 , it follows the last input in this case -> Wire that last
input signal to the appropraite input of the multiplexer
d) It's 1,0, it's the opposite of the last input. This is when you need
that inverter. Invert the last input signal and wire the appropriate
multiplexer input to the ouptu of the inverter.
If oyu requre several functions of the same inputs (as here), you only
need 1 ivnerter (assumeing there are no fan-out problems), since it's
always thge same singal (say the 2^0 data input) you need to invert.
Son yes, you can use 8 input multiplexers here (and 4 input ones if you
only want to generate 6 or 8 patterns).
Now, another silly aside...
If you want to use a 2^(n-2) mux, you may need any or all of the 16
possible functions of the last 2 inputs (you split up the truth table
into sets of 4 lines, and see which function of the last 2 inputs gives
the right paattern, of course). This makes it less useful :-). But it's
made me think pof a chip that AFAIK never existed... If you think of those
16 possible functions of 2 inputs, then 4 of them are 'trivial' in the
sense that you can produce them with no logic at all. Namely 'always 0',
'always 1', 'equal to the A input' and 'equal to the B input'.
Which
leaves 12 non-rtrivial ones/ Now that means there could have been a 16
pin IC with 2 power pins, 2 inputs and 12 outputs, the 12 non-trivial
functions of the 2 inputs. Use that witha 74150 for an arbitrary fucntion
of 6 inputs...
-tony