Lab 8: Counters

Introduction

Sequential MSI devices often use counting circuits to track sequencing and timing and therefore are an essential part of a wide variety of digital designs. There are numerous types of counter that come packaged as TTL devices. Counters can also be constructed from standard TTL flip-flops. In this lab you will construct a four bit binary counter using a J-K flip-flop. You will also be introduced to the 74LS193 TTL MSI up/down counter which can operate synchronously and can be preset (parallel loaded) from an external 4 bit data source. Finally you will use this counter to drive the input data to a 7-segment decoder so the output can be displayed in a decimal number.

Equipment needed

 Microprocessor power supply Frequency generator Oscilloscope Solderless breadboard 2-74LS76 74LS193 74LS48 1-1000 ohm resistor

Procedure

Part 1--four bit up counter

1. Construct the four bit binary counter circuit shown in figure 1.

2. Set the switch SW1 to the high position. Apply power to the circuit. Note the states of the LED indicators. Record the binary number stored in the counter.

3. Momentarily set the B logic switch. Note the states of the LED's. Record the value of the binary word stored in the counter.

4. Make a truth table by stepping though counter states starting with state 0000. Record the LED indicators outputs after each time you set the A logic switch.

Does the change that takes place in the outputs occur on the leading or trailing edge of the A and B logic switches? What happens to the 1111 output when you set the A logic switch? What type of counter is this?

5. Connect a 1 Hz clock to the A input. Set the B logic switch and hold it. Watch the LED indicators. Then release the B logic switch let the counter count. As it counts every second, verify its outputs against the truth table from step 4. Let the counter run until you fully understand the counting sequence.

6. As the counter is counting, set data switch SW1 to the low position and observe the results. Repeat this procedure until you understand what is happening. Depress the B logic switch while the counter is counting and observe the outputs.

What do the SW1 and B switch do to the counter?

Part 2--four bit down counter

1. Modify the counter to conform to the circuit shown in figure 2. Apply power to the circuit and note the counter output state.

2. Momentarily set the B logic switch and record the counter output state.

3. Create a table of the output states starting with 0000. This is easily done by disconnecting the clock from input A and using it as A logic switch.

4. Convert the binary numbers you recorded in the table into their decimal equivalent and include them in the table.

What type of counter is this?

5. Connect the counter A input to a 1 Hz clock. Repeat steps 5 and 6 from part 1.

Part 3--74LS193 TTL MSI up/down counter

FIGURE 3

FIGURE 4

1. Wire the counter circuit shown in figure 3. The pin connections for the 74LS193 are shown in figure 4. This counter it sequentially stepped using the A logic switch. The counter is reset by the B logic switch. The data switches SW1-SW4 serve as a parallel data source for presetting the counter.

2. Apply power to the circuit. If the output state is anything other than 0000, reset it with logic switch B.

3. Create a truth table of the circuit by stepping the A logic switch. Compare this table with the table generated in step 4 of part 1.

Are this two tables the same? What type of counter is this circuit?

4. Rewire the B logic switch to pin 11 and pin 14 to GND. Set all the data switches (SW1-SW4) to binary 1. Set the B logic switch and note the output state of the counter.

5. Set all the data switches to binary 0 and again set the B logic switch noting the counter output.

6. Set the data switches to the words indicated below.

 SW4 SW3 SW2 SW1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0

After each word is set into the parallel input switches, set B logic switch and record the counter output state. Compare this output data to the input data.

What function is taking place?

7. With the data switches still set to 0110, set the B logic switch and again note the counter state. Then start stepping the counter with the A logic switch. What happens?

Part 4--decimal counter

1. Construct a circuit using the 74LS193 as an up counter which is connected to a 7-segment decoder (refer to the 7-segment decoder lab). Apply a 1 Hz clock to the input and connect the our bit output to the LED indicators as well as the 7-segment display driver/decoder. Draw your circuit using logicWorks and include it in you lab notebook. Good luck!