多功能数字钟电路设计

就要做毕业设计了,但没什么头绪,希望给一篇有关多功能数字钟电路设计的开题报告(要详细),并希望能给几个免费的可以查询或下载毕业设计论文的网站
我要的是做毕业设计的

数字钟的VHDL设计
1、设计任务及要求:
设计任务:设计一台能显示时、分、秒的数字钟。具体要求如下:
由实验箱上的时钟信号经分频产生秒脉冲;
计时计数器用24进制计时电路;
可手动校时,能分别进行时、分的校正;
整点报时;

2 程序代码及相应波形
Second1(秒计数 6进制和10进制)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity second1 is
Port( clks,clr:in std_logic;
Secs,Secg: out std_logic_vector(3 downto 0);
cout1:out std_logic);
End second1;
Architecture a of second1 is
Begin
Process(clks,clr)
variable ss,sg: std_logic_vector(3 downto 0);
variable co: std_logic;
Begin
If clr='1' then ss:="0000"; sg:="0000";
Elsif clks'event and clks='1' then
if ss="0101" and sg="1001" then ss:="0000"; sg:="0000";co:='1';
elsif sg<"1001" then sg:=sg+1;co:='0';
elsif sg="1001" then sg:="0000";ss:=ss+1;co:='0';
end if;
end if;
cout1<=co;
Secs<=ss;
Secg<=sg;
end process;
End a;
Min1(分计数器 6进制和10进制 alm实现整点报时)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity min1 is
Port(clkm,clr:in std_logic;
mins,ming:buffer std_logic_vector(3 downto 0);
enmin,alarm: out std_logic);
End;
Architecture a of min1 is
Begin
Process(clkm,clr)
variable ms,mg :std_logic_vector(3 downto 0);
variable so,alm :std_logic;
Begin
If clr='1' then ms:="0000"; mg:="0000";
Elsif clkm'event and clkm='1' then
if ms="0101" and mg="1001" then ms:="0000";mg:="0000"; so :='1'; alm:='1';
elsif mg<"1001" then mg:=mg+1; so :='0';alm:='0';
elsif mg="1001" then mg:="0000";ms:=ms+1; so :='0';alm:='0';
end if;
end if;
alarm<=alm;
enmin<= so;
mins<=ms;
ming<=mg;
End process;
End a;

Hour1(时计数器 4进制与2进制)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity hour1 is
Port(clkh,clr:in std_logic;
hours,hourg:out std_logic_vector(3 downto 0));
End;
Architecture a of hour1 is
Begin
Process(clkh,clr)
variable hs,hg :std_logic_vector(3 downto 0);
Begin
If clr='1' then hs:="0000"; hg:="0000";
Elsif clkh'event and clkh='1' then
if hs="0010"and hg="0011" then hs:="0000";hg:="0000";
elsif hg<"1001" then hg:=hg+1;
elsif hg="1001" then hg:="0000";hs:=hs+1; end if;
end if;
hours<=hs;
hourg<=hg;
End process;
End;

Madapt(校分)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity madapt is
Port(en,clk,secin,m1:in std_logic;
minset:out std_logic);
End;
Architecture a of madapt is
Begin
Process(en,m1)
Begin
if en='1' then
if m1='1' then minset<=clk;
else minset<=secin; end if;
else minset<=secin ;
end if;
End process;
end;

Hadapt (校时)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Entity hadapt is
Port(en,clk,minin,h1:in std_logic;
hourset:out std_logic);
End;
Architecture a of hadapt is
Begin
Process(en,h1)
Begin
if en='1' then
if h1='1' then hourset<=clk;
else hourset<=minin; end if;
else hourset<=minin;
end if;
End process;
end;

Topclock(元件例化 顶层文件)
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_arith.all;
Use ieee.std_logic_unsigned.all;
Entity topclock is
Port(clk,clr,en,m1,h1:in std_logic;
alarm:out std_logic;
secs,secg,mins,ming,hours,hourg:buffer std_logic_vector(3 downto 0));
End;
Architecture one of topclock is
Component second1
Port( clks,clr:in std_logic;
secs,secg: buffer std_logic_vector(3 downto 0);
cout1: out std_logic);
End Component;
Component min1
Port(clkm,clr:in std_logic;
mins,ming:buffer std_logic_vector(3 downto 0);
enmin,alarm: out std_logic);
End Component;
Component hour1
Port(clkh,clr:in std_logic;
hours,hourg:buffer std_logic_vector(3 downto 0));
End Component;
Component madapt
Port(en,m1,clk,secin:in std_logic;
minset:out std_logic);
End Component;
Component hadapt
Port(en,h1,clk,minin:in std_logic;
hourset:out std_logic);
End Component;
signal a,b,c,d: std_logic;
begin
u1:second1 port map(clr=>clr,
secs=>secs,secg=>secg,clks=>clk, cout1=>a);
u2:min1 port map(clr=>clr,alarm=>alarm,
mins=>mins,ming=>ming,clkm=>b,enmin=>c);
u3:hour1 port map(clr=>clr,
hours=>hours,hourg=>hourg,clkh=>d);
u4:madapt port map(en=>en,m1=>m1,clk=>clk,secin=>a,minset=>b);
u5:hadapt port map(en=>en,h1=>h1,clk=>clk,minin=>c,hourset=>d);
end;

3 电路图

4 实验心得

程序全部都给你写好了啊,只 要你自己仿真,再下载到实验箱就OK了啦
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-12-21
具体的先写HDL,写好了EDA工具给综合

可以参考百度文库资料http://wenku.baidu.com/view/b33f2fecdaef5ef7bb0d3c4e.html?from=search
数字电子时钟工作原理
(参考百度百科)
单片机通过了 3只 74HC164串行-并行转换芯片后,驱动时钟屏幕,因为时钟屏幕的极性是共阴极,

数字电路钟点
所以必须使用“74HC”电路而不能使用“74LS”电路,后者的高电平驱动能力很差!这里的 3 只 74HC164芯片,自身属于串行输入,而从单片机一则看过去,3 只芯片驱动方式则是并行驱动,这样可以避免每次传送新的显示数据时,都需要从头到尾传送 24 个笔段数据。目前的传送方式可以只是传送已经变化了的显示数据。晶体频率使用的是 32768HZ,这种低频率时基,对掉电保护的电池耗电关系极大,HT48R10A单片机具有的“RTC”实时时钟的功能,大大方便了电路设计。

按照常规,在如此低的频率下,对单片机的指令执行速度会有矛盾,但是,这种单片机却能够让程序运行时使用“内部 RC ”振荡频率而仅仅是时钟部分使用 32768HZ频率,这样,就可以选择“内部 RC”高达数 MHZ 的指令运行频率而不用理会时钟走时频率,两者依靠这种特有的“RTC”功能获得了很理想的配合。当进入电池掉电保护的时候,可以令电池耗电维持在仅仅数十 uA 的水平,一只 60mAh的掉电保护电池,就可以让掉电保护时间长达几个月之久!进入掉电保护后,屏幕不显示,所有按钮和控制功能暂时失效,仅仅实时时钟仍然继续走时。当外部主电源恢复供电后,所有功能自动恢复,实时时钟无需调整。单片机的 15P是复位引脚,当上电时或者程序运行发生异常时,可以通过此引脚让程序重新运行。
但是,一般地,单片机本身具有“看门狗”自动复位功能,可以快速地自动对程序运行异常进行复位,人们几乎觉察不到它的复位影响。单片机的 10P 引脚安排为专门检测外部供电是否正常,当外部 5V供电掉电后,单片机将立即进入掉电保护状态,而在电路中电源能量还没有完全消耗尽之前,程序也必须抢先对各个端口进行配置,以便进入低电源消耗状态。电路图中有两个输出端口,一个是“睡眠”控制输出端口,它只有在开始倒计时的时候才会输出高电平;另一个时“定时”输出端口,它只有在到达定时时间的时候才会输出高电平。
合理地利用这两个输出,就能够安排一些简单的自动控制,例如,可以利用“睡眠”的倒计时功能来给电孵化行业的“自动翻蛋”使用,利用“定时”功能来作为一只“电子闹钟”等等。电路中,屏幕的公共引脚接有一只 NPN小功率三极管,这主要是在单片机对 74HC164 传送数据时,临时关闭显示屏幕的供电以免产生“鬼影”,同时,在掉电保护时则可以完全关闭屏幕的供电。单片机预留了两个端口没有使用,这里可以在将来安排外接电存储器,以便派生例如电子打铃仪或者多次定时数据存储,成为功能更加丰富的时钟品种。各个按钮的使用说明:(请参考印刷板图)。各按键在印刷板上的编号与单片机芯片引脚和功能关系,请参考下面表格。其中,标注“G”的焊盘是电路供电的参考点,即 5V电源的负极,俗称“地线”。所有按键都是需要与这个“G”接通的时候(需要串入 1K 左右电阻),该按键才算是“被按下”。当这个“G”引出到按键板时,需要在它上面串接一只 1K左右的电阻,不要直接让其与各按键引脚直接“短接”,以防止芯片内部引脚损坏。
是以一种元器件做为振动源,而这种振动源在一定条件下,具有很高的恒定频率,把恒频率的振动转化为电脉冲,再按1秒多少次,用电子器件进行计数,达到次数为1秒,计数60秒为1分钟.....,并用相应的显示机构进行显示,这种机构可以是机械的、也可以是电子液晶、二极管等方式。
第2个回答  2009-03-25
到我的Q空间看看

相似回答