Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| learn:programmable-logic:tutorials:counter-and-clock-divider:start [2016/07/13 17:02] – Sam K | learn:programmable-logic:tutorials:counter-and-clock-divider:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| A lot of interesting things can be built by combining arithmetic circuits and sequential elements. In this project, we are going to provide arithmetic circuits with timing references by integrating arithmetic circuits with flip-flops. In the first part, we are going to use an adder with a register file (an array of flip-flops) to implement a counter that increases the number by 1 when the rising edge of the clock arrives. In the second part, we are going to revisit clock dividers. We will then implement a clock divider whose frequency can be more precisely calculated compared to the clock divider implemented in the previous projects. | A lot of interesting things can be built by combining arithmetic circuits and sequential elements. In this project, we are going to provide arithmetic circuits with timing references by integrating arithmetic circuits with flip-flops. In the first part, we are going to use an adder with a register file (an array of flip-flops) to implement a counter that increases the number by 1 when the rising edge of the clock arrives. In the second part, we are going to revisit clock dividers. We will then implement a clock divider whose frequency can be more precisely calculated compared to the clock divider implemented in the previous projects. | ||
| - | ==== Prerequisites ==== | + | ===== Prerequisites ==== |
| * | * | ||
| - | === Software === | + | ==== Software |
| * <wrap todo> | * <wrap todo> | ||
| - | * [[reference/software/adept/start]] | + | * [[software:adept:start]] |
| - | === Hardware === | + | ==== Hardware |
| - | * Xilinx ISE compatible board such as [[[[reference/ | + | * Xilinx ISE compatible board such as [[programmable-logic:nexys-4:start]], [[programmable-logic:basys-3:start]], [[programmable-logic:nexys-2:start]], or [[programmable-logic:basys-2:start]] |
| + | ===== Procedure ===== | ||
| ==== 1. Design an 8-bit Counter ==== | ==== 1. Design an 8-bit Counter ==== | ||
| A counter is no more than an adder with a flip-flop for each of the output bits. The block diagram of a counter is shown below in Fig. 1. | A counter is no more than an adder with a flip-flop for each of the output bits. The block diagram of a counter is shown below in Fig. 1. | ||
| Line 106: | Line 107: | ||
| Now that we have a counter that increases by 1 when the clock rising edge arrives and a clock divider that can provide a clock signal that is exactly 1 Hz, we can now write a wrapper module. In the wrapper, we can use the output of this clock divider to provide the clock signal for the 8-bit counter we designed in Step 1. Thus, we get a counter that increases every second. Tie the outputs of the counter to the LEDs. | Now that we have a counter that increases by 1 when the clock rising edge arrives and a clock divider that can provide a clock signal that is exactly 1 Hz, we can now write a wrapper module. In the wrapper, we can use the output of this clock divider to provide the clock signal for the 8-bit counter we designed in Step 1. Thus, we get a counter that increases every second. Tie the outputs of the counter to the LEDs. | ||
| - | ==== Challenges ==== | + | ===== Challenges |
| - Can you implement a counter that counts every 100 ms? | - Can you implement a counter that counts every 100 ms? | ||
| - Can you display the output of the counter on a seven segment display? | - Can you display the output of the counter on a seven segment display? | ||
| + | {{tag> | ||

