下载此文档

EDA数字秒表设计.doc


文档分类:通信/电子 | 页数:约12页 举报非法文档有奖
1/12
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/12 下载此文档
文档列表 文档介绍
期末大作业 数字秒表设计
实验任务及要求
设计用于体育比赛用的数字秒表,要求:
及时精度大雨1/1000秒,计数器能显示1/1000秒时间,提供给计时器内部定时的始终频率为12MHz;计数器的最长计时时间为1小时,为此需要一个7位的显示器,。
2、设计有复位和起/停开关。
(1)、复位开关用来使计时器清零,并做好计时准备。
(2)、起/停开关的使用方法与传统的机械式计数器相同,即按一下起/停开关,启动计时器开始计时,再按一下起/停开关计时终止。
(3)、复位开关可以在任何情况下使用,即使在计时过程中,只要按一下复位开关,计时进程理科终止,并对计时器清零。
3、采用层次设计方法设计符合上述功能要求的数字秒表。
4、对电路进行功能仿真,通过波形确认电路设计是否正确。
5、完成电路传布设计后,通过实验箱下载验证设计的正确性。
二、数字秒表的电路逻辑图

实验内容
时序波形图如下:
顶层程序框图如下:
清零CLR
开关ENA
时钟CLK
十分之一秒
秒个位(10进制)
秒十位(6进制)
分个位(10进制)
分十位(6进制)
闹钟(预置时间)
各功能模块VHDL程序
十分之一秒
library ieee;
use ;
use ;
entity MINSECONDb is
port(clk,clrm,stop:in std_logic;
secm0:out std_logic_vector(3 downto 0);
co:out std_logic);
end MINSECONDb;
architecture SEC of MINSECONDb is
begin
process(clk,clrm)
variable cnt0:std_logic_vector(3 downto 0);
begin
if clrm='1' then
cnt0:="0000";
elsif clk'event and clk='1'then
if stop='0'then
if cnt0="1001" then
co<='1';
cnt0:="0000";
elsif cnt0<"1001" then
cnt0:=cnt0+1;
co<='0';
end if;
else cnt0:=cnt0;
end if;
end if;
secm0<=cnt0;
end process;
end SEC;

library ieee;
use ;
use ;
entity SECOND is
port(clk,clr:in std_logic;
sec1,sec0:out std_logic_vector(3 downto 0);
co:out std_logic);
end SECOND;
architecture SEC of SECOND is
begin
process(clk,clr)
variable cnt1,cnt0:std_logic_vector(3 downto 0);
begin
if clr='1' then
cnt1:="0000";
cnt0:="0000";
elsif clk'event and clk='1' then
if cnt1="0101" and cnt0="1000" then
co<='1';
cnt0:="1001";
elsif cnt0<"1001" then
cnt0:=cnt0+1;
co<='0';
else
cnt0:="0000";
if cnt1<"0101" then
cnt1:=cnt1+1;
else
cnt1:="0000";
co<='0';
end if;
end if;
end if;
sec1<=cnt1;
sec0<=cnt0;
end process;
end SEC;

library ieee;
use ;
use ;
entity MINUTE is
port(clk,en

EDA数字秒表设计 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数12
  • 收藏数0 收藏
  • 顶次数0
  • 上传人miao19720107
  • 文件大小140 KB
  • 时间2021-02-19