Counters
- A counter can increment or decrement (typically by 1) the number in its storage
- An up-counter increments its counter, a down-counter decrements its counter
- If the counter updates all its bits at the same time, it is a synchronous counter, otherwise it's an asynchronous counter
- The output bits correspond to the binary number
T Flip-Flop Based Counters
See T flip-flop
Table - 3-Bit Up-Counter
Clock Cycle | |||
---|---|---|---|
0 | 0 | 0 | 0 |
1 | 0 | 0 | 1 |
2 | 0 | 1 | 0 |
3 | 0 | 1 | 1 |
4 | 1 | 0 | 0 |
5 | 1 | 0 | 1 |
6 | 1 | 1 | 0 |
7 | 1 | 1 | 1 |
8 | 0 | 0 | 0 |
Notice how, for example,
Asynchronous Counter
Circuit - 3-Bit Asynchronous Up-Counter Using T Flip-Flops
Timing Diagram
Synchronous Counter
Circuit - 4-Bit Synchronous Up-Counter using T Flip-Flops
Timing Diagram
Circuit - Synchronous Counter with Clear and Enable
D Flip-Flop Based Counters
See D flip-flop
Circuit - 4-Bit Synchronous Up-Counter using D Flip-Flops
Intuition
Recall that the implementation of a D Flip-Flop is just a T flip-flop with an XOR gate.
Modulo-n Counter
Circuit - Modulo 6 Counter Modulo 6 Counter with Synchronous Reset
Timing Diagram - Modulo 6 Counter with Synchronous Reset
Johnson Counter
Info
A 4-bit Johnson counter produces the sequence 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000, and so on
Circuit
Other Useful Counters
Ring Counter
- Only One output bit is one at any given time
- For example, a 4-bit ring counter produces the sequence 1000, 0100, 0010, 0001, 1000, and so on
- They can be designed with a DFF based shift register, with the first DFF set to 1
BCD Counter
todo Reading assignment