数字秒表课程设计.docx

上传人:b****6 文档编号:3916752 上传时间:2022-11-26 格式:DOCX 页数:14 大小:159.18KB
下载 相关 举报
数字秒表课程设计.docx_第1页
第1页 / 共14页
数字秒表课程设计.docx_第2页
第2页 / 共14页
数字秒表课程设计.docx_第3页
第3页 / 共14页
数字秒表课程设计.docx_第4页
第4页 / 共14页
数字秒表课程设计.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

数字秒表课程设计.docx

《数字秒表课程设计.docx》由会员分享,可在线阅读,更多相关《数字秒表课程设计.docx(14页珍藏版)》请在冰豆网上搜索。

数字秒表课程设计.docx

数字秒表课程设计

北华航天工业学院

《EDA技术综合设计》

课程设计报告

 

报告题目:

数字秒表设计

学生所在系部:

学生所在专业:

学生所在班级:

学生姓名:

学生学号:

指导教师姓名:

完成时间:

课程设计任务书

课题名称

数字秒表设计

完成时间

2011.12.13

指导教师

职称

学生姓名

班级

总体设计要求和技术要点

总体设计要求:

通过本课程的学习使学生掌握可编程器件、EDA开发系统软件、硬件描述语言和电子线路设计与技能训练等各方面知识;提高工程实践能力;学会应用EDA技术解决一些简单的电子设计问题。

技术要点:

1.秒表有共有6个输出显示,分别为百分之一秒、十分之一秒、秒、十秒、分、十分,所以共有6个计数器与之相对应,6个计数器的输出全都为BCD码输出,这样便与同显示译码器的连接。

2.开关设置秒表报警器,每10秒钟,蜂鸣器鸣响1声,发光二极管闪烁。

当计时达60分钟后,蜂鸣器鸣响10声。

工作内容及时间进度安排

工作内容:

在软件上编辑、编译程序,并仿真到达实验要求。

进度安排;

课下编写程序,并要求程序能通过编译仿真;

第十六周的周三,周四在实验板上下载调试程序;

周五课设答辩。

课程设计成果

1.与设计内容对应的软件程序

2.课程设计报告书

3.成果使用说明书

4.设计工作量要求

内容摘要

应用VHDL语言设计数字系统,很多设计工作可以在计算机上完成,从而缩短了数字系统的开发时间。

我们尝试利用VHDL为开发工具设计数字秒表。

秒表的逻辑结构较简单,它主要由十进制计数器、六进制计数器、12500的分频器、数据选择器、和显示译码器等组成。

在整个秒表中最关键的是如何获得一个精确的100HZ计时脉冲,除此之外,整个秒表还需有一个启动信号和一个清零信号,以便秒表能随意停止及启动。

秒表有共有6个输出显示,分别为百分之一秒、十分之一秒、秒、十秒、分、十分,所以共有6个计数器与之相对应,6个计数器的输出全都为BCD码输出,这样便与同显示译码器连接。

开关设置秒表报警器,每10秒钟,蜂鸣器鸣响1声,发光二极管闪烁。

当计时达60分钟后,蜂鸣器鸣响10声。

关键词:

VHDL、数据选择器、计数器、显示器

目录

1、系统组成框图及原理图………………………………4

2、各模块原理图及其程序………………………………5

1.六进制计数器…………………………………………5

2.十进制计数器…………………………………………6

3.蜂鸣器…………………………………………………7

4.译码器…………………………………………………8

5.控制器…………………………………………………9

6.分频器…………………………………………………11

三、系统仿真………………………………………………13

1.六进制计数器…………………………………………13

2.十进制计数器…………………………………………14

3.蜂鸣器…………………………………………………14

4.译码器…………………………………………………14

5.控制器…………………………………………………14

四、心得体会………………………………………………15

 

设计过程

一.系统组成框图及原理图

 

系统原理图

二、各模块原理图及其程序

1.六进制计数器

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitycount6is

port(clk,clr,start:

instd_logic;

daout:

outstd_logic_vector(3downto0);

cout:

outstd_logic);

endcount6;

architecturebehaveofcount6is

signaltemp:

std_logic_vector(3downto0);

begin

process(clk,clr)

begin

ifclr='1'thentemp<="0000";

cout<='0';

elsifclk'eventandclk='1'then

ifstart='1'then

iftemp>="0101"thentemp<="0000";

cout<='1';

elsetemp<=temp+1;cout<='0';

endif;

endif;

endif;

endprocess;

daout<=temp;

endbehave;

2.十进制计数器

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

useieee.std_logic_arith.all;

entitycount10is

port(clr,start,clk:

instd_logic;

cout:

outstd_logic;

daout:

bufferstd_logic_vector(3downto0));

endcount10;

architecturebehaveofcount10is

begin

process(clr,start,clk)

begin

ifclr='1'thendaout<="0000";

elsif(clk'eventandclk='1')then

ifstart='1'then

ifdaout="1001"thendaout<="0000";cout<='1';

elsedaout<=daout+1;cout<='0';

endif;

endif;

endif;

endprocess;

endbehave;

3.蜂鸣器

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityalarmis

port(clk,I:

instd_logic;

q:

outstd_logic

);

endalarm;

architecturearofalarmis

signaln:

integerrange0to20;

signalq0:

std_logic;

begin

process(clk)

begin

ifclk'eventandclk='1'

then

ifi='0'thenq0<='0';

n<=0;

elsifn<=19andi='1'then

q0<=notq0;

n<=n+1;

elseq0<='0';

endif;

endif;

endprocess;

q<=q0;

endar;

4.译码器

libraryieee;

useieee.std_logic_1164.all;

entitydeledis

port(num:

instd_logic_vector(3downto0);

led:

outstd_logic_vector(6downto0));

enddeled;

architectureaofdeledis

begin

process(num)

begin

casenumis

when"0000"=>led<="0111111";

when"0001"=>led<="0000110";

when"0010"=>led<="1011011";

when"0011"=>led<="1001111";

when"0100"=>led<="1100110";

when"0101"=>led<="1101101";

when"0110"=>led<="1111101";

when"0111"=>led<="0100111";

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

when"1001"=>led<="1101111";

whenothers=>led<="0000000";

endcase;

endprocess;

enda;

5.控制器

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityseltimeis

port(clr,clk:

inbit;

dain0,dain1,dain2,dain3,dain4,dain5:

instd_logic_vector(3downto0);

sel:

outstd_logic_vector(2downto0);

db:

bufferstd_logic;

daout:

outstd_logic_vector(3downto0));

endseltime;

architectureaofseltimeis

signaltemp:

integerrange0to5;

begin

process(clk,clr,db)

begin

if(clr='1')then

daout<="0000";

sel<="000";

temp<=0;

elsif(clk='1'andclk'event)then

iftemp=5thentemp<=0;

elsetemp<=temp+1;

endif;

casetempis

when0=>sel<="000";daout<=dain0;db<='0';

when1=>sel<="001";daout<=dain1;db<='0';

when2=>sel<="010";daout<=dain2;db<='1';

when3=>sel<="011";daout<=dain3;db<='0';

when4=>sel<="100";daout<=dain4;db<='1';

when5=>sel<="101";daout<=dain5;db<='0';

endcase;

endif;

endprocess;

enda;

6.分频器

<1>100Hz分频

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entityFENPIN100is

port(clr,clk:

instd_logic;

q:

bufferstd_logic);

endFENPIN100;

architectureoneofFENPIN100is

signalcounter:

integerrange0to12499;

begin

process(clr,clk)

begin

if(clk'eventandclk='1')then

ifclr='1'then

counter<=0;

elsifcounter=12499then

counter<=0;

q<=notq;

else

counter<=counter+1;

endif;

endif;

endprocess;

endone;

<2>1000KHz分频

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entityFENPINis

port(clk:

instd_logic;

q:

bufferstd_logic);

endFENPIN;

architectureoneofFENPINis

signalcounter:

integerrange0to1249;

begin

process(clk)

begin

if(clk'eventandclk='1')then

ifcounter=1249then

counter<=0;

q<=notq;

else

counter<=counter+1;

endif;

endif;

endprocess;

endone;

3、系统仿真

1.六进制计数器

十进制计数器

2.十进制计数器

3.蜂鸣器

4.

译码器

 

5.控制器

 

四、心得体会

EDA的课程设计很快就结束了,总结这几天的收获可谓颇多,在设计实验电路图的过程中遇到了很多坎坷,还好通过网络和待在图书馆很快的解决了所有的问题,要读懂所有的程序也是一项浩大的工程啊,在几个人的团结协作下,很好的弄懂了所有的程序,再就是硬件的链接,通过这我发现了前段时间在做实验的过程中有些学的不扎实,不能熟练的解决问题。

这就告诉了我,在以后的学习中一定要扎实的学习。

在应用VHDL的过程中让我真正领会到了其并行运行与其他软件顺序执行的差别及其在电路设计上的优越性。

用VHDL硬件描述语言的形式来进行数字系统的设计方便灵活,利用EDA软件进行编译优化仿真极大地减少了电路设计时间和可能发生的错误,降低了开发成本,这种设计方法在数字系统设计中发挥越来越重要的作用。

所以,我们一定要熟练的掌握这个软件的运用,学好这门课程,为将来打好基础。

 

 

教师评语及设计成绩

评语

 

 

课程设计成绩:

指导教师:

日期:

年月日

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

当前位置:首页 > 高中教育 > 语文

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

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