Counters

    Solid state counters have a variety of applications in the real world, for example the electronic stop watches used at a sporting event. Figure 10 shows a binary counter, again as a standard logic diagram. Even though this particular device can count only to 16, it is not hard to see how the principle can be extended to allow counting to any reasonable number.

    By the way, digital logic circuits are not specified in the same way as resistors and capacitors, since they don't have an actual "value." They are instead assigned part numbers by their manufacturer, and this particular counter is called a 7493. Here's how it works.

    Besides the mandatory connections to the power supply, the 7493 also has two inputs and four outputs. One of the inputs is used simply to reset the count (all outputs zero), and the other is used as a "clock" to increment the count. That is, each time the clock input wire receives a momentary signal, the various outputs change.

    The first time a clock pulse is received at the input, output number 1 will go high. The next clock causes output number 2 to go high, though at the same time output number 1 goes low. Remember, this is a binary counter, and each output wire represents a single bit of a complete number. The next clock that comes along will cause output number 1 to go high again, and the next one sets output 3, while clearing outputs 1 and 2. This continues until all of the outputs are set to one, though at the next occurrence of a clock input the count "wraps" around to begin all over again at zero.

htwut-34.jpg (7013 bytes)As I mentioned before, all logic devices such as this counter are ultimately built from nothing more than gates. Though we don't really need to cover every logic device in such detail, other IC chips are available for performing a variety of different functions. Some of these are frequency dividers, whose output changes state for every other input clock signal, and shift registers that can pass a single bit through a long series of sequential stages.

For the 7493 in Figure 10, a separate output wire is used for each of the bits being counted. This type of set-up is called parallel, since all of the outputs are available simultaneously. Other devices are designed to operate in a serial fashion, where a single wire is used to sequentially carry a series of ones and zeroes. Can you see a similarity to the parallel and serial ports on a personal computer?

    Because a serial system uses a single pair of wires, it is course much slower than an equivalent parallel system, where all of the bits are sent at one time. This doesn't really matter with printers, though, because they're so much slower than a PC to begin with. And with a modem we don't have a choice, because the signals must travel down the phone line which has only two wires. But disk controllers, memory chips, and most of the other circuits in your PC always use a parallel system, often called a bus, to carry the various signal around.

    Another important consideration when dealing with solid state IC logic chips is their propagation delay. This term refers to how long it takes for the proper outputs to appear, once the inputs have been set. Or to put it another way, how long it takes the electricity to travel through it. Usually, propagation time is measured in nanoseconds, which of course is very short. But when you're trying to get a computer to run at 500 MHz. every nanosecond counts.

    The RAM chips used for a PC's memory also have some minimum response time. When the CPU requests a byte of information from memory, a slight delay before the chips can respond is inevitable. So when an IC chip is rated at 50 nanoseconds (or whatever), what is really being described is how long it takes to respond.

htwut-35.jpg (8521 bytes)    Without wanting to get too far off the beaten path, it may be worth mentioning the cause for these inevitable delays, which is stray capacitance and inductance. Just as a capacitor is created by placing two pieces of metal in close proximity, some small amount of capacitance also results even when the pieces are farther apart. And the same phenomenon applies to inductance, too. Where most inductors are created by placing a length of wire into a coil, a straight piece used just for the various interconnections exhibits some inductance as well. Therefore, all of the wires and circuits in a PC and its chips have tiny amounts of inductance and capacitance, and the resultant frequency characteristics tend to slow things down.

    By the way, when we talk about the speed of a computer as being a number of Megahertz, what is really being considered is its clock frequency. A 300 Megahertz clock speed means that a new signal is being generated 300 million times per second. Just like the 7493 counter chip that is incremented by one with each clock pulse that's applied, computers work the same way. That is, all of a CPU's internal operations happen in step with its built in clock.

    The next important area of digital circuit design is the central processor itself, which is considerably beyond what we can discuss here. However, I would like to recommend some additional resources for learning about electronics and computer circuits.

    All IC and component manufacturers provide literature about their products, but some go far beyond that giving complete working example circuits. While most of the catalogs are of course targeted at professional engineers, the books put out by National Semiconductor are outstanding in both content and clarity. In fact, their Linear Applications Handbook has a complete course describing how color TV works, besides many other tutorials and build-it projects. When I got mine a number of years ago, they were provided for free if you could convince the local sales rep that you're actually a potential buyer. But even at $10 or whatever they list for now, they're still a real bargain.

htwut-36.jpg (5052 bytes)Another useful publication is the Radio Amateur's Handbook, which is published by the American Radio Relay League and is usually sold in electronics stores. Though the emphasis is plainly on ham radio and related subjects, it too provides a great deal of information for the money. It also begins at a better level for most beginners than the National manuals. In fact, ham clubs are a good source too, even if you have no real interest in radio. Like most PC clubs, the members are usually very friendly and eager to share what they know with anyone who takes the time to ask.