# How Digital Clocks Work

Displaying the Time as Numerals

If you want to display the time as numerals, you need to use the 7447s. Here is the pinout of a 7447, as well as the segment labeling for a 7-segment LED.

You connect a 7447 to a 7490 like this:

• Provide +5 volts on pin 16 and ground on pin 8 to power the 7447 chip.
• Connect QA, QB, QC and QD from a 7490 to pins 7, 1, 2 and 6 of the 7447, respectively.
• Connect 330-ohm resistors to pins 13, 12, 11, 10, 9, 15 and 14 of the 7447, and connect those resistors to the a, b, c, d, e, f, and g segments of the 7-segment LED.
• Connect the common anode of the 7-segment LED to +5 volts.

You will need to have the pinout for the specific LED display that you use so that you know how to wire the outputs of the 7447 to the LEDs in the 7-segment device. (Also, note that the 7448 is equivalent to the 7447 except that it drives common-cathode displays. Ground the common cathode of the LED in that case.)

You can see that by extending the circuit, we can easily create a complete clock. To create the "minute hand" section of the clock, all that you need to do is duplicate the "second hand" portion. To create the "hour hand" portion, you are going to want to be creative. Probably the easiest solution is to create a clock that displays military time. Then you will want to use an AND gate (or the R inputs of the 7490) to recognize the binary number 24 and use the output of the recognizer to reset the hour counters to zero.

The final piece you need to create is a setting mechanism. On a breadboard, it is easy to set the clock -- just move the input wires to drive higher-frequency signals into the minute-hand section of the clock. In a real clock, you would use pushbuttons or switches and gates to do the same thing.

If you happen to take your bedside clock or watch apart, one thing you will notice is that there are probably not 15 TTL ICs inside. In fact, you may not be able to find a chip at all. In most modern clocks and watches, all of the functions of the clock (including the alarm and any other features) are all integrated into one low-power chip (in a watch, the chip and display together consume only about a millionth of a watt). That chip is probably embedded directly into the circuit board. You might be able to see a blob of black plastic protecting this chip. That one tiny chip contains all of the components we have discussed here.

Now you have a complete understanding of how digital clocks work. The next time you look at the clock beside your bed or at your digital wristwatch, you can do so with a new respect for what is going on inside! If you would like to advance to the next level and see how to build a digital clock with a microcontroller, see How Microcontrollers Work.

For more information on digital electronics and timekeeping, check out the links on the next page!