數(shù)字時鐘 數(shù)電設(shè)計.doc

數(shù)字時鐘 數(shù)電設(shè)計.doc

ID:61499633

大?。?74.50 KB

頁數(shù):9頁

時間:2021-02-07

數(shù)字時鐘   數(shù)電設(shè)計.doc_第1頁
數(shù)字時鐘   數(shù)電設(shè)計.doc_第2頁
數(shù)字時鐘   數(shù)電設(shè)計.doc_第3頁
數(shù)字時鐘   數(shù)電設(shè)計.doc_第4頁
數(shù)字時鐘   數(shù)電設(shè)計.doc_第5頁
資源描述:

《數(shù)字時鐘 數(shù)電設(shè)計.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在應用文檔-天天文庫。

1、數(shù)字電路課程設(shè)計VHDL語言數(shù)字鐘一、系統(tǒng)功能概述1.完成秒/分/時的依次顯示并正確計數(shù);2.秒/分/時各段個位滿10正確進位,秒/分能做到滿60向前進位;3.定時鬧鐘:實現(xiàn)整點報時,又揚聲器發(fā)出報時聲音;4.時間設(shè)置即手動調(diào)時功能,能對不精確的時間進行分/時的調(diào)整。二、系統(tǒng)組成以及系統(tǒng)各部分的設(shè)計1、頂層文件2、系統(tǒng)以及各個模塊的仿真波形1)分頻模塊(原理圖輸入)2)秒模塊程序libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitySECONDisport(clk,clr:

2、instd_logic;----時鐘/清零信號sec1,sec0:outstd_logic_vector(3downto0);----秒高位/低位co:outstd_logic);-------輸出/進位信號endSECOND;architectureSECofSECONDisbeginprocess(clk,clr)variablecnt1,cnt0:std_logic_vector(3downto0);---計數(shù)beginifclr='1'then----當ckr為1時,高低位均為0cnt1:="0000";cnt0:="0000";elsifclk'eventan

3、dclk='1'thenifcnt1="0101"andcnt0="1000"then----當記數(shù)為58(實際是經(jīng)過59個記時脈沖)co<='1';----進位cnt0:="1001";----低位為9elsifcnt0<"1001"then----小于9時cnt0:=cnt0+1;----計數(shù)elsecnt0:="0000";ifcnt1<"0101"then----高位小于5時cnt1:=cnt1+1;elsecnt1:="0000";co<='0';endif;endif;endif;sec1<=cnt1;sec0<=cnt0;endprocess;endSEC

4、;3)分模塊程序libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entityMINUTEisport(clk,en:instd_logic;min1,min0:outstd_logic_vector(3downto0);co:outstd_logic);endMINUTE;architectureMINofMINUTEisbeginifclk'eventandclk='1'thenifen='1'thenifcnt1="0101"andcnt0="1000"thenco<='1'

5、;cnt0:="1001";elsifcnt0<"1001"thencnt0:=cnt0+1;elsecnt0:="0000";ndMINUTE;architectureMINofMINUTEisbeginifcnt1<"0101"thencnt1:=cnt1+1;elsecnt1:="0000";co<='0';endif;endif;endif;endif;min1<=cnt1;min0<=cnt0;endprocess;endMIN;4)時模塊程序libraryieee;useieee.std_logic_1164.all;useieee.std_logic_un

6、signed.all;entityHOURisport(clk,en:instd_logic;----輸入時鐘/高電平有效的使能信號h1,h0:outstd_logic_vector(3downto0));----時高位/低位endHOUR;architecturehour_arcofHOURisbeginprocess(clk)variablecnt1,cnt0:std_logic_vector(3downto0);----記數(shù)beginifclk'eventandclk='1'then---上升沿觸發(fā)ifen='1'then---同時“使能”為1ifcnt1="00

7、10"andcnt0="0011"thencnt1:="0000";----高位/低位同時為0時cnt0:="0000";elsifcnt0<"1001"then----低位小于9時,低位記數(shù)累加cnt0:=cnt0+1;elsecnt0:="0000";cnt1:=cnt1+1;-----高位記數(shù)累加endif;endif;endif;h1<=cnt1;h0<=cnt0;endprocess;endhour_arc;5)動態(tài)掃描模塊libraryieee;useieee.std_logic_1164.all;useieee.std_lo

當前文檔最多預覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內(nèi)容,確認文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。