网站大量收购独家精品文档,联系QQ:2885784924

EDA实验报告数字钟.doc

  1. 1、本文档共13页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
?南昌大学卖验掖告 学生姓名: 刘光林 学 号:6100209064 专业班级:卓越(3+1 ) 实验类型:□验证□综合■设计□创新 实验日期: 实验成绩: 实验四多功能数字钟设计 —x实验设计 1、 数字显示当前的小时、分钟; 2、 闹钟和24小时计时显示; 3、 一个调节键,用于调节目标数位的数字。对调节的内容敏感,如调节分钟或 秒时,保持按下时自动计数,否则以脉冲计数; 4、 一个功能键,用于切换不同状态:计时、调时、调分、调秒。 二实验步骤 根据实验要求可以将该工程设计几个模块: 1、秒计时模块 代码: 11brary ieee; use ieee. std_logic_1164. all; use icee. std_logic_unsigncd. al 1; entity second is port (elk,reset,setmin:in std_logic; enmin:out std_logic; sout:out std_logic_vector (7 downto 0)); end second; architecture bhv of second is signal count:std logic vector(7 downto 0); signal enmini, enmin2:std_logic; begin sout〈二count; enmin2=(setmin and elk); enmin=(enminl or enmin2); process (elk, reset, setmin) begin if reset二O then count〈二 elsif elkevent and elk二1’ then if count (3 downto 0)=〃1001 then if count16#60# then if countthen enminl=, T ;count〈 else count〈二count+7; end if; else count〈二 end if; elsif count16#60# then count〈二count+1; enmini =,O; else count=/z; end if; end if; end process; end bhv; 其中,CLK是时钟信号,RESET是复位信号,SETMTN为分钟设置信号,ENMTN作为 下一模块分钟设计的时钟信号,sout输岀信号最后接在动态译管码芯片上,得 出实验要求的秒显示。 2、分计时模块 代码: library ieee; use ieee.std_logic_l164. al l; use ieee.std logic unsigned.all; entity minute is port (elk, enmin, reset, sethour:in std logic; enhour,speak:out std_logic; mout:out std logic vector (7 downto 0)); encl minute; architecture bhv of minute is signal count:std_logic_vector(7 downto 0); signal enhourl,cnhour2:stdlogic; begin mout〈二count; enhour2= (sethour and elk); enhour=(enhourl or enhour2); process (elk,reset, sethour) begin if reset二O then count=/zOOOOOOOOz,; elsif enminevent and enmin二i then if count(3 downto 0)=1001〃 then if count16#60# then if countthen enhourl=, T ;count〈; else count=count+7; end if; else count〈 end if; elsif count16#60# then count=count+l; enhourl=,O; else count〈 end if; end if; if count then speak=, r ; else speak=, O; encl if; end process; encl bhv; 其中,CLK接秒模块中的ENM1N信号,RESET

文档评论(0)

ggkkppp + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档