- 2
- 0
- 约1.02万字
- 约 13页
- 2017-05-10 发布于贵州
- 举报
数字逻辑课程设计告——多功能数字钟的设计与实现
多功能数字钟的设计与实现
学院名称: 计算机学院
专业班级: 通信工程
学生姓名:
学生学号:
指导老师: 曾 宇
2012年6月25日
设计任务及要求:
拥有正常的时、分、秒计时功能。
能利用实验板上的按键实现校时、校分及秒清零功能。
能利用实验板上的扬声器做整点报时。
闹钟功能。
在QUARTUS Ⅱ中采用层次化设计方法进行设计。
完成全部电路设计后在实验板上下载,验证设计课题的正确性。
多功能数字钟的总体设计方案
根据总体设计框图,可以将整个系统分成6个模块来实现,分别是计时模块、校时模块、整点报时模块,分频模块,动态显示模块,闹钟模块。
设计总图:
计时模块
该模块的设计相对简单,使用一个二十四进制和两个六十进制计数器级联,构成数字钟的基本框架。二十四进制的计数器用于计时,六十进制计数器用于计分和计秒。只要给秒计数器一个1Hz的时钟脉冲,则可以进行正常计时。分计数器以秒计数器的进位作为计数脉冲,小时计数器以分计数器的进位作为计数脉冲。
(24进制计数器构成时计数器,60进制计数器构成的秒、分计数器)
24进制的仿真图:
60进制的仿真图
以下是计时模块设计VHDL语言:
(1)library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt24 is
port(clk:in std_logic;
ql,qh:out std_logic_vector(3 downto 0);
tc:out std_logic);
end cnt24;
architecture one of cnt24 is
begin
process(clk)
variable iql,iqh:std_logic_vector(3 downto 0);
begin
if clkevent and clk=1 then iql:=iql+1;
if iql=1010 then iqh:=iqh+1; iql:=0000;
end if;
if (iqh=0010)and(iql=0100) then tc=0; iqh:=0000; iql:=0000;
end if;
end if;
ql=iql; qh=iqh;
end process;
end one;
(2)library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt60 is
port(clk,clr:in std_logic;
ql,qh:buffer std_logic_vector(3 downto 0);
tc:out std_logic
);
end cnt60;
architecture behavor of cnt60 is
begin
tc=0 when(clk=1 and ql=0000 and qh=0110) else 1;
process(clk,clr,ql,qh)
variable iql,iqh:std_logic_vector(3 downto 0);
begin
if(clr=0or (iql=0000 and iqh=0110))then
iql:=0000;
iqh:=0000;
else if(clkevent and clk=1)then
iql:=iql+1;
if(iql=1010)then
iql:=0000;
iqh:=qh+1;
end if;
end if;
end if;
ql=i
您可能关注的文档
最近下载
- 2020高考物理:计算题专项训练.pdf VIP
- 2025年湖南铁路科技职业技术学院单招职业技能测试题库一套.docx VIP
- 尾矿库安全技术知识--培训课件.ppt VIP
- 尾矿库安全培训精选课件.ppt VIP
- 四级高频词汇带音标版.pdf VIP
- 化妆品检验与安全性评价 第一第二章.pptx VIP
- 农村自建房包工不包料合同模板.docx VIP
- 【2025届】青海初中学业水平考试中考语文真题试题【原卷+解析】.pdf
- 尾矿库基础知识培训.pptx VIP
- Unit 5 School activities Wrap up & Let's explore 课件(共36张PPT) 外研版英语四年级下册.pptx
原创力文档

文档评论(0)