VHDL中按键消抖的一种方法--延时性消抖
来源:互联网 发布:什么是网络平台 编辑:程序博客网 时间:2024/06/05 16:13
VHDL中按键消抖的一种方法--延时性消抖
在本例子中,input是按键的输入,output是消抖之后的按键输出
是clk经历8个上升沿之后就让output输出一个CLK周期的高电平!
本程序实例测试好用
library ieee;
use ieee.std_logic_1164.all;
entity PWlock is
port(clk: in std_logic;
input: in std_logic;
output: out std_logic
);
end PWlock;
architecture one of PWlock is
signal a:std_logic;
signal count:integer range 0 to 9;
begin
process(clk)
begin
if input='0' then
count<=0;
elsif (clk'event and clk='1') then
if count=9 then
count<=count; --like while(1) in the C program
else
count<=count+1;
end if;
end if; --for elsif
if count=8 then
a<='0';
else
a<='1';
end if;
end process;
output<=a;
end one;
- VHDL中按键消抖的一种方法--延时性消抖
- 基于延时采样的按键消抖方法
- 一种相对高效的按键消抖方法
- Lattice Diamond中VerilogHDL按键延时消抖
- android中模拟按键的另外一种方法
- STM32中关于检测按键的一些问题(关于采用传统的延时消抖方式和采用中断方式)
- 一种基于中断的按键检测方法
- 基于VHDL的按键扫描程序
- 按键消抖的方法
- 单片机嵌入式产生精确延时的一种方法
- VHDL中的延时问题
- tiny6410按键驱动(七)---定时器延时消抖
- 一种简单的软件延时
- 一种低功耗触摸按键应用的设计方法
- J2ME MIDP2.0 GameCanvas中对多个按键同时按下事件处理的一种方法
- vhdl中延时器的编写
- 独立按键的延时检测_20160227
- VHDL VHDL语言中buffer与inout的区别
- 01背包(递归)
- atoi函数介绍与代码实现
- 进程和线程的区别
- 魔兽争霸中的人生哲学----如何使自己变得强大
- Windchill 中实现获取带有层级记录的BOM功能
- VHDL中按键消抖的一种方法--延时性消抖
- 条件变量、pthread_cond_init
- LinkButton in WPF
- 01背包(递推)
- 国际C语言乱码大赛(IOCCC)经典之作
- GreenDroid(2)ActionBar的实现
- HDU 1164 分解成素数乘积的形式
- setsockopt()用法(参数详细说明)
- 字典树