usb
发表于 2010-6-26 21:39:29
还有一个办法,将键值输入连续采样4级(移位寄存),当前3级为0最后一级为1时让翻转器翻转,即就是松键时翻转<br>
这样稳定可靠,2句话搞定,楼主可以试试.采样移位寄存越长越 不容易出错.<br>
sampling_reg<=key & sampling_reg(3 downto 0);<br>
if(sampling_reg="0001")then--松键输入'0'<br>
led<=not led;<br>
end if;
CHANG
发表于 2010-6-26 22:35:43
我把你们的方法都去试验一下<br>
谢谢各位了
CHA
发表于 2010-6-27 00:32:23
Verilog HDL 中有说可以上拉<br>
楼主考虑下?
Sunlife
发表于 2015-6-25 10:45:19
既然是按键,又生成一个锁存器,检测按键没有消抖电路