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

上传人:b****6 文档编号:15670755 上传时间:2023-07-06 格式:DOCX 页数:16 大小:821.07KB
下载 相关 举报
多功能电子钟设计报告.docx_第1页
第1页 / 共16页
多功能电子钟设计报告.docx_第2页
第2页 / 共16页
多功能电子钟设计报告.docx_第3页
第3页 / 共16页
多功能电子钟设计报告.docx_第4页
第4页 / 共16页
多功能电子钟设计报告.docx_第5页
第5页 / 共16页
多功能电子钟设计报告.docx_第6页
第6页 / 共16页
多功能电子钟设计报告.docx_第7页
第7页 / 共16页
多功能电子钟设计报告.docx_第8页
第8页 / 共16页
多功能电子钟设计报告.docx_第9页
第9页 / 共16页
多功能电子钟设计报告.docx_第10页
第10页 / 共16页
多功能电子钟设计报告.docx_第11页
第11页 / 共16页
多功能电子钟设计报告.docx_第12页
第12页 / 共16页
多功能电子钟设计报告.docx_第13页
第13页 / 共16页
多功能电子钟设计报告.docx_第14页
第14页 / 共16页
多功能电子钟设计报告.docx_第15页
第15页 / 共16页
多功能电子钟设计报告.docx_第16页
第16页 / 共16页
亲,该文档总共16页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

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

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

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

多功能电子钟设计报告

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

多功能电子钟设计报告

 

姓名:

李晓桐

班级:

文自102-1

学号:

201090519111

 

烟台大学文经学院

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七段数字显示译码器后输出。

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

原理图:

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

通过本次课程设计,让我加深了对VHDL语言的理解,熟悉了MAXplus2的操作,及实验箱的使用。

通过以前做过的实验,将其例化为模块,然后整合,最终实现了简单电子钟的计时,调整时、分、秒的功能,使自己感到了小小的成就感。

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

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2