Synchronous Counter Design

A finite-state machine determines its outputs and its next state from its current inputs and current state. A synchronous finite state machine changes state only when the appropriate clock edge occurs.

The following diagram shows a sequential circuit that consists of a combinational logic block and a memory block. For simplicity, we limit the design to one input and 2 JK flip flops. You will learn to derive the combination logic that meets the design specifications.

State Diagram

The steps to design a Synchronous Counter using JK flip flops are:

1. Description

Describe a general sequential circuit in terms of its basic parts and its input and outputs.

Design a 2 bit up/down counter with an input D which determines the up/down function. Thus when D=0, the count sequence is 00,01,10,11,00 ... when D=1, the count sequence is 00,11,10,01,00 ...

2. State Diagram

Draw the state diagram for the given sequence.

State Diagram

3. Next State table

Develop a next-state table for the specific counter sequence. Using the state diagram as a reference, fill up the present state and next state (yellow) columns.

For this interactive table, you can modify the next state. After you have changed the values, press the Calculate button. Press the Reset button to reset the page to the initial data.

Present StateNext StateJK flip flop inputs
DQAQBQAQBJAKAJBKB
000010X1X
001101XX1
01011X01X
01100X1X1
100111X1X
101000XX1
11001X11X
11110X0X1

4. FF transition table

Next, the FF transition table (blue) is completed using data from the respective present state, next state and the JK flip flop transition table below. Click on any blue cell to understand how its value is obtained.

JK Flip Flop Truth Table
JKQ
00Qo
010
101
11Toggle
JK Flip Flop Transition Table
QNQN+1JK
000X
011X
10X1
11X0

The JK flip flop truth table is not required in the design procedure but has been included to explain how the JK flip flop transition table is obtained. Click on any green cell of the JK flip flop transition table to learn how its value has been derived.

5. K Map

Use K-map to derive the boolean expression.

JA = D QB + D QB
QAQB \ D01
0001
0110
11XX
10XX
KA = D QB + D QB
QAQB \ D01
00XX
01XX
1110
1001
JB = 1
QAQB \ D01
0011
01XX
11XX
1011
KB = 1
QAQB \ D01
00XX
0111
1111
10XX

6. Boolean Expression

Use the boolean expressions to implement the counter.

State Diagram Simulate and Breadboard the Up Down Counter circuit.