0% found this document useful (0 votes)
244 views17 pages

Lecture3 Chapter6 - Counters With Unused States

This document discusses counters with unused states, including ring counters and Johnson counters. It provides examples of a 3-bit counter with unused states and a 4-bit ring counter. A Johnson counter is described as a circular shift register with the complement output of the last flip-flop connected to the input of the first flip-flop, allowing it to cycle through 2k states with k bits. A 4-bit Johnson counter example is shown along with its timing diagram and state decoding using NOR gates. The document notes that while Johnson counters can generate multiple timing sequences, they are not self-correcting without modifications to account for unused states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
244 views17 pages

Lecture3 Chapter6 - Counters With Unused States

This document discusses counters with unused states, including ring counters and Johnson counters. It provides examples of a 3-bit counter with unused states and a 4-bit ring counter. A Johnson counter is described as a circular shift register with the complement output of the last flip-flop connected to the input of the first flip-flop, allowing it to cycle through 2k states with k bits. A 4-bit Johnson counter example is shown along with its timing diagram and state decoding using NOR gates. The document notes that while Johnson counters can generate multiple timing sequences, they are not self-correcting without modifications to account for unused states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Chapter6: Registers and Counters

Lecture3- Counters with Unused States


Engr. Arshad Nazir, Asst Prof
Dept of Electrical Engineering
Fall 2022 SEECS 1
Objectives
• Study Counters with Unused states

Fall 2022 2
Other Counters
• n flip-flops can produce 2n binary states
• Some counters have truncated modulus and have states that are not used
in specifying the FSM. Such states
 may be treated as don’t-care conditions or
 may be assigned specific next states
• Self-correcting counter
 Ensure that when a counter enters one of its unused states on power
up, it eventually goes into one of the valid states after one or more
clock pulses so it can resume normal operation.
 Analyze the counter to determine the next state from an
unused state after it is designed

Fall 2022 3
Example: Counter with unused States

Count: 0, 1, 2, 4, 5, 6, and repeat. Two unused states: 011 & 111


The simplified flip-flop input equations using map method are:
JA = B, KA = B
JB = C, KB = 1
JC = B, KC = 1
Fall 2022 4
The logic diagram & state diagram of the counter

Fall 2022 5
Ring counter
• The timing signals that control the sequence of operations in a digital system
can be generated either with a shift register or a counter with a decoder.
• A ring counter is a circular shift register with only one flip-flop being set at any
particular time, all others are cleared
(initial value = 1 0 0 … 0 )
• The single bit is shifted from one flip-flop to the next to produce the
sequence of timing signals.
• A 4-bit Ring counter can be designed using conventional design procedures to
follow the sequence 0001, 1000, 0100, 0010, and repeat. We can take
advantage of 12 unused states as don’t cares to optimize the design. Any type
of flip-flops can be used in the design. The behavior of unused states will
reveal that it is not self-correcting.

Fall 2022 6
Ring counter
• A 4-bit ring counter will follow the following counting sequence

A3 A2 A1 A0
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
1 0 0 0

Fall 2022 7
Ring counters
• Application of counters
 Counters may be used to generate timing signals to control the sequence of
operations in a digital system.
• Approaches for generation of 2n timing signals
1. a shift register with 2n flip-flops
2. an n-bit binary counter together with an n-to-2n-line decoder

Fall 2022 8
Ring Counter Timing Signals

Fall 2022 9
Johnson counter
• Ring counter vs. Switch-tail ring counter
 Ring counter
– a k-bit ring counter circulates a single bit among the flip-flops to provide k
distinguishable states.
 Switch-tail ring counter (Johnson)
– is a circular shift register with the complement output of the last flip-flop connected
to the input of the first flip-flop
– a k-bit switch-tail ring counter will go through a sequence of 2k distinguishable states.
(initial value = 0 0 … 0)
• To generate 2n timing signals, we require either a shift register with 2n flip-flops or an n-bit
binary counter together with an n-to-2n-line decoder. For example, 16 timing signals can be
generated with a 16-bit shift register or a 4-bit binary counter and a 4-16 line decoder. It is
also possible to generate 16 timing signals with a combination of an 8-bit shift register and
8x 2-input AND gates. This combination is called a Johnson (Twisted) Ring counter. A
Johnson counter is not a self-correcting counter but after adding correction it can be made
self-correcting. Fall 2022 10
4-bit Johnson counter
• To provide for 2k timing signals, a k-bit switch-tail ring counter + 2k decoding gates are
required
• Example: 4-bit Johnson counter design

• The decoding follows a regular pattern


 2 inputs per decoding gate

Fall 2022 11
Johnson Counter Timing Diagram

Fall 2022 12
States decoding using NOR gates

Fall 2022 13
Johnson counter example: Switch-tail ring
counter

Fall 2022 14
Timing Signals with States decoding

Fall 2022 15
Important to note
• Disadvange of the switch-tail ring counter
 If it finds itself in an unused state, it will persist to circulate in the
invalid states and never find its way to a valid state.
 One correcting procedure: DC = (A + C) B
 ABC = 010 will make DC = 0 instead of DC = B = 1
• Summary:
 Johnson counters can be constructed for any # of timing sequences:
# of flip-flops = 1/2 (the # of timing signals)
# of decoding gates = # of timing signals
2-input per gate

Fall 2022 16
The End

Fall 2022 17

You might also like