网站地图| 免费获取|
毕业论文网
  • 网站首页|
  • 论文范文|
  • 论文降重|
  • 职称论文发表|
  • 合作期刊|
  • 论文下载|
  • 计算机论文|
  • 外文翻译|
  • 免费论文|
  • 论文资料|
  • 论文开题报告
搜索

当前位置:毕业论文网 -> 免费论文 -> 自动化相关 -> EDA数字秒表的设计程序
自动化论文范文| 电子机电论文| 测控技术论文| 通信专业论文| 电气工程论文| 通信工程论文| 电子信息工程论文| 免费自动化论文| 免费电子论文| 免费电气论文| 免费通信论文

EDA数字秒表的设计程序

最新活动:微信集50个赞就可获取任意一篇钻石会员文档。详情见微信集赞换文档
EDA数字秒表的设计程序

 

程序说明:1。此程序包括分频,计数控制,显示控制部分。
2。开机显示00。00。00,用户课随时计时,暂停,清零,最大计时可到59 分59。99秒。
3。技术时钟为100HZ
4。采用时分复用的方法控制4个数码管的显示,可节省资源。
程序如下:
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_arith.all;
Use ieee.std_logic_unsigned.all;
Entity watch is
Port(sel: out std_logic_vector(6 downto 1) ;
seg:out std_logic_vector(7 downto 0);
Beginstop:in std_logic;
Reset:in std_logic;
Cp2:in std_logic);
End watch;
Architecture behave of watch is
Signal num1: std_logic_vector(3 downto 0);
Signal num2: std_logic_vector(3 downto 0);
Signal num3: std_logic_vector(3 downto 0);
Signal num4: std_logic_vector(3 downto 0);
Signal num5: std_logic_vector(3 downto 0);
Signal num6: std_logic_vector(3 downto 0);
Signal num: std_logic_vector(3 downto 0);
Signal numlet: std_logic_vector(2 downto 0);
Signal count: std_logic_vector(17 downto 1);
Signal selsig: std_logic_vector(6 downto 1);
Signal segsig: std_logic_vector(7 downto 0 );
Signal cp1: std_logic;
Signal cp3: std_logic;
Begin
Process(cp2) ---- 分频。
Begin
If (cp2' event and cp2='1') then
if (Count="1100011010011111")then
count<="00000000000000000"; cp1<=not cp1;
else count<=count 1;
end if;
end if;
cp3<=count(10);
end process;
process(cp1)
begin
if reset ='1' then num1(3 downto 0) <="0000";
num2(3 downto 0) <="0000";
num3(3 downto 0) <="0000";
num4(3 downto 0) <="0000";
num5(3 downto 0) <="0000";
num6(3 downto 0) <="0000";

else if cp1' event and cp1='1' then
if beginstop='1' then num1<=num1 1;
if num1 (3 downto 0)="1001" then
num1 (3 downto 0)<="0000"; num2<= num2 1;
if num2 (3 downto 0)="1001" then
num2 (3 downto 0)<="0000"; num3<= num3 1;
if num3 (3 downto 0)="1001" then
num3 (3 downto 0)<="0000"; num4<= num4 1;
if num4 (3 downto 0)="0101" then
num4 (3 downto 0)<="0000"; num5<= num5 1;
if num5 (3 downto 0)="1001" then
num5 (3 downto 0)<="0000"; num6<= num6 1;
if num6 (3 downto 0)="0101" then
num6(3 downto 0)<="0000";
end if; end if; end if; end if; end if; end if; end if;
end if; end if;
end process;
process (cp3)
begin
if (cp3' event and cp3='1')then
if(numlet(2 downto 0)="000") then
num<=num1;selsig(6 downto 1)<="111110"; end if;
if(numlet(2 downto 0)="001") then
num<=num2;selsig(6 downto 1)<="111101"; end if;
if(numlet(2 downto 0)="010") then
num<=num3;selsig(6 downto 1)<="111011"; end if;
if(numlet(2 downto 0)="011") then
num<=num4;selsig(6 downto 1)<="110111"; end if;
if(numlet(2 downto 0)="100") then
num<=num5;selsig(6 downto 1)<="101111"; end if;
numlet(2 downto 0)<=numlet(2 downto 0) 1;
if(numlet(2 downto 0)="101") then
numlet(2 downto 0)<="011111"; end if;
end if;
if (num (3 downto 0)="0000")then
segsig(7 downto 0)<="01111111"; end if;
if (num (3 downto 0)="0001")then
segsig(7 downto 0)<="00001101"; end if;
if (num (3 downto 0)="0010")then
segsig(7 downto 0)<="10110111"; end if;
if (num (3 downto 0)="0011")then
segsig(7 downto 0)<="10011111"; end if;
if (num (3 downto 0)="0100")then
segsig(7 downto 0)<="11001101"; end if;
if (num (3 downto 0)="0101")then
segsig(7 downto 0)<="11011011"; end if;
if (num (3 downto 0)="0110")then
segsig(7 downto 0)<="11111011"; end if;
if (num (3 downto 0)="0111")then
segsig(7 downto 0)<="00001111"; end if;
if (num (3 downto 0)="1000")then
segsig(7 downto 0)<="11111111"; end if;
if (num (3 downto 0)="1001")then
segsig(7 downto 0)<="11011111"; end if;
end process;
sel<=selsig;
seg(7 downto 0)<=segsig(7 downto 0);
end behave;

EDA数字秒表的设计程序由毕业论文网(www.huoyuandh.com)会员上传。
原创论文资料流程 相关论文
上一篇:CPLD作为串行接口 下一篇:构造函数与析构函数
推荐论文 本专业最新论文
Tags:EDA数字 秒表 设计程序 2009-07-07 17:26:36【返回顶部】
精彩推荐
发表论文

联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士论文资料


毕业论文网提供论文范文,论文代发,原创论文资料

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 17304545@qq.com

Copyright@ 2009-2020 毕业论文网 版权所有