Make: Electronics by Charles Platt (read me a book .TXT) π
Read free book Β«Make: Electronics by Charles Platt (read me a book .TXT) πΒ» - read online or download for free at americanlibrarybooks.com
- Author: Charles Platt
Read book online Β«Make: Electronics by Charles Platt (read me a book .TXT) πΒ». Author - Charles Platt
Dice simulations have been around for many, many years, and you can even buy kits online. But this one will do something more: it will also demonstrate the principles of binary code.
So, if youβre ready for the triple threat of TTL chips, open collectors, and binary, letβs begin.
You will need:
74LS92 counter such as SN74LS92N by Texas Instruments. Quantity: 1 if you want to create one die, 2 to make two dice.
74LS27 three-input NOR gate such as SN74LS27N by Texas Instruments. Quantity: 1.
555 timers. Quantity: 1 if you want to make one die, 2 to make two dice.
Signal diodes, 1N4148 or similar. Quantity: 4, or 8 to make two dice.
Seeing Binary
The counter that we dealt with before was unusual, in that its outputs were designed to drive seven-segment numerals. A more common type has outputs that count in binary code.
The 74LS92 pinouts are shown in Figure 4-101. Plug the chip into your breadboard and make connections as shown in Figure 4-102. Initially, the 555 timer will drive the counter in slow-motion, at around 1 step per second. Figure 4-103 shows the actual components on a breadboard.
Note that the counter has unusual power inputs, on pins 5 and 10 instead of at the corners. Also four of its pins are completely unused, and do not connect with anything inside the chip. Therefore, you donβt need to attach any wire to them on the outside.
Figure 4-101. The unusual pin assignments include four that have no connection of any kind inside the chip, and can be left unattached.
Figure 4-102. This simple circuit uses a 555 timer running slowly to control the 74LS92 binary counter and display the succession of high states from its outputs.
Figure 4-103. The breadboard version of the schematic in Figure 4-102 to display the outputs from a 74LS92 counter.
Now we come to the first new and difficult fact about the 74LSxx generation of TTL chips that makes them less desirable, for our purposes, than the 74HCxx generation of CMOS chips that I have recommended in previous projects. The modern and civilized HC chips will source 4mA or sink 4mA at each logical output, but the older LS generation is fussier. It will sink around 8mA into each output pin from a positive source, but when its output is high, it hardly gives you anything at all. This is a very basic principle:
Outputs from TTL logic chips are designed to sink current.
They are not designed to source significant current.
In fact, the 74LS92 is rated to deliver less than half a milliamp. This is quite acceptable when youβre just connecting it with another logic chip, but if you want to drive an external device, it doesnβt provide much to work with.
The proper solution is to say to the chip, βAll right, weβll do it your way,β and set things up with a positive source that flows through a load resistor to the LED that you want to use, and from there into the output from the chip. This is the βbetterβ option shown in Figure 4-104.
Figure 4-104. Most TTL chips, including those in the LS generation, are unable to source much current from their logical output pins (left) and should usually be wired to sink current from a positive source (right).
The only problem is that now the LED lights up when the counterβs output is low. But the counter is designed to display its output in high pulses. So your LED is now off when it should be on, and on when it should be off.
You can fix this by passing the signal through an inverter, but already Iβm getting impatient with this inconvenience. My way around the problem, at least for demo purposes, is to use the βNot so goodβ option in Figure 4-104 and make it work by connecting a very-low-current LED with a large 4K7 load resistor. This will enable us to βseeβ the output from the counter without asking it to give more than its rated limit, and if you want to create a more visibly powerful display for a finished version of the dice circuit, Iβll deal with that later. According to my meter, the 4K7 resistor holds the current between 0.3mA and 0.4mA, which is the counterβs rated maximum.
Set up your initial version of the circuit as shown in Figures 4-102 and 4-103. Be careful when you wire the positive and negative power supply to the counter chip, with its nonstandard pin assignments.
The 555 will run in astable mode, at about 1 pulse per second. This becomes the clock signal for the counter. The first three binary outputs from the counter then drive the three LEDs.
The counter advances when the input signal goes from high to low. So when the LED beside the 555 timer goes out, thatβs when the counter advances.
If you stare at the pattern generated by the outputs for long enough, you may be able to see the logic to it, bearing in mind that its zero state is when they are all off, and it counts up through five more steps before it repeats. The diagram in Figure 4-105 shows this sequence. If you want to know why the pattern works this way, check the following section, βTheory: Binary arithmetic.β
Figure 4-105. The three output pins of the 74LS92 counter have high states shown by the red circles as the counter steps from 000 to 101 in binary notation.
Theory
Binary arithmetic
The rule for binary counting is just a variation of the rule that we normally use for everyday counting, probably without thinking much about it. In a 10-based system, we count from 0 to 9, then carry 1 over to the next position on the left, and go from 0 to 9 again in the right-most position. We repeat this procedure until we get to 99, then carry a 1 over to a new
Comments (0)