Counters are used to count and move the state of a circuit from one state to another. Whenever they are given a clock signal, either the system moves one state ahead or behind. It is not necessary to jump only one state. We can jump by a number of steps but for that, we would require circuitry. Counters are examples of sequential circuits. It requires a clock signal to function and states are changed at either positive edge of the negative edge of the clock. It is important to decide on the type of counter. We can design either an asynchronous counter or a synchronous counter. In an asynchronous counter, only the first flip-flop is dependent on the clock. The output of the first-floor shop act as a clock to the second flip-flop. Similarly, the output of the second flip-flipflop will act as the clock for the third flip-flop and it goes on. On the other side in a synchronous counter, each flip-flop receives the clock signal at the same time. So we can conclude that asynchronous counters are slower than the synchronous counter. Asynchronous counters required less circuit free then synchronous counter. For asynchronous counters, all the data will change one after another and will follow On the other hand, with a synchronous counter, data will change at the very moment, the clock is triggered either at the positive edge or the negative edge.
(adsbygoogle = window.adsbygoogle || []).push({}); Now as the titles suggest, we have to design Mod N counter Where N equals the number of the FFs. For example, if we have a MOD 2 counter hence it will go from 00 to 11. Here N denotes the number of flip-flops required to design the counter and will provide 2 to the power N States. Thus, we can easily make counters of 2, 4, 8, 16 states and so on.
(adsbygoogle = window.adsbygoogle || []).push({}); To design MOD counters, I’ll be using D flip-flop as they are most sophisticated and easy to use. To know about D flip-flops, you can follow this link.
https://gist.github.com/Shashi18/c4b8a3786d347aab80430409dad6f588.js
https://gist.github.com/Shashi18/117abe4047e1146821735429f6cbfbbc.js
//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
(adsbygoogle = window.adsbygoogle || []).push({});
MOD 8 Up Counter
Verilog Code:
https://gist.github.com/Shashi18/75151463e5cd9f6d0e3dfc7f4b662bc9.js
Output:
Cheers.



