Digital Logic Design · Lab 14 · read before the labAll labsGo to the lab →

Counting clock pulses.

A counter goes through a fixed sequence of states, one per clock pulse. Build it as a ripple of flip flops or with one shared clock.

01

What a counter does

Q3=0Q2=0Q1=0Q0=0

Count 0. Four flip flops count 0 to 15.

02

Ripple counters

J = K = 1 makes a J-K flip flop toggle at every falling clock edge. Feed the clock to the first flip flop and each Q to the clock of the next: each stage divides the frequency by two and the outputs count in binary. The change ripples from stage to stage, so the outputs do not all change at the same instant.

03

Mod N

2ⁿ

n flip flops count 0 to 2ⁿ - 1: four give mod 16.

clear at N

For mod 10, detect 1010 with a NAND of Q1 and Q3 and clear all flip flops: 1010 lasts only a moment.

7473

VCC is pin 4 and GND pin 11 on the 7473. The clear inputs are active LOW.

04

Synchronous counters

All flip flops share the clock and change together. A stage toggles only when every stage below it is 1: J0 = K0 = 1, J1 = K1 = Q0, J2 = K2 = Q0 Q1 (an AND gate).

05

The 74192

74192Synchronous decade up/down counter1B2QB3QA4DOWN5UP6QC7QD8GND9D10C11LOAD12CO13BO14CLR15A16VCC

Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.

Count up with the clock on UP (pin 5) and DOWN held HIGH; count down with the clock on DOWN (pin 4) and UP HIGH. CLR (pin 14) is active HIGH, so keep it LOW; LOAD (pin 11) is active LOW, keep it HIGH. CO and BO signal 9 to 0 and 0 to 9 for a second chip.

06

Timing diagram

Draw the clock and Q0 to Q3 one under the other: Q0 has half the clock frequency, Q1 a quarter and so on. In the lab, open the Timing tab, run the clock at about 1 Hz, and the diagram draws itself; save it as a picture for your report.

07

Check yourself

Q1A clock of 8 Hz drives a 4 bit ripple counter. What is the frequency of Q3?

0.5 Hz (8 / 16).

Q2Which outputs feed the NAND of a mod 10 counter?

Q1 and Q3 (the 1s of 1010).

Q3Why is the synchronous counter faster than the ripple counter?

All flip flops change at the same clock edge; no stage waits for the one before.

Q4What must CLR and LOAD of the 74192 be to count?

CLR LOW and LOAD HIGH.

I am ready, go to the lab →