17
Counter with Unused States

Counter with memes

Embed Size (px)

Citation preview

Page 1: Counter with memes

Counter with Unused States

Page 2: Counter with memes

Counters with Unused States

• A circuit with n flip-flops has 2n states

• There are occasions when a sequential circuit uses fewer than there maximum possible number of states. States that are not used in specifying the sequential circuit are not listed in the stable table.

Page 3: Counter with memes

Counter with Unused States

Page 4: Counter with memes

Unused States• For example, here is a state table and

diagram for a counter that repeatedly counts 000, 001, 010, 100, 101, 110.

Present State Next State Q2 Q1 Q0 Q2 Q1 Q0

0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 ? ? ? 1 1 1 ? ? ?

Page 5: Counter with memes

Unused States• Unused states may be treated as don’t

care or assigned specific next statePresent State Next State Q2 Q1 Q0 Q2 Q1 Q0

0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 X X X 1 1 1 X X X

Present State Next State Q2 Q1 Q0 Q2 Q1 Q0

0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0

Page 6: Counter with memes

Ring Counters

• A ring counter is a type of counter composed of a circular shift register with only one flip-flop being set at any particular time.

• If the output of a shift register is fed back to the input. a ring counter results

• Two types of Ring Counters

• Straight Ring Counter• Switch-Tail Ring Counter or

Twisted Ring Counter

Page 7: Counter with memes

Straight Ring Counter• or Overbeck counter connects the output of the last

shift register to the first shift register input and circulates a single one (or zero) bit around the ring.

Page 8: Counter with memes

Straight Ring Counter

• Loading binary 1000 into the ring counter prior to shifting yields a viewable pattern. The data pattern for a single stage repeats every four clock pulses in our 4-stage example

Page 9: Counter with memes

Straight Ring Counter• The waveforms for all four stages look the

same, except for the one clock time delay from one stage to the next. See figure below.

Capable of generating different timing signals

Page 10: Counter with memes

Twisted Ring Counter(Johnson Counter)

• The number of state is (or can be) doubled by choosing this type of circuit.

• Like a Straight Ring counter a Johnson counter is a shift register fed back on its' self.

• If the complement output of a ring counter is fed back to the input instead of the true output, a Johnson counter results.

Page 11: Counter with memes

Johnson Counter

Page 12: Counter with memes

Johnson Counter

• This "reversed" feedback connection has a profound effect upon the behavior of the otherwise similar circuits. Circulating a single 1 around a ring counter divides the input clock by a factor equal to the number of stages. Whereas, a Johnson counter divides by a factor equal to twice the number of stages. For example, a 4-stage ring counter divides by 4. A 4-stage Johnson counter divides by 8.

Page 13: Counter with memes

Johnson Counter• Determine the output pulses for this counter

circuit, known as a Johnson counter, assuming that all Q outputs begin in the low state:

Page 14: Counter with memes

Johnson Counter

Ans.

Page 15: Counter with memes

Johnson Counter

• The above waveforms illustrates that multi-phase square waves are generated by a Johnson counter. The 4-stage unit above generates four overlapping phases of 50% duty cycle.

Page 16: Counter with memes

Ring Counter

Page 17: Counter with memes