数字逻辑课程设计--多功能数字钟设计实验报告.doc_第1页
数字逻辑课程设计--多功能数字钟设计实验报告.doc_第2页
数字逻辑课程设计--多功能数字钟设计实验报告.doc_第3页
数字逻辑课程设计--多功能数字钟设计实验报告.doc_第4页
数字逻辑课程设计--多功能数字钟设计实验报告.doc_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

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

文档简介

2019-1-9 多功能数字钟设计实验报告课 程 设 计 报 告 课程:数字逻辑与数字系统课题:多 功 能 数 字 电 子 钟姓名: 学号:学院: 班级:指导老师: 设计日期: 一、 设计要求1. 具有以二十四小时制计时、显示、整点报时、时间设置公能。2. 精度要求为1s。二、 系统功能简介1. 计时:正常工作状态下每天按24小时制计时并显示,蜂鸣器无声,逢整点报时。2. 整点报时:蜂鸣器在59分钟的51、53、55、57、59秒时发出频率为512hz的低音,在59秒时发出1024hz的高音,结束时为整点。3. 显示:要求采用扫描显示方式驱动8个led数码管显示小时、分、秒、横线。4. 调时和校时:当开关处于“k1”、“k2”处于“1”时正常计时,当k1处于“0”位置时可以对小时校时,当k2处于“0”位置时可以对分钟进行校时。另外对六十进制计数器加了一个清零端,可以进行秒的复位。三、 系统简介1. 开发系统:windows xp/982. 开发软件:max+pius ii3. 开发芯片:ep1k10tc1003 四、 主要模块简介此系统由计时调时模块、闹钟模块、定时模块、动显模块和分频模块组成。数字钟系统总体结构框图:扫描显示电路显示控制电路闹钟控制电路计时校时控制电路控制器报时控制电路整点报时电路1 分频器:library ieee;use ieee.std_logic_1164.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 ;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;-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_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_unsigned.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)then 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;architecture 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;use 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=

温馨提示

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

评论

0/150

提交评论