Debouncing circuit engr 360 hardware description languages


Lab Objective: To implement a Debouncing Circuit.

1. Create a project called Lab9.

2. Create one VHDL file named Debouncing.vhd.

3. Use Listing 5.6 as your starting point.

4. Simulate a bouncing switch, sw, and a debounced switch output, db.

5. Use a 1 microsecond clock in your simulation and a counter in your debouncing circuit that will wait approximately 16 [mS] in each wait state for a total of about 48 [mS].

6. You should get an output that looks like the following:

848_Output.jpg

7. Demo this to the instructor.

8. Create a new VHDL file called debouncing_test.vhd, which you will implement in the Spartan 3E board.

9. This program will be used to test your debouncing circuit as follows. You need to create two 4-bit counters that count based on the following conditions:

• First counter: Counts with a push of the "south" button on the board. Note: This will be a non-debounced (i.e. noisy) counter. It may advance more than one count with every push.

• Second counter: Counts with a debounced version of the same push of the south button that advances the first counter. Note: You should instantiate your debouncing circuit to obtained the debounced version of the button push.

10. The first counter should be displayed in LEDs 0 to 3 in the board (i.e. LSB in pin F12, MSB in pin F11).

11. The second counter should be displayed in LEDs 4 to 7 in the board (i.e. LSB in pin C11, MSB in pin F9).

12. The entity you must use for this circuit is given below:

entity debounce_test is
Port ( clk : in STD_LOGIC;
btn : in STD_LOGIC; -- south button reset : in STD_LOGIC; -- rotary button ctr_db : out STD_LOGIC_VECTOR (3 downto 0); ctr_btn : out STD_LOGIC_VECTOR (3 downto 0))
;
end debounce_test;

13. Hint: The bulk of the program is similar to listing 5.7 in your text.

14. Demo your implementation to the instructor.

Solution Preview :

Prepared by a verified Expert
Electrical Engineering: Debouncing circuit engr 360 hardware description languages
Reference No:- TGS02535972

Now Priced at $60 (50% Discount)

Recommended (90%)

Rated (4.3/5)