Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABSTRACT:
In this project the unwanted signals are removed. when the button on FPGA is pressed,
there are unpredictable bounces which are unwanted. This verilog code is to debounce buttons on
FPGA by only generating a single pulse with a period of the input clock when the button on
FPGA is pressed, held long enough, and released. Debouncing, of course, is the process of
removing the bounces, of converting the brutish realities of the analog world into pristine ones
and zeros. Both hardware and software solutions exist, though by far the most common are those
done in a snippet of code.
1
VLSITD SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY
4. BLOCK DIAGRAM:
5. SOFTWARE CODE:
Following is the Verilog code for debouncing button.
counter <= 0;
else
counter <= (counter>=249999)?0:counter+1;
end
assign slow_clk_en = (counter == 249999)?1'b1:1'b0;
endmodule
// D-flip-flop with clock enable signal for debouncing
module module my_dff_en(input DFF_CLOCK, clock_enable,D, output reg Q=0);
always @ (posedge DFF_CLOCK) begin
if(clock_enable==1)
Q <= D;
end
endmodule
pb_1 = 0;
#10;
pb_1=1;
#40;
pb_1 = 0;
end
endmodule
6. RESULTS:
RTL SCHEMATIC:
SYNTHESIS SCHEMATIC:
5
VLSITD SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY
STIMULATION RESULT:
PROJECT SUMMARY:
6
VLSITD SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY
7.APPLICATIONS:
A debouncing circuit removes the resulting ripple signal, and provides a clean transition at
its output.
8. CONCLUSION:
Debouncing buttons on fpga is a method used to prevent bouncing. It is any kind of hardware
device or software that ensures that only a single signal will be acted upon for a single
opening or closing of a contact. It will ensure that it prevent ripple in the signal and allow to
provide a clear transition of the signal.
9. REFERENCES:
7
VLSITD SREENIDHI INSTITUTE OF SCIENCE AND TECHNOLOGY