数码管学号滚动显示课程设计

上传人:夏** 文档编号:431230382 上传时间:2023-07-06 格式:DOC 页数:20 大小:1.39MB
返回 下载 相关 举报
数码管学号滚动显示课程设计_第1页
第1页 / 共20页
数码管学号滚动显示课程设计_第2页
第2页 / 共20页
数码管学号滚动显示课程设计_第3页
第3页 / 共20页
数码管学号滚动显示课程设计_第4页
第4页 / 共20页
数码管学号滚动显示课程设计_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《数码管学号滚动显示课程设计》由会员分享,可在线阅读,更多相关《数码管学号滚动显示课程设计(20页珍藏版)》请在金锄头文库上搜索。

1、南京邮电大学通达学院课程设计报告设计类别: EDA-VHDL 专业名称: 通信工程 班级学号: 学生姓名: 基本题 : 数字时钟设计 综合题 : 数码管学号滚动显示 同小组成员: 学号: 姓名: 指导教师: 王奇、梅中辉、周小燕、孔凡坤 日 期: 2012年6月11日6月22日 一、数字时钟1实验目的(1)掌握VHDL语言的语法规范,掌握时序电路描述方法(2)掌握多个数码管动态扫描显示的原理及设计方法2实验任务要求要求学生设计一个时钟,并输出到数码管显示时,分,秒。3设计思路及VHDL代码 首先要设置一个时钟信号,根据时钟信号的变化来进行时钟的变化,从秒的变化到时的变化条件是不同的。将时分秒各

2、分为为十位和各位即六位数字显示时间来分析。原理图如下:秒针个位信号数码管译码器模10计数器 清零进位 秒针十位信号数码管译码器模6计数器清零清零清零清零进位时针十位信号分针个位信号分针十位信号时针个位信号进位进位进位数码管译码器数码管译码器数码管译码器数码管译码器模10计数器模10计数器模6计数器模3计数器 VHDL源程序如下:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity shizhong isport( clk:in std_logic; led1:out std_logic_v

3、ector(6 downto 0); led2:out std_logic_vector(6 downto 0); led3:out std_logic_vector(6 downto 0); led4:out std_logic_vector(6 downto 0); led5:out std_logic_vector(6 downto 0); led6:out std_logic_vector(6 downto 0);end shizhong;architecture main of shizhong issignal hou1:std_logic_vector(3 downto 0);s

4、ignal hou2:std_logic_vector(3 downto 0);signal min1:std_logic_vector(3 downto 0);signal min2:std_logic_vector(3 downto 0);signal sec1:std_logic_vector(3 downto 0);signal sec2:std_logic_vector(3 downto 0);begin-h110:process(clk,hou2,min1,min2,sec1,sec2)beginif clkevent and clk=1 thenif (hou1=0010 and

5、 hou2=0011)and(min1=0101 and min2=1001) and (sec1=0101 andsec2=1001) thenhou1=0000;else if (hou2=1001and(min1=0101 and min2=1001) and (sec1=0101 and sec2=1001)thenhou1=hou1+1;end if;end if;end if;end process h110; 时钟的十位-h220:process(clk,min1,min2,sec1,sec2,hou1)beginif clkevent and clk=1 thenif (hou

6、1=0010 and hou2=0011)and(min1=0101 and min2=1001) and (sec1=0101 andsec2=1001) thenhou2=0000;else if hou2=1001and(min1=0101 and min2=1001) and (sec1=0101 and sec2=1001)thenhou2=0000;else if(min1=0101 and min2=1001) and (sec1=0101 and sec2=1001) thenhou2=hou2+1;-speak=clk;end if;end if;end if;end if;

7、end process h220; 时钟的个位-m110:process(clk,min2,sec1,sec2)beginif clkevent and clk=1 thenif (min1=0101 and min2=1001) and (sec1=0101 and sec2=1001) thenmin1=0000;else if (min2=1001and (sec1=0101 and sec2=1001)thenmin1=min1+1;end if;end if;end if;end process m110; 分钟的十位-m220:process(clk,sec1,sec2)begin

8、if clkevent and clk=1 thenif min2=1001and (sec1=0101 and sec2=1001)thenmin2=0000;else if (sec1=0101 and sec2=1001) thenmin2=min2+1;end if;end if;end if;end process m220; 分钟的个位-s110:process(clk)beginif clkevent and clk=1 thenif (sec1=0101 and sec2=1001)thensec1=0000;else if sec2=1001thensec1=sec1+1;end if;end if;end if;end process s110; 秒钟的十位-s220:process(clk)beginif clkevent and clk=1 thenif sec2=1001 thensec2=0000;else sec2LED1LED1LED1LED1LED2LED2LED2LED2LED2LED2LED2LED2LED2LED2LED2LED3LED3LED3LED3LED3LED3LED3LED4LED4=0000110;when 001

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

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

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