Professional Documents
Culture Documents
❑ Circuits that include flip flops are usually classified by the function they perform. Example – Registers,
Counters
❑ Output increases by one in each clock cycle and comes back to 0 after reaching the maximum value.
❑ The combinations of flip-flops that perform counting function are known as Counters.
- Synchronous/Parallel Counter
Asynchronous Counters
❑ Clock input of the following flip-flops is driven by the output of the previous stage flip-flops.
❑ Flip-flops in the counter circuit do not change states simultaneously because they do not have a common
clock pulse.
- Up counters 00 01 10 11 00
- Down counters 00 11 10 01 00
❑ D and T flip-flops can also be used but they require for more circuitry due to absence of toggle and no change
states.
J0 = K0 = 1
J1 = K1 = Q1 Q’3
J2 = K2 = Q1 Q0
J3 = K3 = Q2 Q1 Q0 + Q3 Q0
SYNCHRONOUS DECADE COUNTER
❑ Initial state – Both flip-flops are reset. State – Q3 Q2 Q1Q0 - 0000
❑ Output of one flip-flop is connected to the CLOCK input of the next stage flip-flop.
Q1Q0
Initial stage - 00
1st CLK - 01
2nd CLK - 10
3rd CLK - 11
4th CLK - 00
4-BIT ASYNCHRONOUS COUNTER
Q3 Q2 Q1 Q0
Initial stage - 0000 4th - 0100 8th - 1000 12th - 1100 16th - 0000
0000 – 0001 – 0010 – 0011 – 0100 – 0101 – 0110 – 0111 – 1000 – 1001 – 0000
ASYNCHRONOUS DECADE COUNTER
❑ The counter counts upwards with clock signal starting from 0000 till 1001.
❑ All the flip-flops would be cleared implying that they would all be reset i.e. 0 state.
ASYNCHRONOUS COUNTER USING T FLIP-FLOP
ASYNCHRONOUS COUNTER USING D FLIP-FLOP
3-BIT SYNCHRONOUS UP-DOWN COUNTER
1 2 3
3-BIT SYNCHRONOUS UP-DOWN COUNTER
❑ Attributes of an up and down counter are combined in a single counter.
❑ If the output of every flip-flop (Q) within a counter is received on every next flip-flop, then it acts as an up-
counter.
❑ If the complemented output of every flip-flop present inside the counter is received on every next flip-flop,
such a counter is a down counter.
❑ The count up control line and count down control line decide the mode of operation of the counter.
J0 = K0 = 1
J1 = K1 = (A . COUNT-UP) + (A . COUNT-DOWN)
J2 = K2 = (B . COUNT-UP) + (B . COUNT-DOWN)
3-BIT SYNCHRONOUS UP-DOWN COUNTER
CLOCK
A
UP
B
C
A
CLOCK
DOWN B
C
4-BIT BINARY COUNTER WITH PARALLEL LOAD
❑ Counters employed in digital systems quite often require a parallel load capability for transferring an initial binary
number before the count operation.
❑ The binary counter has a parallel load capability and can also be cleared to 0.
❑ The input load control when equal to I disables the count operation and causes a transfer of data from the four
parallel inputs into the four flip-flops (provided that the clear input is 0).
❑ If the clear and load inputs are both 0 and the increment input is I, the circuit operates as a binary counter.
4-BIT BINARY COUNTER WITH PARALLEL LOAD
4-BIT BINARY COUNTER WITH PARALLEL LOAD
❑ Clear = 0, clears the counter, irrespective of its state.
❑ When Clear = 1, then only LOAD and COUNT operations take place.
❑ LOAD = 1, causes transfer of inputs into the register at the positive edge of the CLOCK pulse.
0 X X X Clear to 0
1 1 X Load inputs
1 0 1 No change
SYNCHRONOUS COUNTER DESIGN
❑ Procedure:
1. Obtain the state diagram – shows the progression of states through which counter advances.
4. Using K-maps, determine the simplified logic functions for the flip flops.
❑ Steps 2 and 3
MOD-4 SYNCHRONOUS UP COUNTER WITH JK FLIP FLOP
❑ Step 4
MOD-4 SYNCHRONOUS UP COUNTER WITH JK FLIP FLOP
❑ Step 5
EXAMPLE
❑ Design a synchronous counter using D flip flops that goes through states 0, 1, 2, 4, 0. The unused states must
always go to zero on the next clock pulse.
EXAMPLE
Q3 Q2 Q1 Q3 Q2 Q1 D3 D2 D1
0 0 0 0 0 1 0 0 1
0 0 1 0 1 0 0 1 0
0 1 0 1 0 0 1 0 0
0 1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0
D2 = Q’3 Q’2 Q1
D3 = Q’3 Q2 Q’1
EXAMPLE
3-BIT UP COUNTER (GRAY CODE) USING JK FLIP FLOPS
3-BIT UP COUNTER (GRAY CODE)
3-BIT UP COUNTER (GRAY CODE)
SHIFT REGISTER COUNTERS
❑ Shift registers with the serial output connected back to the serial input.
❑ They are classified as counters because they give a specified sequence of states.
❑ Two common types: the Johnson counter and the Ring counter.
RING COUNTER
❑ The output of the last stage is connected to the D input of the first stage.
100000
Clock Q0 Q1 Q2 Q3 Q4 Q5
0 1 0 0 0 0 0 000001 010000
1 0 1 0 0 0 0
2 0 0 1 0 0 0 000010 001000
3 0 0 0 1 0 0
4 0 0 0 0 1 0 000100
5 0 0 0 0 0 1
RING COUNTER TIMING DIAGRAM
RING COUNTER
❑ Ring Counters can be implemented using D and JK flip flops.
❑ Applications –
❑ Require fewer flip-flops than ring counters but more flip-flops than binary counters.
❑ Used in LEDs
❑ To detect certain
patterns