Experiment 23: Nice Dice
218 Chapter 4
Getting back to our project: I want to take the three binary outputs and make
them create patterns like the spots on a die. How can I do this? Quite easily, as
it turns out.
I’m assuming that I’ll use seven LEDs to simulate the patterns of spots on a
die. These patterns can be broken down into groups, which I have assigned to
the three outputs from the counter in Figure 4-108. The first output (farthest
to the right) can drive an LED representing the dot at the center of the die
face. The second (middle) output can drive two more diagonal LEDs. The third
output must switch on all four corner LEDs.
This will work for patterns 1 through 5, but won’t display the die pattern for a
- Suppose I tap into all three outputs from the counter with a three-input NOR
gate. It has an output that goes high only when all three of its inputs are low,
so it will only give a high output when the counter is beginning with all-low
outputs. I can take advantage of this to make a 6 pattern.
Note that it’s bad practice to mix the LS generation of TTL chips with the HC
generation of CMOS chips, as their input and output ranges are different; so,
the NOR chip has to be a 74LS27, not a 74HC27.
We’re ready now for a simple schematic. In Figure 4-107 I’ve colored some of
the wires just to make it easier for you to distinguish them. The colors have no
other significance.
Figure 4-107. A simpli-
fied schematic shows
how outputs from the
74LS92 counter can
be combined, with
signal diodes and a
single three-input
NOR gate, to generate
the spot patterns on
a die. The wire colors
have no special mean-
ing and are used just
to distinguish them
from each other.
555
timer
C B A
74LS92 counter
Clock input
Binary outputs
NOR
D1
D2
4K7 each
D3 D4
to form these patternsThe groups combine
Each of the three
counter outputs
lights these groups
Special
case to
create
a six
pattern
HI
HI
HI
HI
HI
LO LO
LO
LO
LO
LO
LO
LO
LO HI
LO
HI
LO
Figure 4-108. Binary outputs from the 74LS92
counter can be used to power LEDs arrayed
in groups to simulate the pattern of spots on
a die.