數(shù)字電子鐘設(shè)計(jì)報(bào)告_第1頁(yè)
數(shù)字電子鐘設(shè)計(jì)報(bào)告_第2頁(yè)
數(shù)字電子鐘設(shè)計(jì)報(bào)告_第3頁(yè)
數(shù)字電子鐘設(shè)計(jì)報(bào)告_第4頁(yè)
數(shù)字電子鐘設(shè)計(jì)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩9頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、數(shù)字電子鐘設(shè)計(jì)及報(bào)告一 明確電子系統(tǒng)的設(shè)計(jì)任務(wù)要求任務(wù):用文本法或圖形法設(shè)計(jì)一個(gè)能顯示時(shí),分,秒的數(shù)字電子鐘要求:1.設(shè)計(jì)由晶振電路產(chǎn)生標(biāo)準(zhǔn)信號(hào)的單元電路 2.時(shí)為0023二十四進(jìn)制計(jì)數(shù)器,分,秒為0059六十進(jìn)制計(jì)數(shù)器; 3.能夠顯示出時(shí)分秒; 4.具有清零,調(diào)節(jié)分鐘的功能; 5.具有整點(diǎn)報(bào)時(shí)功能,整點(diǎn)報(bào)時(shí)的同時(shí)燈花樣顯示,聲響電路發(fā)出叫聲;.對(duì)時(shí),分,秒單元電路進(jìn)行仿真并記錄;.選作部分:具有定時(shí)鬧鐘功能,可在任意設(shè)定一時(shí)間,到時(shí)自動(dòng)提醒,通過聲響電路發(fā)出叫聲。二方案選擇.總體方案設(shè)計(jì)輸入信號(hào)分頻器六十進(jìn)制計(jì)數(shù)器譯碼器數(shù)碼管二選一選擇器六十進(jìn)制計(jì)數(shù)器譯碼器數(shù)碼管二十四進(jìn)制計(jì)數(shù)器譯碼器數(shù)碼管

2、七進(jìn)制計(jì)數(shù)器譯碼器數(shù)碼管鐘擺電路分頻器整點(diǎn)報(bào)時(shí)電路分頻器六十進(jìn)制計(jì)數(shù)器秒計(jì)數(shù)六十進(jìn)制計(jì)數(shù)器分計(jì)數(shù).電路圖法.法.方案論證()電路圖法一目了然,但是耗費(fèi)太多原材料()是用語(yǔ)言來編寫的,雖然沒有電路圖法一目了然,但是他的每個(gè)單元電路都清晰明了,在確保每個(gè)單元都正確的情況下進(jìn)行總的編成,其精確性比較高,而且只要下載到片子上就可以使用了()最終選擇法來完成設(shè)計(jì)三單元電路的設(shè)計(jì)、參數(shù)計(jì)算和器件選擇1.分頻器(1)程序module fenpin(clk,fout,fout2,fout3);input clk;output fout,fout2,fout3;reg 23:0 cnt,cnt1,cnt2;re

3、g fout,fout2,fout3;always(posedge clk)begin if(cnt=20000) begin cnt<=1; fout3<=1; end else begin cnt<=cnt+1; fout3<=0; end end /1000hz, always(posedge fout3)begin if(cnt=100) begin cnt2<=1; fout2<=1; end else begin cnt2<=cnt2+1; fout2<=0; endend /10hz always(posedge fout2)beg

4、in if(cnt1=10) begin cnt1<=1; fout<=1; end else begin cnt1<=cnt1+1; fout<=0; end end /1hzendmodule(2)原理圖(3)仿真波形2.六十進(jìn)制計(jì)數(shù)器(1)程序module cnt60(clk,full,reset,q);input clk,reset;output full;output 5:0q;reg 5:0q;reg full;always(posedge reset or posedge clk) begin if(reset) q=6'b000000; else

5、 if(q=59) begin q<=6'b000000; full<=1; end else begin q<=q+1; full<=0; end endendmodule(2)原理圖(3)仿真波形3.校驗(yàn)電路(二選一選擇器)(1)程序module jiaoyan(f0,cp0,enable,cp1); input f0,cp0,enable; output cp1; reg cp1; always (enable) begin case(enable) 0:cp1=f0; 1:cp1=cp0; endcase endendmodule(2)原理圖(3)仿真波

6、形4.二十四進(jìn)制計(jì)數(shù)器(1)程序module cnt24(clk,full,reset,q);input clk,reset;output full;output 5:0q;reg 5:0q;reg full;always(posedge reset or posedge clk) begin if(reset) q=6'b000000; else if(q=23) begin q<=6'b000000; full<=1; end else begin q<=q+1; full<=0; end endendmodule (2)原理圖(3)仿真波形5.七進(jìn)

7、制計(jì)數(shù)器(1)程序module cnt7(clk,full,reset,q);input clk,reset;output full;output 2:0q;reg 2:0q;reg full;always(posedge reset or posedge clk) begin if(reset) q=3'b000; else if(q=6) begin q<=3'b000; full<=1; end else begin q<=q+1; full<=0; end endendmodule(2)原理圖(3)仿真波形6.七段顯示譯碼器(1)程序module

8、 decode4_7(indec,decodeout); output6:0decodeout; input3:0indec; reg6:0decodeout; always (indec) begin case(indec) 4'd1:decodeout=7'b0110000; 4'd2:decodeout=7'b1101101; 4'd3:decodeout=7'b1111001; 4'd4:decodeout=7'b0110011; 4'd5:decodeout=7'b1011011; 4'd6:de

9、codeout=7'b1011111; 4'd7:decodeout=7'b1110000; endcase endendmodule(2)原理圖(3)仿真波形7.譯碼器(1)程序module yimaqi(a,b,c); input 5:0a; output 3:0b,c; reg 3:0b,c; always (a) begin case(a) 0:begin b=4'b0000;c=4'b0000; end 1:begin b=4'b0000;c=4'b0001; end 2:begin b=4'b0000;c=4'

10、b0010; end 3:begin b=4'b0000;c=4'b0011; end 4:begin b=4'b0000;c=4'b0100; end 5:begin b=4'b0000;c=4'b0101; end 6:begin b=4'b0000;c=4'b0110; end 7:begin b=4'b0000;c=4'b0111; end 8:begin b=4'b0000;c=4'b1000; end 9:begin b=4'b0000;c=4'b1001; end 10

11、:begin b=4'b0001;c=4'b0000; end 11:begin b=4'b0001;c=4'b0001; end 12:begin b=4'b0001;c=4'b0010; end 13:begin b=4'b0001;c=4'b0011; end 14:begin b=4'b0001;c=4'b0100; end 15:begin b=4'b0001;c=4'b0101; end 16:begin b=4'b0001;c=4'b0110; end 17:begin

12、 b=4'b0001;c=4'b0111; end 18:begin b=4'b0001;c=4'b1000; end 19:begin b=4'b0001;c=4'b1001; end 20:begin b=4'b0010;c=4'b0000; end 21:begin b=4'b0010;c=4'b0001; end 22:begin b=4'b0010;c=4'b0010; end 23:begin b=4'b0010;c=4'b0011; end 24:begin b=4&#

13、39;b0010;c=4'b0100; end 25:begin b=4'b0010;c=4'b0101; end 26:begin b=4'b0010;c=4'b0110; end 27:begin b=4'b0010;c=4'b0111; end 28:begin b=4'b0010;c=4'b1000; end 29:begin b=4'b0010;c=4'b1001; end 30:begin b=4'b0011;c=4'b0000; end 31:begin b=4'b00

14、11;c=4'b0001; end 32:begin b=4'b0011;c=4'b0010; end 33:begin b=4'b0011;c=4'b0011; end 34:begin b=4'b0011;c=4'b0100; end 35:begin b=4'b0011;c=4'b0101; end 36:begin b=4'b0011;c=4'b0110; end 37:begin b=4'b0011;c=4'b0111; end 38:begin b=4'b0011;c=4

15、'b1000; end 39:begin b=4'b0011;c=4'b1001; end 40:begin b=4'b0100;c=4'b0000; end 41:begin b=4'b0100;c=4'b0001; end 42:begin b=4'b0100;c=4'b0010; end 43:begin b=4'b0100;c=4'b0011; end 44:begin b=4'b0100;c=4'b0100; end 45:begin b=4'b0100;c=4'b

16、0101; end 46:begin b=4'b0100;c=4'b0110; end 47:begin b=4'b0100;c=4'b0111; end 48:begin b=4'b0100;c=4'b1000; end 49:begin b=4'b0100;c=4'b1001; end 50:begin b=4'b0101;c=4'b0000; end 51:begin b=4'b0101;c=4'b0001; end 52:begin b=4'b0101;c=4'b0010;

17、end 53:begin b=4'b0101;c=4'b0011; end 54:begin b=4'b0101;c=4'b0100; end 55:begin b=4'b0101;c=4'b0101; end 56:begin b=4'b0101;c=4'b0110; end 57:begin b=4'b0101;c=4'b0111; end 58:begin b=4'b0101;c=4'b1000; end 59:begin b=4'b0101;c=4'b1001; end de

18、fault: begin b=00000;c=00000; end endcase endendmodule(2)原理圖(3)仿真波形8.鐘擺電路(1)程序module zhongbai(clk,out); input clk; output 7:0out; reg 5:0out; reg3:0q; always (posedge clk) begin if(q=9) q<=4'b0000; else q<=q+1'b1; end always (q) begin case(q) 0:out=6'b000001; 1:out=6'b000010; 2:out=6'b000100; 3:out=6'b001000; 4:out=6'b010000; 5:out=6

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論