Jump to content

Ring counter: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Ring Counter (4-bits): That picture is a johnson counter instead of a ring counter, ring counter don't have the inverter at the end
Undid revision 633363380 by 202.62.95.53 (talk)
Line 4: Line 4:
* A ''straight ring counter'' or ''Overbeck counter''<!--(after ? Overbeck)--> 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. For example, in a 4-register [[one-hot]] counter, with initial register values of 1000, the repeating pattern is: 1000, 0100, 0010, 0001, 1000... . Note that one of the registers must be pre-loaded with a 1 (or 0) in order to operate properly.
* A ''straight ring counter'' or ''Overbeck counter''<!--(after ? Overbeck)--> 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. For example, in a 4-register [[one-hot]] counter, with initial register values of 1000, the repeating pattern is: 1000, 0100, 0010, 0001, 1000... . Note that one of the registers must be pre-loaded with a 1 (or 0) in order to operate properly.


* A ''twisted ring counter'', also called ''Johnson counter''<!--(probably after Thomas L. Johnson<ref>Thomas L. Johnson [http://dl.acm.org/citation.cfm?id=17196 "A comparison of MC68000 family processors"], BYTE Volume 11 Issue 9, Sept. 1986.</ref>)--> or ''Möbius counter'' (also ''Möbius''<!--after ? Moebius-->), connects the complement of the output of the last shift register to the input of the first register and circulates a stream of ones followed by zeros around the ring. For example, in a 4-register counter, with initial register values of 0000, the repeating pattern is: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000... .
* A ''twisted ring counter'', also called ''Johnson counter''<!--(probably after Thomas L. Johnson<ref>Thomas L. Johnson [http://dl.acm.org/citation.cfm?id=17196 "A comparison of MC68000 family processors"], BYTE Volume 11 Issue 9, Sept. 1986.</ref>)--> or ''Möbius counter'' (also ''Moebius''<!--after ? Moebius-->), connects the complement of the output of the last shift register to the input of the first register and circulates a stream of ones followed by zeros around the ring. For example, in a 4-register counter, with initial register values of 0000, the repeating pattern is: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000... .


== Four-bit ring counter sequences ==
== Four-bit ring counter sequences ==

Revision as of 10:27, 18 November 2014

A ring counter is a type of counter composed of a type circular shift register. The output of the last shift register is fed to the input of the first register. The hamming distance of a Johnson counter is 1, the hamming distance of an Overbeck counter is 2.

There are two types of ring counters:

  • A 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. For example, in a 4-register one-hot counter, with initial register values of 1000, the repeating pattern is: 1000, 0100, 0010, 0001, 1000... . Note that one of the registers must be pre-loaded with a 1 (or 0) in order to operate properly.
  • A twisted ring counter, also called Johnson counter or Möbius counter (also Moebius), connects the complement of the output of the last shift register to the input of the first register and circulates a stream of ones followed by zeros around the ring. For example, in a 4-register counter, with initial register values of 0000, the repeating pattern is: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000... .

Four-bit ring counter sequences

Straight ring/Overbeck counter Twisted ring/Johnson counter
State Q0 Q1 Q2 Q3 State Q0 Q1 Q2 Q3
0 1 0 0 0 0 0 0 0 0
1 0 1 0 0 1 1 0 0 0
2 0 0 1 0 2 1 1 0 0
3 0 0 0 1 3 1 1 1 0
0 1 0 0 0 4 1 1 1 1
1 0 1 0 0 5 0 1 1 1
2 0 0 1 0 6 0 0 1 1
3 0 0 0 1 7 0 0 0 1
0 1 0 0 0 0 0 0 0 0

Johnson Counter (4-bits)

A 4-bit Ring counter using D-type flip flops with asynchronous clear. (Line-negations drawn as circle.)[1]

Applications

Ring counters are used in hardware logic design(e.g. ASIC & FPGA) to create simple finite state machines. A binary counter will require an adder circuit which is substantially more complex than a ring counter. Additionally, the worst case propagation delay on an adder circuit will be proportional to the number of bits in the code (due to the carry propagation). The propagation delay of a ring counter will be a constant regardless of the number of bits in the code. The complex combinational logic of an adder can create timing errors which may result in erratic hardware performance. Last, ring counters with Hamming distance 2(or more) allow the detection of single bit upsets that can occur in hazardous environments.

The disadvantage of ring counters is that they are lower density codes. A binary counter can represent 2^N states, where N is the number of bits in the code, whereas an Overbeck counter can represent only N states and a Johnson counter can represent only 2N states. This may be an important consideration in hardware implementations where registers are more expensive than combinational logic (e.g. FPGA).

See also

References

  • Crowe, John; Hayes-Gill, Barrie (1998). Introduction to Digital Electronics. Newnes. p. 161. ISBN 0-340-64570-9.
  • Mohamed Rafiquzzaman. Fundamentals of digital logic and microcomputer design, John Wiley and Sons, 2005, p. 166.
  • B. Somanathan Nair, Digital electronics and logic design, PHI Learning Pvt. Ltd., 2004, p. 134.