Home www.play-hookey.com Thu, 04-02-2020

Decimal Counter with Display

### Introduction

Now that we've looked at a counter IC, a 7-segment display, and the driver IC for that display, it's time to put them all together. It is the combination of these elements, not any one by itself, that makes for a human-readable numeric display of some kind of count.

In this context, it doesn't matter what is being counted and displayed. For a clock or timer, the circuit counts seconds (or 1/100ths of a second in critical timing applications). In a factory, the circuit might count the number of manufactured items produced by each assembly line. Variations on these themes are endless: the number of vacationers through each turnstile at an amusement park, the number of cars passing a toll booth, the number of swimmers using a community pool. Humans count many different things, and the use of these digital devices helps to gather, maintain, and display those counts.

In this experiment, you will complete the assembly of a one-digit decimal counter and seven-segment display for it. Then you will demonstrate its operation and verify that the display accurately reflects the count held in the counter. A number of future experiments will combine multiple circuits of this type into a multi-digit counting display, which we will use in a number of different ways.

### Block Diagram

The complete count-and-display system for a single decimal digit is shown in the block diagram to the right. It consists of a decimal counter, a BCD-to-seven segment decoder/driver (which may include a latch for the input BCD code), and the seven-segment display itself. The decimal point in the display is handled separately, if it is used at all.

There are also binary versions of this system, where the counter is a binary counter and the decoder/driver displays the current count as a hexadecimal (base 16) number, using digits 0-9 and the letters A-F. However, in this experiment, we'll stick with the decimal version.

If the display uses LEDs for the segments, resistors are required to limit the current through them to a safe level. If the display uses liquid crystal technology, these resistors are no longer necessary, since liquid crystal displays draw no current. However, if you build a project using a liquid crystal display, be sure to use a display driver that will deal with the special requirements of the liquid crystal display. The 4054, 4055, and 4056 are made for this purpose, while the 4511 is designed to drive LED displays. The newer 4543 is similar, and is designed for either LCD or LED displays. It can handle both common-cathode and common-anode LEDs.

### Parts List

To construct and test the counter and display circuit on your breadboard, you will need your breadboard system with seven-segment LED display and 4511 decoder/driver IC installed, plus assorted colors of hookup wire and the following experimental parts:

• (1) 4029 CMOS counter IC.
• (1) 10K, ¼-watt resistor (brown-black-orange).

### Constructing the Circuit

You will install the 4029 counter IC to the right of the 4511 decoder/driver IC already in place on your breadboard socket. The experiments leading up to this one were carefully arranged to leave just enough room on the right hand end of the breadboard to install this IC and its required jumpers. Make sure this space is clear of all jumpers and experimental parts. Then refer to the image and text below and install the new parts as shown.

### Circuit Assembly

#### Starting the Assembly

As you install the experimental components for this experiment, be sure to place them exactly as specified. There is no extra room on this part of your breadboard socket, for this experiment.

Click on the `Start' button below to begin. If at any time you wish to start this procedure over again from the beginning, click the `Restart' button that will replace the `Start' button.

#### 0.3" Black Jumper

Locate or prepare a 0.3" black jumper, using the methods you have used in previous experiments. Install this jumper on your breadboard socket, in the location indicated in the assembly diagram to the right.

Click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare another 0.3" black jumper, and install it in the location shown in the assembly diagram.

Again, click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare a third 0.3" black jumper, and install it in the location shown to the right.

As before, click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare another 0.3" black jumper, and install it in the location shown in the assembly diagram.

As usual, click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare another 0.3" black jumper, and install it in the location shown to the right.

Again, click on the image of the jumper you just installed to continue.

#### 0.3" Black Jumper

Locate or prepare one more 0.3" black jumper, and install it in the location shown in the assembly diagram.

As before, click on the image of the jumper you just installed to continue.

#### 0.5" Red Jumper

Locate or prepare a 0.5" red jumper and install it in the location indicated to the right.

As usual, click on the image of the jumper you just installed to continue.

#### 0.1" Bare Jumper

Bend a clipped component lead or a short piece of bare hookup wire in half, to form a 0.1" jumper. Install this jumper in the location shown in the assembly diagram.

Once more, click on the image of the jumper you just installed to continue.

#### 10K, ¼-Watt Resistor

Locate a 10K, ¼-watt resistor (brown-black-orange), and form its leads to a spacing of 0.5" if necessary. Install this resistor in the location indicated to the right.

Click on the image of the resistor you just installed to continue.

#### 4029 CMOS Counter IC

Locate a type 4029 CMOS counter IC and install it on your breadboard, in the location shown in the assembly diagram. Make sure that none of the pins gets bent or broken, and that you install the IC with the notch indicating pin 1 oriented to the left as shown here.

Click on the image of the IC you just installed to continue.

#### 0.8" Brown Jumper

Locate or prepare a 0.8" brown jumper. Install it in the location shown to the right.

Click on the image of the jumper you just installed to continue.

#### 0.5" Yellow Jumper

Cut a 1¼" length of yellow hookup wire and remove ¼" of insulation from each end. Form the leads as shown in the pictorial diagram below, and install it in the location shown in the assembly diagram. It should easily clear the jumper wire already in place from your previous experiment.

Again, click on the image of the jumper you just installed to continue.

#### 1.2" Orange Jumper

Cut a 1¾" length of orange hookup wire and remove ¼" of insulation from each end. Form the leads as shown in the pictorial diagram below, and install it in the location shown to the right. The ½" vertical clearance should allow this jumper to fit nicely over the top of the two ICs on your breadboard socket.

As before, click on the image of the jumper you just installed to continue.

#### 1.5" Red Jumper

Cut a 2" length of red hookup wire and remove ¼" of insulation from each end. Form the leads as shown in the pictorial diagram below, and install it in the location shown in the assembly diagram. Again, the ½" vertical clearance should allow this jumper to fit nicely over the top of the two ICs on your breadboard socket.

As usual, click on the image of the jumper you just installed to continue.

#### Violet Jumper

Prepare a violet jumper wire and connect it from the location shown to the right to the normal output for Manual Pushbutton A.

Again, click on the image of the jumper you just installed to continue.

#### Violet Jumper

Prepare a second violet jumper wire and connect it from the location shown to the right to the normal output for Manual Pushbutton B.

One more time, click on the image of the jumper you just installed to continue.

#### Assembly Complete

This completes the construction of your experimental circuit. Check your assembly carefully against the figure to the right, and correct any errors you might find.

In addition to your assembled circuit, you will need the 5" black grounding jumper you have used in previous experiments. Have it handy; the experimental procedure will tell you when you need it. Then, proceed with the experiment on the next part of this page.

### Performing the Experiment

Step 1. Turn on power to your experimental circuit, and note the display on the seven-segment LED. Press pushbutton B once to ensure the counter is reset, and enter the displayed number in the row for count 0, in the column labelled "Forward," in the table to the right.

Step 2. Press pushbutton A once and note the effect on the seven-segment display. Record the observed number in the table to the right, as count 1 in the forward direction.

Step 3. Continue in the same manner, pressing pushbutton A to increase the count, while recording each displayed number in its appropriate space in the "Forward," column of the table to the right. Complete this column of the table.

Step 4. Locate the 5" grounding wire that you set aside at the beginning of this experimental procedure. Connect one end to any convenient contact in the ground bus of your breadboard socket. Connect the other end to pin 10 of your 4029 IC, where the 10K resistor is connected. When you have completed this connection, press pushbutton B and record the displayed number in the table to the right, as count 0 in the "Reverse" column.

Step 5. Press pushbutton A again, observing the resulting display on your seven-segment LED as you do so. For each count, record the displayed digit for that count in the table to the right. Continue until you have completed the table.

Step 6. Look over your results as given in the now-completed table. Based on your results in previous experiments in this group, are these the results you expected to see in this experiment? If not, how do your actual results differ from your expectations?

Clock
Pulse
Display
Forward Reverse
0
1
2
3
4
5
6
7
8
9
10

### Discussion

When you turned on power in Step 1, both pushbuttons were briefly activated. Pushbutton A attempted to increment the random initial count in the 4029 counter IC, but pushbutton B overrode this and caused the IC to load a preset count of 0000. This cleared the counter and left the seven-segment display showing the digit 0.

In Steps 2 and 3, you applied clock pulses to the counter from pushbutton A. With each pulse, the count incremented by 1 and the displayed digit followed suit. On the tenth clock pulse, the displayed digit changed from 9 to 0, as the counter "wrapped around" and restarted.

The grounding wire you installed in Step 4 served to place the 4029 in "count down" mode. This didn't change the initial count, which was still 0. Then, in Step 5, you demonstrated that the counter does indeed count down now, so that the displayed number for count 1 was 9, then 8, and so on down to 0 again.

Comparing your results with prior experiments, you should have found that the behavior of the counter was no different, and your seven-segment display should have reflected this. The 4029 was set as a decimal counter (pin 9 is grounded to logic 0), and the Preset Enable input at pin 1 (connected to pushbutton B) is used as a Reset control, since all four Jam inputs are grounded. The connection to pin 10 determines whether the 4029 counts up or down. The 10K resistor initially connected this pin to +5 volts (logic 1) to cause it to count up. When you grounded this pin, you changed it to logic 0, so the 4029 counted down.

This combination of counter IC, seven-segment decoder/driver IC, and seven-segment display serves as a complete one-digit counter/display system. By using a number of these circuits with the counter sections cascaded, we can create a multi-digit counter of any size we want, according to how we might want to use it.

When you have completed this experiment, make sure power to your experimental circuit is turned off. Remove all of your experimental components from your breadboard socket and set them aside for use in future experiments.