Design of 4-bit BCD counters (asynchronous reset)
Prerequisites: Study of the functionality of BCD counter (asynchronous reset).
Learning Objective: To develop the source code for BCD counter (asynchronous reset) by using VERILOG and obtain the simulation, synthesis, place and route and implement into FPGA.
Software and Hardware: Xilinx ISE 9.2i and FPGA Spartan-3E.
Theory:
An Asynchronous counter can have 2n-1 possible counting states e.g. MOD-16 for a 4-bit counter, (0-15). For BCD counter forcing the counter to reset itself to zero at a pre-determined value producing a type of asynchronous counter that has truncated sequences. Then an n-bit counter that counts up to its maximum modulus ( 2n ) is called a full sequence counter and a n-bit counter whose modulus is less than the maximum possible is called a Truncated Counter.
But why to create an asynchronous truncated counter that is not a MOD-4, MOD-8, or some other modulus that is equal to the power of two. Modulo-16 asynchronous counter can be modified with additional logic gates to give a decade (divide-by-10) counter output for use in standard decimal counting and arithmetic circuits.
Such counters are generally referred to as Decade Counters. A decade counter requires resetting to zero when the output count reaches the decimal value of 10b, i.e. when DCBA = 1010b and feed this condition back to the reset input. A counter with a count sequence from binary “0000” (BCD = “0”) through to “1001” (BCD = “9”) is generally referred to as a BCD (Binary-Coded-Decimal) counter because its ten state sequence, is that of a BCD code sequence.
Counter Resets its Outputs back to Zero
Block Diagram:
Verilog Code:
(a) Using Synchronous Reset:
Test Bench Code:
Simulation Results:
Result: Thus the OUTPUT of BCD counter is verified by synthesizing and simulating the VERILOG code.
Learning Outcome: After completion of this experiment students are able to design BCD using Verilog code.
Viva Questions:
- What is the function of counter?
- What are the major elements of counters?
- How many flip flops are used to design a 10 bit counter?
- Realize asynchronous counter using T flip-flop.
- What are applications of counters?
- Design mod-5 synchronous counter using T FF
-
UpdatedOct 30, 2016
-
Views3,914