Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL source code required

Status
Not open for further replies.

msalehi

Newbie level 2
Joined
Dec 23, 2003
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
24
vhdl debounce

Hi
i have two questions and i would be thankfullif if any one mind to answer.
1-Does anyone have a synthesisable vhdl source code for debouncing a key. i have used the one at the ise vhdl template but it is not working properly. i am looking for a more effective one.

2. i am looking for a monostable either.
 

Bartart

Full Member level 2
Joined
Feb 20, 2002
Messages
124
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
Europt
Activity points
1,107
debounce vhdl

search for your code @ this site below:

h**p://www.eeng.dcu.ie/~ee404/Projects/db/index.html


bart
 

cesariv

Junior Member level 1
Joined
Mar 8, 2004
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
172
vhdl monostable

this is extracted from a Xilinx example code.

-- SWITCH DEBOUNCE --
process(osc_sw,reset, clk_scaler(14))
begin
if (reset = '0') then
debounce <= (others => '0');
elsif (clk_scaler(14)'event and clk_scaler(14) = '1') then
if (osc_sw = '0') then
debounce(0) <= '1';
else
debounce(0) <= '0';
end if;
debounce(1) <= debounce(0);
end if;
end process;

process(debounce,reset,clk_scaler(6),osc_sw_down)
begin
if (reset = '0') then
switch_clk <= '0';
osc_sw_down <= '0';
elsif (clk_scaler(6)'event and clk_scaler(6) = '1') then
if (debounce = debounce_end) then
if (osc_sw_down = '0') then
if (switch_clk = '0') then
switch_clk <= '1';
else
switch_clk <= '0';
end if;
osc_sw_down <= '1';
else
switch_clk <= '0';
end if;
else
switch_clk <= switch_clk;
osc_sw_down <= '0';
end if;
end if;
end process;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top