ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:26.47KB ,
资源ID:4926116      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-4926116.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(EDA课程设计键盘扫描电路设计.docx)为本站会员(b****3)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

EDA课程设计键盘扫描电路设计.docx

1、EDA课程设计键盘扫描电路设计EDA课程设计-键盘扫描电路设计 作者: 日期: 电子课程设计 键盘扫描电路设计 学院: 班级: 姓名: 学号: 指导老师: 2009年12月1.设计任务与要求 12.功能模块 23.选择器件 34.功能模块 55.设计总体电路图 86.心得体会 10一、 设计任务与要求1、键盘按钮数为4,系统时钟10MHz;2、 能识别出所按按钮;3、 按钮被按下后,视为此按钮输入一次,若按钮长时间不松,(时限1S)后每隔0.5S视为再次输入,直至按钮松开;4、要求能对按钮按下时指令的抖动能正确处理。对持续时间小于50ms的输入不作响应;5、各键设置不同优先级,多键同时按下时,

2、视为优先级较高的按键被按下;二、 功能模块 图3 模块delta其VHDL语言如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_unsigned.all;entity keyboard4_4 is port( rst : in std_logic; clk_in : in std_logic; keyin : in std_logic_vector(3 downto 0); scan : out std_logic_vector(3 downto 0);

3、leds : out std_logic_vector(3 downto 0); state : out std_logic; VGA : out std_logic_vector(3 downto 0) );end keyboard4_4;architecture keyboard4_4_arch of keyboard4_4 is-* component debouncing port( key : IN STD_LOGIC ; clk,clr : IN STD_LOGIC ; dly_out : OUT STD_LOGIC ) ; end component ;-*- signal cl

4、kfrq : std_logic; signal cntscn : std_logic_vector(1 downto 0); signal scnlin : std_logic_vector(3 downto 0); signal cntfrq : std_logic_vector(14 downto 0); -signal cntfrq : std_logic_vector(3 downto 0); signal lednum : std_logic_vector(7 downto 0); signal key_tmp : std_logic_vector(3 downto 0); sig

5、nal clk : std_logic; signal cntfrq1 : std_logic_vector(5 downto 0);begin VGA = 0101; -键盘功能选择 scan = not scnlin; lednum = scnlin & (not key_tmp); - key_tmp keyin(0) , DLY_OUT = key_tmp(0) , clr=rst, clk = CLK ); U2: debouncing PORT MAP ( KEY = keyin(1) , dly_out = key_tmp(1) , clr=rst, clk = CLK ); U

6、3: debouncing PORT MAP ( key = keyin(2) , dly_out = key_tmp(2) , clr=rst, clk = CLK ); U4: debouncing PORT MAP ( key = keyin(3) , dly_out = key_tmp(3) , clr=rst, clk = CLK );END block debounuing ;-*- process(rst,clk_in) - 晶振为40MHz,进行40000分频产生去抖时钟(1000Hz) begin if rst = 0 then cntfrq 0); elsif rising

7、_edge(clk_in) then if (cntfrq = 100111000011111 or not (key_tmp=1110 or key_tmp=1101 or key_tmp=1011 or key_tmp=0111) ) then -if (cntfrq = 100111000011111 or key_tmp=1111 ) then -if cntfrq = 1111 then cntfrq 0); clk = not clk;-去抖时钟 else cntfrq = cntfrq + 1; end if; end if; end process; process(rst,c

8、lk) -去抖时钟,50分频,形成扫描时钟 begin if rst = 0 then clkfrq = 0; cntfrq1 0); elsif rising_edge(clk) then if cntfrq1 = 11000 then cntfrq1 0); clkfrq = not clkfrq; else cntfrq1 = cntfrq1 + 1; end if; end if; end process; process(rst,clkfrq) - 根据扫描时钟产生扫描线 begin if rst = 0 then cntscn = 00; elsif rising_edge(clk

9、frq) then if cntscn = 11 then cntscn = 00; else cntscn scnlin scnlin scnlin scnlin null; end case; end if; end process; process(rst, clkfrq) - 根据按键点亮相应的leds begin if(rst = 0 ) then leds leds leds leds leds leds leds leds leds leds leds leds leds leds leds leds leds null; end case; end if; end proces

10、s; process(rst,key_tmp) begin if(rst = 0 ) then state = 1; elsif (key_tmp=1110 or key_tmp=1101 or key_tmp=1011 or key_tmp=0111) then state = 0; elsif (key_tmp=1111) then state = 1; end if; end process; end keyboard4_4_arch;三、 心得体会经过两周的课程设计,由于是第一次,过程有点曲折,有点累,但最后能得到理想的结果,心里感到特别高兴。因为是课程设计,需要制定一个最合理的方案。这就锻炼了我们理论分析、比较,联系实际情况的能力。由于需要各个方面的材料和数据,我们需要运用各种手段去查找资料,这增长了我们自学的能力。在电路的生成和调试过程中,我们遇到了各种问题,通过对种种问题的解决,我们在工程实际的层次上更进一步理解理论知识。我们不仅更好地理解了所学的理论知识,更重要的是把知识从书中提炼出来运用到生活当中,这是一种质的飞跃。在这次课程设计当中也离不开老师的帮助,他们尽心尽责给了我很大的帮助,非常感谢。

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2