基于EDA的数字秒表设计.ppt_第1页
基于EDA的数字秒表设计.ppt_第2页
基于EDA的数字秒表设计.ppt_第3页
基于EDA的数字秒表设计.ppt_第4页
基于EDA的数字秒表设计.ppt_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

基于eda的数字秒表设计,实验要求,1、数字秒表主要由:分频器、扫描显示译码器、一百进制计数器、六十进制计数器(或十进制计数器与6进制计数器)、十二进制计数器(或二十四进制计数器)电路组成。在整个秒表中最关键的是如何获得一个精确的100hz计时脉冲,除此之外,数字秒表需有清零控制端,以及启动控制端、保持保持,以便数字时钟能随意停止及启动。(时钟50m) 2、数字秒表显示由时(12或24进制任选)、分(60进制)、秒(60进制)、百分之一秒(一百进制)组成,利用扫描显示译码电路在八个数码管显示。 3、能够完成清零、启动、保持(可以使用键盘或拨码开关置数)功能。 4、时、分、秒、百分之一秒显示准确。,实验设计提示,分频模块,实验设计提示,library ieee; use ieee.std_logic_1164.all; entity div is port(clr,clk: in bit; q: buffer bit); end div; architecture a of div is signal counter:integer range 0 to 249999; begin process(clr,clk) begin if (clk=1 and clkevent) then if clr=0 then counter=0; elsif counter=249999 then counter=0; q= not q; else counter=counter+1; end if; end if; end process; end a;,实验设计提示,十进制计数器,实验设计提示,entity cnt10 is port(clk:in std_logic; clr:in std_logic; start:in std_logic; daout:buffer std_logic_vector(3 downto 0); co:out std_logic); end entity cnt10; architecture art of cnt10 is begin process(clk,clr,start) begin if clr=0 then daout=“0000“; elsif (clkevent and clk=1)then if (start=1)then if daout=“1001“then daout=“0000“;co=1; else daout=daout+1;co=0; end if; end if; end if; end process; end art;,实验设计提示,六进制计数器,实验设计提示,entity cnt6 is port(clk,clr,start:in std_logic; daout:buffer std_logic_vector(3 downto 0); co:out std_logic); end entity cnt6; architecture art of cnt6 is begin process(clk,clr,start) begin if clr=0 then daout=“0000“; elsif (clkevent and clk=1)then if (start=1)then if daout=“0101“then daout=“0000“;co=1; else daout=daout+1; co=0; end if; end if; end if; end process; end art;,实验设计提示,显示译码模块,实验设计提示,entity deled is port(num:in std_logic_vector(3 downto 0); led:out std_logic_vector(6 downto 0); end deled ; architecture a of deled is begin process(num) begin case num

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论