多功能电子钟设计报告.docx

上传人:b****6 文档编号:7796266 上传时间:2023-01-26 格式:DOCX 页数:15 大小:821.27KB
下载 相关 举报
多功能电子钟设计报告.docx_第1页
第1页 / 共15页
多功能电子钟设计报告.docx_第2页
第2页 / 共15页
多功能电子钟设计报告.docx_第3页
第3页 / 共15页
多功能电子钟设计报告.docx_第4页
第4页 / 共15页
多功能电子钟设计报告.docx_第5页
第5页 / 共15页
点击查看更多>>
下载资源
资源描述

多功能电子钟设计报告.docx

《多功能电子钟设计报告.docx》由会员分享,可在线阅读,更多相关《多功能电子钟设计报告.docx(15页珍藏版)》请在冰豆网上搜索。

多功能电子钟设计报告.docx

多功能电子钟设计报告

数字逻辑与数字系统课程设计

多功能电子钟设计报告

 

姓名:

张传峰

班级:

文自102-2

学号:

201090519237

 

烟台大学文经学院

2011年12月

 

多功能数字钟课程设计报告要求

一、

实验目的:

1了解多功能数字电子钟的工作原理。

2学习数字系统设计中自顶向下的设计方法。

3加深利用EDA技术实现数字系统的体会。

实验结果基本要求:

1、能够正确的连线及下载。

2、能够完成以秒为最小及时单位的时钟设计。

3、时钟能够正常调整时、分、秒的时间。

扩展部分:

1、能够完成整点报时的功能。

2、能够完成预设时钟的功能。

二、

实验报告要求及说明:

1、课程设计总体原理图

波形仿真

2、阐述几个功能模块用途及如何实现的:

基本功能图:

正常的计时功能

正常的调时功能

正常的显示功能

扩展功能图:

※整点报时功能

※闹钟定时功能

3、系统功能描述

计时功能模块:

它是由两个60进制计数器和一个24进制计数器连接成的。

构成了时钟正常的计时功能。

当到达59秒钟的时候,当再来一个CP脉冲的时候,将自动进位,使分针上加一。

分针也是一样。

当时针到达23点59分59秒的时候,当再次来一个CP脉冲时候,又转化为0点0分0秒。

调时功能模块:

调分有效时,按动分钟调节键,分针加一;调时有效,按动小时调节键,时针加一。

4、各功能模块

(1)六十进制计数器

源程序

LIBRARYieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitycnt60is

port(

en,reset,clk:

instd_logic;

co:

outstd_logic;

qh:

bufferstd_logic_vector(7downto4);

ql:

bufferstd_logic_vector(3downto0)

);

endcnt60;

architectureoneofcnt60is

begin

process(reset,clk)

begin

if(reset='0')then

qh<="0000";ql<="0000";

elsif(clk'eventandclk='1')then

ifen='1'then

ifql="1001"then

ql<="0000";

ifqh="0101"then

co<='1';

qh<="0000";

else

qh<=qh+1;

co<='0';

endif;

else

ql<=ql+1;co<='0';

endif;

endif;

endif;

endprocess;

endone;

波形仿真

例化模块

(2)二十四进制计数器

源程序

LIBRARYieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitycnt24is

port(

en,reset,clk:

instd_logic;

qh:

bufferstd_logic_vector(7downto4);

ql:

bufferstd_logic_vector(3downto0)

);

endcnt24;

architectureoneofcnt24is

begin

process(reset,clk)

begin

if(reset='0')then

qh<="0000";ql<="0000";

elsif(clk'eventandclk='1')then

ifen='1'then

if(qh="0010"andql="0011")then

qh<="0000";

ql<="0000";

elsif(ql="1001")then

ql<="0000";

qh<=qh+1;

elseql<=ql+1;

endif;

endif;

endif;

endprocess;

endone;

波形仿真

例化模块

(3)二选一数据选择器

源程序

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitymux21is

port(

sel,a,b:

instd_logic;

y:

outstd_logic

);

endmux21;

architectureoneofmux21is

begin

process(a,b,sel)

begin

ifsel='1'then

y<=a;

else

y<=b;

endif;

endprocess;

endone;

波形仿真

例化模块

(4)timer

源程序

波形仿真

例化模块

(5)八进制计数器

源程序

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitycnt8is

port(

clk:

instd_logic;

q:

outstd_logic_vector(2downto0)

);

endcnt8;

architectureoneofcnt8is

signalql:

std_logic_vector(2downto0);

begin

process(clk)

begin

ifclk'eventandclk='1'then

ql<=ql+1;

endif;

endprocess;

q<=ql;

endone;

波形仿真

例化模块

(6)4x8数据选择器

源程序

LIBRARYieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

useieee.std_logic_arith.all;

entitymux48is

port(

d0,d1,d2,d3,d4,d5,d6,d7:

instd_logic_vector(3downto0);

sel:

instd_logic_vector(2downto0);

y:

outstd_logic_vector(3downto0)

);

endmux48;

architectureoneofmux48is

signaldout:

std_logic_vector(3downto0);

begin

process(sel)

begin

caseselis

when"000"=>dout<=d0;

when"001"=>dout<=d1;

when"010"=>dout<=d2;

when"011"=>dout<=d3;

when"100"=>dout<=d4;

when"101"=>dout<=d5;

when"110"=>dout<=d6;

whenothers=>dout<=d7;

endcase;

endprocess;

y<=dout;

endone;

例化模块

(7)译码器

源程序

LIBRARYieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

useieee.std_logic_arith.all;

entitycode47is

port(

din:

instd_logic_vector(3downto0);

dout:

outstd_logic_vector(6downto0)

);

endcode47;

architectureoneofcode47is

begin

process(din)

begin

casedinis

when"0000"=>dout<="1111110";

when"0001"=>dout<="0110000";

when"0010"=>dout<="1101101";

when"0011"=>dout<="1111001";

when"0100"=>dout<="0110011";

when"0101"=>dout<="1011011";

when"0110"=>dout<="1011111";

when"0111"=>dout<="1110000";

when"1000"=>dout<="1111111";

when"1001"=>dout<="1111011";

whenothers=>dout<="1111111";

endcase;

endprocess;

endone;

例化模块

三、阐述动态显示原理,画出动态显示原理图。

输入信号:

D0-D78组8421BCD码

输出信号:

a-g7个数据信号

进入工作状态时,由8选1多路器从8组8421BCD码数据中选出一组,通过8421BCD七段数字显示译码器后输出。

数据选择的时序和顺序由八进制计数器控制。

原理图:

四、本次课程设计的心得体会。

我沉得做课程设计同时也是对课本知识的巩固和加强,由于课本上的知识太多,平时课间的学习并不能很好的理解和运用各个元件的功能,而且考试内容有限,所以在这次课程设计过程中,我们了解了很多元件的功能,并且对于其在电路中的使用有了更多的认识。

平时看课本时,有时问题老是弄不懂,做完课程设计,那些问题就迎刃而解了。

而且还可以记住很多东西。

比如一些芯片的功能,平时看课本,这次看了,下次就忘了,通过动手实践让我们对各个元件映象深刻。

认识来源于实践,实践是认识的动力和最终目的,实践是检验真理的唯一标准。

所以这个期末测试之后的课程设计对我们的作用是非常大的。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 工学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1