基于VHDL的多功能数字钟设计报告

时间:2019-05-12 07:07:03下载本文作者:会员上传
简介:写写帮文库小编为你整理了多篇相关的《基于VHDL的多功能数字钟设计报告》,但愿对你工作学习有帮助,当然你在写写帮文库还可以找到更多《基于VHDL的多功能数字钟设计报告》。

第一篇:基于VHDL的多功能数字钟设计报告

基于VHDL的多功能数字钟

设计报告

021215班 卫时章 02121451

一、设计要求

1、具有以二十四小时制计时、显示、整点报时、时间设置和闹钟的功能。

2、设计精度要求为1秒。

二、设计环境:Quartus II

三、系统功能描述

1、系统输入:时钟信号clk采用50MHz;系统状态及较时、定时转换的控制信号为k、set,校时复位信号为reset,均由按键信号产生。

2、系统输出:LED显示输出;蜂鸣器声音信号输出。

3、多功能数字电子钟系统功能的具体描述如下:

(一)计时:正常工作状态下,每日按24h计时制计时并显示,蜂鸣器无声,逢整点报时。

(二)校时:在计时显示状态下,按下“k”键,进入“小时”待校准状态,若此时按下“set”键,小时开始校准;之后按下“k”键则进入“分”待校准状态;继续按下“k”键则进入“秒”待复零状态;再次按下“k”键数码管显示闹钟时间,并进入闹钟“小时”待校准状态;再次按下“k”键则进入闹钟“分”待校准状态;若再按下“k”键恢复到正常计时显示状态。若校时过程中按下“reset”键,则系统恢复到正常计数状态。(1)“小时”校准状态:在“小时”校准状态下,显示“小时”的数码管以2Hz闪烁,并按下“set”键时以2Hz的频率递增计数。(2)“分”校准状态:在“分”校准状态下,显示“分”的数码管以2Hz闪烁,并按下“set”键时以2Hz的频率递增计数。(3)“秒”校准状态:在“秒复零”状态下,显示“秒”的数码管以2Hz闪烁,并以1Hz的频率递增计数。

(4)闹钟“小时”校准状态:在闹钟“小时”校准状态下,显示“小时”的数码管以2Hz闪烁,并按下“set”键时以2Hz的频率递增计数。

(5)闹钟“分”校准状态:在闹钟“分”校准状态下,显示“分”的数码管以2Hz闪烁,并按下“set”键时以2Hz的频率递增计数。

(三)整点报时:蜂鸣器在“59”分钟的第“51”、“53”、“55”、“57”秒发频率为500Hz的低音,在“59”分钟的第“59”秒发频率为1000Hz的高音,结束时为整点。

(四)显示:采用扫描显示方式驱动4个LED数码管显示小时、分,秒由两组led灯以4位BCD 码显示。

(五)闹钟:闹钟定时时间到,蜂鸣器发出频率为1000Hz的高音,持续时间为60秒。

四、各个模块分析说明

1、分频器模块(freq.vhd)(1)模块说明:输入一个频率为50MHz的CLK,利用计数器分出 1KHz的q1KHz,500Hz的q500Hz,2Hz的q2Hz和1Hz的q1Hz。(2)源程序: library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;

entity freq is

port

(CLK: in std_logic;

--输入时钟信号

q1KHz: buffer std_logic;

q500Hz: buffer std_logic;

q2Hz: buffer std_logic;

q1Hz: out std_logic);end freq;

architecture bhv of freq is begin P1KHZ:process(CLK)variable cout:integer:=0;begin

if CLK'event and CLK='1' then

cout:=cout+1;

--每来个时钟上升沿时cout开始计数 if cout<=25000 then q1KHz<='0';

--当cout<=25000时,q1KHz输出“0”

elsif cout<50000 then q1KHz<='1';--当25000

else cout:=0;

--输出“1”,完成1KHz频率输出 end if;

end if;end process;

P500HZ:process(q1KHz)

--q1KHz作为输入信号,分出q500Hz variable cout:integer:=0;begin if q1KHz'event and q1KHz='1' then cout:=cout+1;if cout=1 then q500Hz<='0';

--二分频

elsif cout=2 then cout:=0;q500Hz<='1';end if;

end if;end process;

P2HZ:process(q500Hz)variable cout:integer:=0;begin if q500Hz'event and q500Hz='1' then cout:=cout+1;if cout<=125 then q2Hz<='0';

elsif cout<250 then q2Hz<='1';

else cout:=0;end if;

end if;end process;

P1HZ:process(q2Hz)variable cout:integer:=0;begin if q2Hz'event and q2Hz='1' then cout:=cout+1;if cout=1 then q1Hz<='0';

elsif cout=2 then cout:=0;q1Hz<='1';end if;

end if;end process;end bhv;(3)模块图:

2、控制器模块(contral.vhd)(1)模块说明:输入端口k,set键来控制6个状态,这六个状态分别是: 显示计时时间状态,调计时的时、分、秒的3个状态,调闹铃的时、分的3个状态,reset键是复位键,用来回到显示计时时间的状态。(2)波形仿真图:

(3)模块图:

3、二选一模块(mux21a.vhd)(1)源程序: library ieee;

use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;

entity mux21a is port(a,b,s:in bit;

y:out bit);end entity mux21a;

architecture one of mux21a is begin

process(a,b,s)begin if s='0' then

y<=a;

--若s=0,y输出a,反之输出b。else y<=b;end if;end process;end architecture one;(2)仿真波形图:

(3)模块图:

4、计时模块

a.秒计时(second.vhd)(1)仿真波形图:

(2)模块图:

b.分计时(minute.vhd)(1)仿真波形图:

(2)模块图:

c.小时计时(hour.vhd)(1)仿真波形图:

(2)模块图:

d.闹钟分计时(cntm60b.vhd)(1)仿真波形图:

(2)模块图:

e.闹钟小时计时(cnth24b.vhd)(1)仿真波形图:

(2)模块图:

5、闹钟比较模块(compare.vhd)(1)模块说明:比较正常计数时间与闹钟定时时间是否相等,若相等,compout输出“1”,反之输出“0”。(2)仿真波形图:

(3)模块图:

6、报时模块(bell.vhd)(1)模块说明:该模块既实现了整点报时的功能,又实现了闹铃的功能,蜂鸣器通过所选频率的不同,而发出不同的声音。(2)仿真波形图:

(3)模块图:

7、控制显示模块(show_con.vhd)(1)模块说明:该模块实现了数码管既可以显示正常时间,又可以显示闹钟时间的功能;调时过程的定时闪烁功能也在此模块中真正实现。(2)源程序: library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity show_con is

port(th1,tm1,ts1:in std_logic_vector(7 downto 4);

th0,tm0,ts0:in std_logic_vector(3 downto 0);

bh1,bm1:in std_logic_vector(7 downto 4);

bh0,bm0:in std_logic_vector(3 downto 0);

sec1,min1,h1: out std_logic_vector(7 downto 4);

sec0,min0,h0: out std_logic_vector(3 downto 0);

q2Hz,flashs,flashh,flashm,sel_show:in std_logic);end show_con;

architecture rtl of show_con is begin process(th1,tm1,ts1,th0,tm0,ts0,bh1,bm1,bh0,bm0,q2Hz,flashs,flashh,flashm,sel_show)

begin

if sel_show='0'then

if(flashh='1'and q2Hz='1')then

h1<=“1111”;h0<=“1111”;--显示小时数码管以2Hz闪烁

min1<=tm1;min0<=tm0;

sec1<=ts1;sec0<=ts0;

elsif(flashm='1'and q2Hz='1')then

h1<=th1;h0<=th0;

min1<=“1111”;min0<=“1111”;

sec1<=ts1;sec0<=ts0;

elsif(flashs='1'and q2Hz='1')then

h1<=th1;h0<=th0;

min1<=tm1;min0<=tm0;

sec1<=“1111”;sec0<=“1111”;

else

h1<=th1;h0<=th0;

min1<=tm1;min0<=tm0;

sec1<=ts1;sec0<=ts0;

end if;

elsif sel_show='1'then--若sel_show为“1”,数码管显示闹钟时间

if(flashh='1' and q2Hz='1')then

h1<=“1111”;h0<=“1111”;

min1<=bm1;min0<=bm0;

sec1<=“0000”;sec0<=“0000”;

elsif(flashm='1' and q2Hz='1')then

h1<=bh1;h0<=bh0;

min1<=“1111”;min0<=“1111”;

sec1<=“0000”;sec0<=“0000”;

else

h1<=bh1;h0<=bh0;

min1<=bm1;min0<=bm0;

sec1<=“0000”;sec0<=“0000”;

end if;

end if;

end process;end rtl;(3)模块图:

8、动态扫描显示模块(scan_led.vhd)(1)模块说明:由4组输入信号和输出信号进而实现了时钟时、分的动态显示。(2)源程序: library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;

entity scan_led is port(clk1:in std_logic;

h0:in std_logic_vector(3 downto 0);

h1:in std_logic_vector(7 downto 4);

min0:in std_logic_vector(3 downto 0);

min1:in std_logic_vector(7 downto 4);

ML:out std_logic_vector(7 downto 0);

MH:out std_logic_vector(7 downto 0);

HL:out std_logic_vector(7 downto 0);

HH:out std_logic_vector(7 downto 0));end scan_led;

architecture one of scan_led is signal cnt4:std_logic_vector(1 downto 0);signal a: std_logic_vector(3 downto 0);begin p1:process(clk1)begin

if clk1'event and clk1 ='1' then

cnt4<=cnt4+1;

if cnt4=3 then

cnt4<=“00”;end if;end if;end process p1;

p2:process(cnt4,h1,h0,min1,min0)begin case cnt4 is

--控制数码管位选 when “00”=>case min0 is

when “0000”=>ML<=“11000000”;

when “0001”=>ML<=“11111001”;

when “0010”=>ML<=“10100100”;

when “0011”=>ML<=“10110000”;

when “0100”=>ML<=“10011001”;

when “0101”=>ML<=“10010010”;

when “0110”=>ML<=“10000010”;

when “0111”=>ML<=“11111000”;

when “1000”=>ML<=“10000000”;

when “1001”=>ML<=“10010000”;

when others=>NULL;

end case;when “01”=>case min1 is

when “0000”=>MH<=“11000000”;

when “0001”=>MH<=“11111001”;

when “0010”=>MH<=“10100100”;

when “0011”=>MH<=“10110000”;

when “0100”=>MH<=“10011001”;

when “0101”=>MH<=“10010010”;

when “0110”=>MH<=“10000010”;

when “0111”=>MH<=“11111000”;

when “1000”=>MH<=“10000000”;

when “1001”=>MH<=“10010000”;

when others=>NULL;

end case;when “10”=>case h0 is

when “0000”=>HL<=“11000000”;

when “0001”=>HL<=“11111001”;

when “0010”=>HL<=“10100100”;

when “0011”=>HL<=“10110000”;

when “0100”=>HL<=“10011001”;

when “0101”=>HL<=“10010010”;

when “0110”=>HL<=“10000010”;

when “0111”=>HL<=“11111000”;

when “1000”=>HL<=“10000000”;

when “1001”=>HL<=“10010000”;

when others=>NULL;

end case;when “11”=>case h1 is

when “0000”=>HH<=“11000000”;

when “0001”=>HH<=“11111001”;

when “0010”=>HH<=“10100100”;

when “0011”=>HH<=“10110000”;

when “0100”=>HH<=“10011001”;

when “0101”=>HH<=“10010010”;

when “0110”=>HH<=“10000010”;

when “0111”=>HH<=“11111000”;

when “1000”=>HH<=“10000000”;

when “1001”=>HH<=“10010000”;

when others=>NULL;

end case;when others =>null;end case;end process p2;end one;(3)模块图:

五、端口设定

k:button2,set:button1,reset:button0 ; Bell:SW1 用于开关蜂鸣器;

六、顶层电路图

七、心得体会

此次的数字钟设计重在于按键的控制和各个模块代码的编写,虽然能把键盘接口和各个模块的代码编写出来,并能正常显示,但对于各个模块的优化设计还有一定的缺陷和不足,比如对按键消抖等细节处并未作出优化。

经过此次数字钟的设计,我确实从中学到很多的东西。首先,通过VHDL硬件语言的学习,我充分认识到了功能模块如何用语言实现,让我初步了解到了一个数字电路用硬件语言设计的方式和设计思想。其次,也让我深深地体会到实践的重要性,起初我学VHDL语言的时候,只是学得书本上的知识,经过这次课程设计,通过对模块的语言实现,对于VHDL语言我有了更深的认识。而且在程序错误的发现和改正的过程中,我得到了更多的收获,也确实让我进步了不少。再次,当我遇到一些问题的时候,请教老师,和同学们一起讨论,令我受益颇多!最后,这个多功能数字电子钟是自我创造与吸取借鉴共同作用的产物,是自我努力的结果。这让我对数字电路的设计充满了信心。虽然课程设计已经结束,但这并不代表着我已经真正掌握了VHDL语言,仍需继续学习!

第二篇:多功能数字钟设计

课程设计任务书

课程设计名称学生姓名专业班级设计题目多功能数字钟设计

一、课程设计目的1、综合运用EDA技术,独立完成一个课题的设计,考察运用所学知识,解决实际问题的能力;

2、结合理论知识,考察阅读参考资料、文献、手册的能力;

3、进一步熟悉EDA技术的开发流程,掌握文件编辑、编译、仿真、下载验证等环节的实现方法和

应用技巧;

4、锻炼撰写研究报告、研究论文的能力;

5、通过本实践环节,培养科学和严谨的工作作风。

二、设计内容、技术条件和要求

l、能进行正常的时、分、秒计时功能,分别由6个数码显示24小时、60分钟的计数器显示。

2、能利用实验系统上的按钮实现“校时”、“校分”功能;

(1)按下“SA”键时,计时器迅速递增,并按24小时循环;

(2)按下“SB”键时,计时器迅速递增,并按59分钟循环,并向“时”进位;

(3)按下“SC”键时,秒清零;抖动的,必须对其消抖处理。

3、能利用扬声器做整点报时:

(1)当计时到达59’50”时开始报时,频率可为500Hz;

计满23小时后回零;计满59分钟后回零。

(2)到达59’59”时为最后一声整点报时,整点报时的频率可定为lKHz。

4定时闹钟功能

5、用层次化设计方法设计该电路,用硬件描述语言编写各个功能模块。

6、报时功能。报时功能用功能仿真的仿真验证,可通过观察有关波形确认电路设计是否正确。

三、时间进度安排

1周:(1)完成设计准备,确定实施方案;(2)完成电路文件的输入和编译;(4)完成功能仿真。

2周:(1)完成文件至器件的下载,并进行硬件验证;(2)撰写设计说明书。

四、主要参考文献

(1)谭会生、瞿遂春,《EDA技术综合应用实例与分析》,西安电子科技大学出版社,2004

(2)曹昕燕、周凤臣等,《EDA技术实验与课程设计》,清华大学出版社,2006

指导教师签字:2012年9月1日

第三篇:多功能数字钟课程设计VHDL代码书上程序改

library ieee;use ieee.std_logic_1164.all;entity clock is port(clk1hz:in std_logic;--1hz脉冲--clk100:in std_logic;--100hz脉冲--weekclk:in std_logic;--星期调整脉冲--start_stop:in std_logic;--秒表启动/停止控制--reset:in std_logic;--秒表复位--adclk:in std_logic;--校时脉冲--setselect:in std_logic;--调整位选择脉冲--mode:in std_logic;--功能选择脉冲--showdate:in std_logic;--日期显示--dis:out std_logic_vector(23 downto 0);--显示输出--glisten:out std_logic_vector(5 downto 0);--闪烁指示--weekout:out std_logic_vector(3 downto 0);--星期输出--qh:out std_logic--整点报时--);end clock;architecture arch of clock is component adjust

port(adclk: in std_logic;

data_in: out std_logic_vector(7 downto 0));end component;component control

port(setclk: in std_logic;

setlap: out std_logic_vector(1 downto 0);

mode: in std_logic;

module: out std_logic_vector(2 downto 0));end component;component weekcounter

port(clk: in std_logic;

clk2: in std_logic;

q: out std_logic_vector(3 downto 0));end component;component stopwatch

port(clk: in std_logic;

reset: in std_logic;

start_stop: in std_logic;

centsec: out std_logic_vector(7 downto 0);

sec: out std_logic_vector(7 downto 0);

min: out std_logic_vector(7 downto 0));end component;component h_m_s_count

port(clk: in std_logic;

set: in std_logic;

setlap: in std_logic_vector(1 downto 0);

d:in std_logic_vector(7 downto 0);

sec:out std_logic_vector(7 downto 0);

min:out std_logic_vector(7 downto 0);

hour:out std_logic_vector(7 downto 0);

qh:out std_logic;

qc: out std_logic);end component;component y_m_d_count

port(clk: in std_logic;

set: in std_logic;

setlap: in std_logic_vector(1 downto 0);

data_in: in std_logic_vector(7 downto 0);

day: out std_logic_vector(7 downto 0);

month: out std_logic_vector(7 downto 0);

year: out std_logic_vector(7 downto 0));end component;component display

port(module: in std_logic_vector(2 downto 0);

showdate:in std_logic;

clk:in std_logic;

setlap:in std_logic_vector(1 downto 0);

watch: in std_logic_vector(23 downto 0);

time:in std_logic_vector(23 downto 0);

date:in std_logic_vector(23 downto 0);

dis: out std_logic_vector(23 downto 0);

glisten:out std_logic_vector(5 downto 0));end component;signal data_in,mcentsec,msec,mmin,ssec,smin,shour,sdate,smonth,syear:std_logic_vector(7 downto 0);signal setlap:std_logic_vector(1 downto 0);signal module:std_logic_vector(2 downto 0);signal qc:std_logic;signal watch,time,date:std_logic_vector(23 downto 0);begin u1:adjust port map(adclk,data_in);u2:control port map(setselect,setlap,mode,module);u3:stopwatch port map(clk100,reset,start_stop,mcentsec,msec,mmin);u4:h_m_s_count port map(clk1hz,module(1),setlap,data_in,ssec,smin,shour,qh,qc);u5:y_m_d_count port map(qc,module(2),setlap,data_in,sdate,smonth,syear);u6:display port map(module,showdate,clk1hz,setlap,watch,time,date,dis,glisten);u7:weekcounter port map(qc,weekclk,weekout);watch<=mmin&msec&mcentsec;time<=shour&smin&ssec;date<=syear&smonth&sdate;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity adjust is

port(adclk: in std_logic;

data_in: out std_logic_vector(7 downto 0));end adjust;architecture arch of adjust is signal temp2,temp1:std_logic_vector(3 downto 0);begin process(adclk)begin if rising_edge(adclk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“1001” and temp1=“1001” then temp1<=“0000”;temp2<=“0000”;end if;end if;data_in<=temp2&temp1;end process;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity control is

port(setclk: in std_logic;--调整脉冲--

setlap: out std_logic_vector(1 downto 0);--调整位选择脉冲--

mode: in std_logic;--功能选择脉冲--

module: out std_logic_vector(2 downto 0)--功能输出--);end control;architecture arch of control is signal ssetlap:std_logic_vector(1 downto 0);signal s:std_logic_vector(3 downto 0);begin process(mode,setclk)begin if mode='1'then ssetlap<=“00”;elsif rising_edge(setclk)then if ssetlap=“10”then ssetlap<=“00”;else ssetlap<=ssetlap+'1';end if;end if;end process;setlap<=ssetlap;process(mode)begin if rising_edge(mode)then case s is when“0001”=>s<=“0010”;when“0010”=>s<=“0100”;when“0100”=>s<=“1000”;when“1000”=>s<=“0001”;when others=>s<=“0010”;end case;end if;end process;module<=s(3 downto 1);end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity counter60 is

port(clk: in std_logic;--计数脉冲--

clr: in std_logic;--复位--

q: out std_logic_vector(7 downto 0);--计数值--

qc:out std_logic--进位输出--);end counter60;architecture arch of counter60 is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clr,clk)begin if clr='1'then temp1<=“0000”;temp2<=“0000”;elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else temp1<=temp1+'1';end if;if temp2=“0101” and temp1=“1001” then temp1<=“0000”;temp2<=“0000”;qc<='1';else qc<='0';end if;end if;q<=temp2&temp1;end process;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity counter99 is

port(clk: in std_logic;--100vhz计数脉冲--

en: in std_logic;--计数使能--

clr: in std_logic;--复位--

q: out std_logic_vector(7 downto 0);--计数值--

qc: out std_logic--进位--);end counter99;

architecture arch of counter99 is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clr,clk)begin if clr='1'then temp1<=“0000”;temp2<=“0000”;elsif rising_edge(clk)then if en='1' then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“1001” and temp1=“1001” then temp1<=“0000”;temp2<=“0000”;qc<='1';else qc<='0';end if;end if;end if;q<=temp2&temp1;end process;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity daycounter is

port(clk: in std_logic;--计数脉冲--

set: in std_logic;--调整信号--

day_in: in std_logic_vector(7 downto 0);--调整输入--

day_out: out std_logic_vector(7 downto 0);--天输出--

qc: out std_logic;--进位--

day28: in std_logic;--该位为1表示该月为28天--

day29: in std_logic;--该位为1表示该月为29天--

day30: in std_logic;--该位为1表示该月为30天--

day31: in std_logic--该位为1表示该月为31天--);end daycounter;architecture arch of daycounter is signal temp1,temp2:std_logic_vector(3 downto 0);signal days:std_logic_vector(7 downto 0);begin days<=“00101000” when day28='1'else

“00101001”when day29='1'else

“00110000”when day30='1'else

“00110001”when day31='1'else

“00000000”;process(clk,set,day_in,days)begin if set='1' then temp2<=day_in(7 downto 4);temp1<=day_in(3 downto 0);elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else temp1<=temp1+'1';end if;if temp2&temp1=days then temp2<=“0000”;temp1<=“0001”;qc<='1';else qc<='0';end if;end if;end process;day_out<=temp2&temp1;end arch;library ieee;use ieee.std_logic_1164.all;entity days_control is port(month: in std_logic_vector(7 downto 0);--月份--

year2: in std_logic;--年份高位数字bcd码最低位--

year1: in std_logic_vector(1 downto 0);--年份低位数字bcd码末两位--

day28: out std_logic;--该位为1表示该月为28天--day29: out std_logic;--该位为1表示该月为29天--

day30: out std_logic;--该位为1表示该月为30天--

day31: out std_logic--该位为1表示该月为31天--);end days_control;architecture arch of days_control is begin process(month,year2,year1)begin case month is when “00000001”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00000010”=>if(year2='0'and year1=“00”)or(year2='1'and year1=“10”)then

day28<='0';day29<='1';day30<='0';day31<='0';

else

day28<='1';day29<='0';day30<='0';day31<='0';

end if;when “00000011”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00000100”=>day28<='0';day29<='0';day30<='1';day31<='0';when “00000101”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00000110”=>day28<='0';day29<='0';day30<='1';day31<='0';when “00000111”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00001000”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00001001”=>day28<='0';day29<='0';day30<='1';day31<='0';when “00010000”=>day28<='0';day29<='0';day30<='0';day31<='1';when “00010001”=>day28<='0';day29<='0';day30<='1';day31<='0';when “00010010”=>day28<='0';day29<='0';day30<='0';day31<='1';when others=>day28<='0';day29<='0';day30<='0';day31<='1';end case;end process;end arch;library ieee;use ieee.std_logic_1164.all;entity display is

port(module: in std_logic_vector(2 downto 0);--功能选择--

showdate:in std_logic;--显示日期--

clk:in std_logic;--闪烁脉冲--

setlap:in std_logic_vector(1 downto 0);--闪烁位选择--

watch: in std_logic_vector(23 downto 0);--秒表计数值输入--

time:in std_logic_vector(23 downto 0);--时分秒计数值输入--date:in std_logic_vector(23 downto 0);--年月日计数值输入--

dis: out std_logic_vector(23 downto 0);--显示输出--

glisten:out std_logic_vector(5 downto 0)--闪烁输出--);end display;architecture arch of display is begin process(module,showdate,watch,time,date)begin if showdate='1'then dis<=date;else case module is when“001”=>dis<=watch;when“010”=>dis<=time;when“100”=>dis<=date;when others=>dis<=time;end case;end if;end process;process(clk,module,setlap)begin if module=“010”or module=“100”then case setlap is when“00”=>glisten(1 downto 0)<=clk&clk;

glisten(5 downto 2)<=“0000”;when“01”=>glisten(3 downto 2)<=clk&clk;

glisten(5 downto 4)<=“00”;

glisten(1 downto 0)<=“00”;when“10”=>glisten(5 downto 4)<=clk&clk;

glisten(3 downto 0)<=“0000”;when others=>glisten<=“000000”;end case;else glisten<=“000000”;end if;end process;end arch;library ieee;use ieee.std_logic_1164.all;entity dmux is

port(set:in std_logic;--调整信号--

setlap: in std_logic_vector(1 downto 0);--调整位选择--

d: in std_logic_vector(7 downto 0);--调整输入--

set1:out std_logic;

set2:out std_logic;

set3:out std_logic;

q1: out std_logic_vector(7 downto 0);

q2: out std_logic_vector(7 downto 0);

q3: out std_logic_vector(7 downto 0));end dmux;architecture arch of dmux is begin process(set,setlap,d)begin if set='1' then case setlap is when“00”=>set1<='1';set2<='0';set3<='0';

q1<=d;when“01”=>set1<='0';set2<='1';set3<='0';

q2<=d;when“10”=>set1<='0';set2<='0';set3<='1';

q3<=d;when others=>set1<='0';set2<='0';set3<='0';end case;else set1<='0';set2<='0';set3<='0';end if;end process;end arch;library ieee;use ieee.std_logic_1164.all;entity h_m_s_count is

port(clk: in std_logic;--1hz脉冲--

set: in std_logic;--调整信号--

setlap: in std_logic_vector(1 downto 0);--调整位选择--

d:in std_logic_vector(7 downto 0);--调整输入--

sec:out std_logic_vector(7 downto 0);--秒输出--

min:out std_logic_vector(7 downto 0);--分输出--

hour:out std_logic_vector(7 downto 0);--小时输出--

qh:out std_logic;--整点报时--

qc: out std_logic--进位--);end h_m_s_count;architecture arch of h_m_s_count is component sec_mincounter

port(clk: in std_logic;

set:in std_logic;

d:in std_logic_vector(7 downto 0);

q:out std_logic_vector(7 downto 0);

qc:out std_logic);end component;component hourcounter port(clk: in std_logic;

set:in std_logic;

d:in std_logic_vector(7 downto 0);

q: out std_logic_vector(7 downto 0);

qc:out std_logic);end component;component dmux

port(set:in std_logic;

setlap: in std_logic_vector(1 downto 0);

d: in std_logic_vector(7 downto 0);

set1:out std_logic;

set2:out std_logic;

set3:out std_logic;

q1: out std_logic_vector(7 downto 0);

q2: out std_logic_vector(7 downto 0);

q3: out std_logic_vector(7 downto 0));end component;signal secset,minset,hourset: std_logic;signal secin,minin,hourin:std_logic_vector(7 downto 0);signal qcsec,qcmin,qchour: std_logic;begin u1:dmux port map(set,setlap,d,secset,minset,hourset,secin,minin,hourin);u2:sec_mincounter port map(clk,secset,secin,sec,qcsec);u3:sec_mincounter port map(qcsec,minset,minin,min,qcmin);u4:hourcounter port map(qcmin,hourset,hourin,hour,qchour);qh<=qcmin;qc<=qchour;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity hourcounter is

port(clk: in std_logic;--计数脉冲--

set:in std_logic;--调整信号--

d:in std_logic_vector(7 downto 0);--调整时间--

q: out std_logic_vector(7 downto 0);--小时输出--

qc:out std_logic--进位--);end hourcounter;architecture arch of hourcounter is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clk,set)begin if set='1'then temp2<=d(7 downto 4);temp1<=d(3 downto 0);elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“0010” and temp1=“0100” then temp1<=“0000”;temp2<=“0000”;qc<='1';else qc<='0';end if;end if;end process;q<=temp2&temp1;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity monthcounter is

port(clk: in std_logic;--计数脉冲--

set: in std_logic;--调整信号--

month_in: in std_logic_vector(7 downto 0);--调整输入--

month_out: out std_logic_vector(7 downto 0);--月输出--

qc: out std_logic--进位--);end monthcounter;architecture arch of monthcounter is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clk,set,month_in)begin if set='1' then temp2<=month_in(7 downto 4);temp1<=month_in(3 downto 0);elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“0001”and temp1=“0010” then temp2<=“0000”;temp1<=“0001”;qc<='1';else qc<='0';end if;end if;end process;month_out<=temp2&temp1;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity sec_mincounter is port(clk: in std_logic;--计数脉冲--

set:in std_logic;--调整信号--

d:in std_logic_vector(7 downto 0);--调整时间输入--

q:out std_logic_vector(7 downto 0);--分和秒输出--

qc:out std_logic--进位--);end sec_mincounter;architecture arch of sec_mincounter is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clk,set)begin if set='1'then temp2<=d(7 downto 4);temp1<=d(3 downto 0);elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“0101” and temp1=“1001” then temp1<=“0000”;temp2<=“0000”;qc<='1';else qc<='0';end if;end if;end process;q<=temp2&temp1;end arch;library ieee;use ieee.std_logic_1164.all;entity stopwatch is port(clk: in std_logic;--100hz脉冲--

reset: in std_logic;--复位--

start_stop: in std_logic;--启动/停止--

centsec: out std_logic_vector(7 downto 0);--百分秒输出,当超过60分转为秒--

sec: out std_logic_vector(7 downto 0);--秒输出,当超过60分转为分--

min: out std_logic_vector(7 downto 0)--分输出,当超过60分转为小时--);end stopwatch;architecture arch of stopwatch is component counter99 port(clk: in std_logic;

en: in std_logic;

clr: in std_logic;

q: out std_logic_vector(7 downto 0);

qc: out std_logic);end component;component counter60 port(clk: in std_logic;

clr: in std_logic;

q: out std_logic_vector(7 downto 0);

qc: out std_logic);end component;signal qc1,qc2,qc3,qc4,flag:std_logic;signal tcentsec,tsec,tmin,thour:std_logic_vector(7 downto 0);begin u1:counter99 port map(clk,start_stop,reset,tcentsec,qc1);u2:counter60 port map(qc1,reset,tsec,qc2);u3:counter60 port map(qc2,reset,tmin,qc3);u4:counter60 port map(qc3,reset,thour,qc4);process(qc3)begin if rising_edge(qc3)then flag<='1';end if;if flag='1' then centsec<=tsec;sec<=tmin;min<=thour;else centsec<=tcentsec;sec<=tsec;min<=tmin;end if;end process;end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity weekcounter is

port(clk: in std_logic;--天脉冲--

clk2: in std_logic;--外部星期调整脉冲--

q: out std_logic_vector(3 downto 0)--星期输出--);end weekcounter;architecture arch of weekcounter is signal temp:std_logic_vector(3 downto 0);signal cp:std_logic;begin cp<=clk or clk2;process begin wait until rising_edge(cp);if temp=“0111” then temp<=“0001”;else

temp<=temp+'1';end if;q<=temp;end process;end arch;library ieee;use ieee.std_logic_1164.all;entity y_m_d_count is

port(clk: in std_logic;--计数脉冲--

set: in std_logic;--调整信号--

setlap: in std_logic_vector(1 downto 0);--调整位选择--

data_in: in std_logic_vector(7 downto 0);--调整输入--

day: out std_logic_vector(7 downto 0);--日输出--

month: out std_logic_vector(7 downto 0);--月输出--

year: out std_logic_vector(7 downto 0)--年输出--);end y_m_d_count;architecture arch of y_m_d_count is component daycounter

port(clk: in std_logic;

set: in std_logic;

day_in: in std_logic_vector(7 downto 0);

day_out: out std_logic_vector(7 downto 0);

qc: out std_logic;

day28: in std_logic;

day29: in std_logic;

day30: in std_logic;

day31: in std_logic);end component;component monthcounter

port(clk: in std_logic;

set: in std_logic;

month_in: in std_logic_vector(7 downto 0);

month_out: out std_logic_vector(7 downto 0);

qc: out std_logic);end component;component yearcounter

port(clk: in std_logic;

set: in std_logic;

year_in: in std_logic_vector(7 downto 0);

year_out: out std_logic_vector(7 downto 0));end component;component dmux

port(set:in std_logic;

setlap: in std_logic_vector(1 downto 0);

d: in std_logic_vector(7 downto 0);

set1:out std_logic;

set2:out std_logic;

set3:out std_logic;

q1: out std_logic_vector(7 downto 0);

q2: out std_logic_vector(7 downto 0);

q3: out std_logic_vector(7 downto 0));end component;component days_control

port(month: in std_logic_vector(7 downto 0);

year2: in std_logic;

year1: in std_logic_vector(1 downto 0);

day28: out std_logic;

day29: out std_logic;

day30: out std_logic;

day31: out std_logic);end component;signal dayset,monthset,yearset: std_logic;signal qcday,qcmonth: std_logic;signal dayin,monthin,yearin: std_logic_vector(7 downto 0);signal smonth,syear:std_logic_vector(7 downto 0);signal day28,day29,day30,day31:std_logic;begin u1:dmux port map(set,setlap,data_in,dayset,monthset,yearset,dayin,monthin,yearin);u2:daycounter port map(clk,dayset,dayin,day,qcday,day28,day29,day30,day31);u3:monthcounter port map(qcday,monthset,monthin,smonth,qcmonth);u4:yearcounter port map(qcmonth,yearset,yearin,syear);u8:days_control port map(smonth,syear(4),syear(1 downto 0),day28,day29,day30,day31);month<=smonth;year<=syear;

end arch;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity yearcounter is

port(clk: in std_logic;--计数脉冲--

set: in std_logic;--调整信号--

year_in: in std_logic_vector(7 downto 0);--调整输入--

year_out: out std_logic_vector(7 downto 0)--年输出--);end yearcounter;architecture arch of yearcounter is signal temp1,temp2:std_logic_vector(3 downto 0);begin process(clk,set,year_in)begin if set='1' then temp2<=year_in(7 downto 4);temp1<=year_in(3 downto 0);elsif rising_edge(clk)then if temp1=“1001” then temp2<=temp2+'1';temp1<=“0000”;else

temp1<=temp1+'1';end if;if temp2=“1001” and temp1=“1001” then temp1<=“0000”;temp2<=“0000”;end if;end if;end process;year_out<=temp2&temp1;end arch;

第四篇:多功能数字钟课程设计报告

课题名称 姓名 学号 院、系、部 专业 指导教师

电子技术课程设计报告书

2016年6月12日

一、设计任务及要求:

用中小规模集成芯片设计并制作多功能数字钟,具体要求如下:

1、准确及时,以数字形式显示时(00~23)、分(00~59)、秒(00~59)的时间。

2、具有校时功能。指导教师签名:

2016

二、指导教师评语:

指导教师签名:

2016

三、成绩

指导教师签名:

2016年6月年6月年6月日

多功能数字钟课程设计报告 设计目的

一、设计原理与技术方法:

包括:电路工作原理分析与原理图、元器件选择与参数计算、电路调试方法与结果说明; 软件设计说明书与流程图、软件源程序代码、软件调试方法与运行结果说明。

1、电路工作原理分析与原理图

数字钟实际上是一个对标准频率(1Hz)进行计数的计数电路。由于标准的1Hz 时间信号必须做到准确稳定,所以通常使用输出频率稳定的石英晶体振荡器电路构成数字钟的振源。又由于计数的起始时间不可能与标准时间(如北京时间)一致,故需要在电路上加一个校时电路。因此一个具有计时、校时、报时、显示等基本功能的数字钟主要由振荡器、分频器、计数器、译码器、显示器、校时电路、报时电路等七部分组成。石英晶体振荡器产生的信号经过分频器得到秒脉冲后,秒脉冲送入计数器计数,计数结果通过“时”、“分”、“秒”译码器译码,并通过显示器显示时间。由以上分析可得到原理框图如下图

图1 实验原理框图

2、元器件选择与参数计算

(1)晶体振荡电路:产生秒脉冲既可以采用555脉冲发生电路也可以采用晶振脉冲发生电路。若由集成电路定时器555与RC组成的多谐振荡器作为时间标准信号源,可使555与RC组成多谐振荡器,产生频率 f=1kHz的方波信号,再通过分频则可得到秒脉冲信号。晶体振荡器电路则可以给数字钟提供一个频率稳定准确的32768Hz的方波信号,可保证数字钟的走时准确及稳定。相比二者的稳定性,晶振电路比555电路能够产生更加稳定的脉冲,数字电路中的时钟是由振荡器产生的,振荡器是数字钟的核心。振荡器的稳定度及频率的精度决定了数字钟计时的准确程度,所以最后决定采用晶振脉冲发生电路。石英晶体振荡器的特点是振荡频率准确、电路结构简单、频率易调整,它是电子钟的核心,用它产生标准频率信号,再由分频器分成秒时间脉冲。

所以秒脉冲晶体振荡选用32768Hz的晶振,该元件专为数字钟电路而设计,其频率较低,有利于减少分频器级数。从有关手册中,可查得C1、C2均为20pF。当要求频率准确度和稳定度更高时,还可接入校正电容并采取温度补偿措施。由于CMOS电路的输入阻抗极高,因此反馈电阻R1可选为20MΩ。

(2)分频器电路:分频器电路将32768Hz的高频方波信号经32768(152)次分频后得到1Hz的方波信号供秒计数器进行计数。分频器实际上也就是计数器。该电路可通过CD4060与双D触发器74LS74共同实现。

(3)时间计数器电路:时间计数电路由秒个位和秒十位计数器、分个位和分十位计数器及时个位和时十位计数器电路构成,其中秒个位和秒十位计数器、分个位和分十位计数器为60进制计数器,而根据设计要求,时个位和时十位计数器为24进制计数器。计数器可以使用十进制的74LS160。

(4)译码驱动电路:译码驱动电路将计数器输出的8421BCD码转换为数码管需要的逻辑状态,并且为保证数码管正常工作提供足够的工作电流。译码器可以使用CD4511。

(5)校时电路:可以通过基本的门器件、电阻与开关实现。由设计的电路图可选择与非门74LS00。(6)整点报时电路:一般时钟都应具备整点报时电路功能,即在时间出现整点前数秒内,数字钟会自动报时,以示提醒.其作用方式是发出连续的或有节奏的音频声波。

3、电路调试方法与结果说明(1)电路调试方法 ①数码管的调试:可以用万用表的负极接数码管的3或8脚,正极依次接数码管剩余的管脚所接电阻的另一端,并将万用表调至测发光二极管档位,从而测试数码管的显示是否正确。②“时”“分”“秒”电路的调试:将“时”“分”“秒”电路连接完成后,可以用函数信号发生器产生的1Hz方波信号分别作为“时”、“分”、“秒”的个位74LS160的计数脉冲,从而测试“时”是否为24进制,“分”和“秒”是否为60进制。③校时电路的调试:先将电路外接用函数信号发生器产生的2Hz方波信号,再分别通过校时、校分电路开关的断开、闭合以及开关闭合后电路的工作情况判断电路的校时、校分功能是否正确。

④秒脉冲产生电路的调试:将电路产生的秒时间脉冲接入示波器,观察并计算电路是否产生1Hz方波信号。(2)结果说明

①数码管的调试:当正极依次接1、2、4、5、7、9、10管脚时,数码管依次是G、F、A、B、C、D、E亮。②“时”“分”“秒”电路的调试:“时”为24进制(从“00”到“23”),“分”和“秒”都为60进制(从“00”到“59”)。

③校时电路的调试:开关断开时电路处于正常工作状态,开关闭合时电路处于校时、校分状态。

④秒脉冲产生电路的调试:电路产生1Hz方波信号。

4、软件设计说明书与流程图(1)秒脉冲产生电路

晶体振荡器是构成数字式时钟的核心,它保证了时钟的走时准确及稳定。由于晶体具有较高的频率稳定性及准确性,从而保证了输出频率的稳定和准确。晶体XTAL的频率选为32768HZ。该元件专为数字钟电路而设计,其频率较低,有利于减少分频器级数。从有关手册中,可查得C1、C2均为20pF。当要求频率准确度和稳定度更高时,还可接入校正电容并采取温度补偿措施。由于CMOS电路的输入阻抗极高,因此反馈电阻R1可选为22MΩ。较高的反馈电阻有利于提高振荡频率的稳定性。通常,数字钟的晶体振荡器输出频率较高,为了得到1Hz的秒信号输入,需要对振荡器的输出信号进行分频。通常实现分频器的电路是计数器电路,一般采用多级2进制计数器来实现。

本实验中采用CD4060来构成分频电路。管脚图见图2。CD4060在数字集成电路中可实现的分频次数最高,而且CD4060还包含振荡电路所需的非门,使用更为方便。CD4060计数为14级2进制计数器,可以将32768Hz的信号分频为2Hz,再经过74LS74即可获得1Hz的方波信号。原理电路图如图3所示,图4为仿真电路图。

图2 D4060管脚图

图3 CD4060秒脉冲振荡发生器

图 4 产生1Hz时间脉冲的电路图

(2)时间计数器电路 ①“秒”“分”电路

根据题目要求,“秒”和“分”都是60进制的,而且是从“00”到“59”,可以使用十进制的74LS160来实现这个功能。首先将两片74LS160通过串行进位方式接成百进制计数器,即分别将“秒”和“分”个位的进位输出信号经非门作为“秒”和“分”十位的计数输入脉冲。当计数器从全0状态开始计数,计入59个脉冲时,经与非门译码产生低电平信号立刻将两片74LS160同时置零,于是便得到了60进制的计数器。74160的逻辑功能示意图、引脚图及功能表如下所示。

图5 a)74160逻辑功能示意图

b)74160引脚图

图6 74160逻辑功能表 ②“时”电路 根据题目要求,“时”是24进制的,而且是从“00”到“23”,可以使用十进制的74LS160来实现这个功能。首先将两片74LS160通过串行进位方式接成百进制计数器,当计数器从全0状态开始计数,计入23个脉冲时,经与非门译码产生低电平信号立刻将两片74LS160同时置零,于是便得到了24进制的计数器。(3)译码驱动电路

计数器实现了对时间的累计以8421BCD码形式输出,选用显示译码电路将计数器的输出数码转换为数码显示器件所需要的输出逻辑和一定的电流,选用CD4511作为显示译码电路,选用LED数码管作为显示单元电路。由于CD4511是输出高电平有效,所以选用七段共阴极LED数码管。若将“秒”、“分”、“时”计数器的每位输出分别接到相应七段译码器的输入端,便可进行不同数字的显示。“秒”用数码管显示如图7所示。

图7 “秒”的译码及驱动显示电路图(4)校时电路

数字种启动后,每当数字钟显示与实际时间不符合,需要根据标准时间进行校时。通常,校正时间的方法是:首先截断正常的计数通路,然后再进行人工触发计数或将频率较高的方波信号加到需要校正的计数单元的输入端,校正好后,再转入正常计时状态即可。校“秒”时,采用等待校时。校“分”、“时”的原理比较简单,采用加速校时。对校时电路的要求是 : 1.在小时校正时不影响分和秒的正常计数。2.在分校正时不影响秒和小时的正常计数。当开关断开时,因为校正信号和0相与的输出为0,而开关的另一端接高电平,正常输入信号可以顺利通过与或门,故校时电路处于正常计时状态;当开关闭合时,情况正好与上述相反,这时校时电路处于校时状态。与非门可选74LS00,非门则可用与非门2个输入端并接来代替从而节省芯片。校时电路图见图8。

校时电路图(5)整点报时电路

一般时钟都应具备整点报时电路功能,即在时间出现整点前数秒内,数字钟会自动报时,以示提醒。其作用方式是发出连续的或有节奏的音频声波。当时间在59分50秒到59分59秒期间时,分十位、分个位和秒十位均保持不变,分别为5、9和5,因此可将分计数器十位的QC和QA、个位的QD和QA及秒计数器十位的QC 和QA相与。电路在整点前6秒钟内开始整点报时,即当时间在59分54秒到59分59秒期间时,报时电路产生报时控制信号,控制小喇叭产生低音;当时间为00分00秒时,报时电路产生报时控制信号,控制小喇叭产生高音。

5、软件调试方法与运行结果说明(1)软件调试方法

由于仿真时晶振不能正常工作,所以通过外接1KHz方波信号来调试电路。“时”“分”“秒”电路的调试:“时”为24进制(从“00”到“23”),“分”和“秒”都为60进制(从“00”到“59”)。校时电路的调试:可以通过校时、校分电路的开关来校对时间,并判断电路的“时”“分”“秒”的进制是否正确。开关断开时电路处于正常工作状态,开关闭合时电路处于校时、校分状态。(2)运行结果说明

数码管的各部分可以正确显示,电路的“时”为24进制(从“00”到“23”),“分”和“秒”都为60进制(从“00”到“59”)。开关断开时电路处于正常工作状态,开关闭合时电路处于校时、校分状态,通过控制开关及输入信号可以达到校时功能。

三、设计体会与建议 1.设计体会

我觉得此次的数字钟设计实验,电路原理相对来比较简单,但电路图比较复杂,所用芯片比较多,相应的连线也多,这就给焊接电路增加了较大的难度。不过通过此次实验,使我更进一步地熟悉了芯片的结构,掌握了实验中所用各芯片的工作原理和其具体的使用方法,同时还接触到了一些新认识的芯片,增长了见识。这次课程设计是一次难得的锻炼机会,让我们能够充分运用所学过的理论知识和自己动手实际操作的能力,另外还让我们学习查找资料的方法,以及自己设计电路、焊接电路、分析解决电路存在的问题的能力。这对于我来说是很好的提高,填补了平日理论学习后实践方面的空白。参考文献

[1] 阎石.数字电子技术基础[M].北京:高等教育出版社,2001年

[2] 杨素行.模拟电子技术基础简明教程[M].北京:高等教育出版社,2005年 [3]康华光.电子技术基础[M].北京:高等教育出版社,1999年 [4]彭华林等编.数字电子技术[M].长沙:湖南大学出版社,2004年 [5]金唯香等编.电子测试技术[M].长沙:湖南大学出版社,2004年

第五篇:多功能数字钟

课程设计任务书

学生姓名:专业班级:指导教师:工作单位:题目:多功能数字钟的设计与实现初始条件:

本设计既可以使用集成译码器、计数器、定时器、脉冲发生器和必要的门电路等,也可以使用单片机系统构建多功能数字钟。用数码管显示时间计数值。

要求完成的主要任务:(包括课程设计工作量及技术要求,以及说明书撰写等具体要求)

1、课程设计工作量:1周。

2、技术要求:

1)设计一个数字钟。要求用六位数码管显示时间,格式为00:00:00。

2)具有60进制和24进制(或12进制)计数功能,秒、分为60进制计数,时为24进制(或12进制)计数。

3)有译码、七段数码显示功能,能显示时、分、秒计时的结果。

4)设计提供连续触发脉冲的脉冲信号发生器,5)具有校时单元、闹钟单元和整点报时单元。

6)确定设计方案,按功能模块的划分选择元、器件和中小规模集成电路,设计分电路,画出总体电路原理图,阐述基本原理。

3、查阅至少5篇参考文献。按《******大学课程设计工作规范》要求撰写设计报告书。全文用A4纸打印,图纸应符合绘图规范。

时间安排:

1、年月

2、年月日,方案选择和电路设计。

3、年月日,电路调试和设计说明书撰写。

4、年月

指导教师签名:年月日 系主任(或责任教师)签名:年月日

下载基于VHDL的多功能数字钟设计报告word格式文档
下载基于VHDL的多功能数字钟设计报告.doc
将本文档下载到自己电脑,方便修改和收藏,请勿使用迅雷等下载。
点此处下载文档

文档为doc格式


声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:645879355@qq.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。

相关范文推荐

    多功能数字钟课程设计

    多功能数字钟 朱安烟 (安阳师范学院 物电学院, 河南 安阳 455002) 摘要:时钟相比具有更高的准确性和直观性 因此得到了更加广泛的使用。 数字钟从原理上讲是一种典型的数字电路......

    多功能数字钟的设计080707

    课程设计任务书学生姓名:专业班级:电子科学与技术0601班 指导教师:吴友宇工作单位:信息工程学院题目:多功能数字钟的设计初始条件: 本设计既可以使用集成译码器、计数器、定时器......

    多功能数字钟电路设计报告五篇

    脉冲与数字电路课程设计 多 功 能 数 字 电 子 钟 的 设 计 脉冲与数字电路课程设计第 1 页 共 13 页 目录 一、 准备阶段...........................3 1. 了解多功能数......

    工艺实习报告多功能数字钟

    目录 一、 实习目的: .............................................................................. 2 二、 实习要求: ....................................................

    多功能数字钟课程设计报告(最终版)

    电子时钟课程设计 电子时钟课程 设计报告 班级:文通 0741 姓名:*** 学号:2007905121** 共页第页 电子时钟课程设计 多功能数字钟课程设计报告 一、课程设计题目: 多功能数字......

    VHDL实现数字钟课设报告[推荐]

    东北大学信息学院 课程设计报告 课程设计题目:用VHDL语言实现数字钟的设计 班 级:电子1001班 学 号:20102594 姓 名:刘云飞 指导老师:李世平、李宁设计时间:2012年12月1 东北大......

    用状态机实现的EDA多功能数字钟课程设计VHDL代码

    设计并实现具有一定功能的数字钟 1、该数字钟可以实现3个功能:计时功能、整点报时功能和重置时间功能,因此有3个功能:计时、重置时间、复位。 2、对所有设计的小系统能够正确分......

    多功能数字钟课程设计整点报时与闹钟功能VHDL代码

    library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following lines to use the declarat......