数字逻辑课程设计多功能数字钟设计实验报告

上传人:ni****g 文档编号:431730648 上传时间:2023-02-20 格式:DOC 页数:15 大小:595.01KB
返回 下载 相关 举报
数字逻辑课程设计多功能数字钟设计实验报告_第1页
第1页 / 共15页
数字逻辑课程设计多功能数字钟设计实验报告_第2页
第2页 / 共15页
数字逻辑课程设计多功能数字钟设计实验报告_第3页
第3页 / 共15页
数字逻辑课程设计多功能数字钟设计实验报告_第4页
第4页 / 共15页
数字逻辑课程设计多功能数字钟设计实验报告_第5页
第5页 / 共15页
点击查看更多>>
资源描述

《数字逻辑课程设计多功能数字钟设计实验报告》由会员分享,可在线阅读,更多相关《数字逻辑课程设计多功能数字钟设计实验报告(15页珍藏版)》请在金锄头文库上搜索。

1、2012-7-29 多功能数字钟设计实验报告课 程 设 计 报 告 课程:数字逻辑与数字系统课题:多 功 能 数 字 电 子 钟姓名: 学号:学院: 班级:指导老师: 设计日期: 一、 设计要求1. 具有以二十四小时制计时、显示、整点报时、时间设置公能。2. 精度要求为1s。二、 系统功能简介1. 计时:正常工作状态下每天按24小时制计时并显示,蜂鸣器无声,逢整点报时。2. 整点报时:蜂鸣器在59分钟的51、53、55、57、59秒时发出频率为512hz的低音,在59秒时发出1024hz的高音,结束时为整点。3. 显示:要求采用扫描显示方式驱动8个LED数码管显示小时、分、秒、横线。4. 调时

2、和校时:当开关处于“k1”、“k2”处于“1”时正常计时,当k1处于“0”位置时可以对小时校时,当k2处于“0”位置时可以对分钟进行校时。另外对六十进制计数器加了一个清零端,可以进行秒的复位。三、 系统简介1. 开发系统:windows xp/982. 开发软件:MAX+PIUS II3. 开发芯片:EP1K10TC1003 四、 主要模块简介此系统由计时调时模块、闹钟模块、定时模块、动显模块和分频模块组成。数字钟系统总体结构框图:扫描显示电路显示控制电路闹钟控制电路计时校时控制电路控制器报时控制电路整点报时电路1 分频器:library ieee;use ieee.std_logic_116

3、4.all;use ieee.std_logic_unsigned.all;entity fenpin isport (clk :in std_logic; f1024,f512,f4,f1 :out std_logic);end fenpin ;architecture behav of fenpin issignal q:std_logic_vector(9 downto 0);begin process(clk,q)begin if(clkevent and clk=1)then if(q=1111111111)then q=0000000000; else q=q+1; end if

4、;end if ;f1024=clk;f512=q(0);f4=q(7);f1=q(9);end process;end behav;2 二选一数据选择器library ieee; use ieee.std_logic_1164.all;entity mux2_1 isport(d0,d1,sel:in std_logic; q :out std_logic);end mux2_1;architecture amux of mux2_1 issignal temp1,temp2,temp3 :std_logic; begin cale:blockbegin temp1=d0 and sel;-

5、1正常计时temp2=d1 and (not sel);-0调时temp3=temp1 or temp2; q=temp3; end block cale;end amux;3 24进制计数器:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity mo24 is port(clk:in std_logic;qh,ql:out std_logic_vector(3 downto 0);end mo24;architecture wc of mo24 is signal qhh,qll:std

6、_logic_vector(3 downto 0);begin process(clk)beginif(clkevent and clk=1) then if(qll=0010 and qhh=0011)then qhh=0000; qll=0000; elsif(qhh=1001)then qll=qll+1; qhh=0000;else qhh=qhh+1;end if;end if;qh=qhh;ql=qll;end process;end wc;4 60进制计数器:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_u

7、nsigned.all;entity m60 is port(clk,clr:in std_logic;qh,ql:out std_logic_vector(3 downto 0);co:out std_logic);end m60;architecture wc of m60 is signal qhh,qll:std_logic_vector(3 downto 0);begin process(clk)beginif(clr=0) thenqll=0000;qhh=0000;elsif(clkevent and clk=1) thenif(qll=0101 and qhh=1001)the

8、n qhh=0000;qll=0000;co=1; elsif(qhh=1001)then qll=qll+1;co=0;qhh=0000;else qhh=qhh+1;co=0;end if;end if;qh=qhh;ql=qll;end process;end wc;5 8进制器:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity mo8 is port(clk:in std_logic;qh:out std_logic_vector(2 downto 0);end mo8;arc

9、hitecture wc of mo8 is signal qhh:std_logic_vector(2 downto 0);begin process(clk)beginif(clkevent and clk=1) then if( qhh=111)then qhh=000;else qhh=qhh+1;end if;end if;qhqqqqqqqqqqqqqqqqqq=0000;end case;qyyyyyyyyyyy=0000001;end case;end process;end wc;8 报时器:library ieee;use ieee.std_logic_1164.all;u

10、se ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity baoshi isport (m1,m0,s1,s0: in std_logic_vector(3 downto 0); clk:in std_logic; q: out std_logic);end baoshi;architecture rt of baoshi isbeginprocess(m0,m1,s1,s0)begin if rising_edge(clk) then if m1=0101and m0=1001 and s1=0101 then if s0=0001or s0=0011or s0=0101 or s0=0111or s0=1001 then q=1; else q=0; end

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号