大連理工大學(xué)數(shù)電實(shí)驗(yàn)報(bào)告_第1頁(yè)
大連理工大學(xué)數(shù)電實(shí)驗(yàn)報(bào)告_第2頁(yè)
大連理工大學(xué)數(shù)電實(shí)驗(yàn)報(bào)告_第3頁(yè)
大連理工大學(xué)數(shù)電實(shí)驗(yàn)報(bào)告_第4頁(yè)
大連理工大學(xué)數(shù)電實(shí)驗(yàn)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩10頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、大連理工大學(xué)本科實(shí)驗(yàn)報(bào)告題目:數(shù)字鐘課程名稱:數(shù)字電路課程設(shè)計(jì)學(xué)院(系): 電子信息工程 專 業(yè): 電子 班 級(jí): 電子1301班 學(xué)生姓名: 陳冠謀 學(xué) 號(hào): 201383022 完成日期:2015年7月18日 成 績(jī): 2014 年 7 月 18 日注意:本頁(yè)要求放在實(shí)驗(yàn)報(bào)告第一頁(yè)課程設(shè)計(jì)得分表考 勤課程設(shè)計(jì)50分考試40分作業(yè)合計(jì)最后得分 一、數(shù)字鐘課程設(shè)計(jì)要求:1、設(shè)計(jì)一個(gè)具有時(shí)、分、秒的十進(jìn)制數(shù)字顯示(小時(shí)從0023)計(jì)時(shí)器。 2、整點(diǎn)報(bào)時(shí)。兩種方法任選其一:發(fā)出仿中央人民廣播電臺(tái)的整點(diǎn)報(bào)時(shí)信號(hào),即從59分50秒起,每隔2秒鐘發(fā)出一次低音“嘟”的信號(hào),連續(xù)5次,最后一次要求高音“嘀”

2、的信號(hào),此信號(hào)結(jié)束即達(dá)到整點(diǎn)?!班健笔?00hz左右的頻率輸出,“嘀”是1000hz左右的頻率輸出通過(guò)led閃爍實(shí)現(xiàn),閃爍頻率及花型可自己設(shè)計(jì)并在這里說(shuō)明。3、手動(dòng)校時(shí)、校分、校秒。4、定時(shí)與鬧鐘功能,能在設(shè)定的時(shí)間發(fā)出鬧鈴聲。 5、設(shè)計(jì)一個(gè)秒表,顯示1%秒到60秒、手動(dòng)停止。6、設(shè)計(jì)一個(gè)倒計(jì)時(shí),顯示小時(shí)、分鐘、秒。7、其他創(chuàng)新。第1題25分,其他每題5分二、課程設(shè)計(jì)考試(40分,每題分):考試題目: 1、 實(shí)體名2、 計(jì)數(shù)器3、 異步清零4、 進(jìn)位輸出5、 仿真圖6、 數(shù)碼管輸出7、 分頻8、 元件例化9、 引腳分配10、下載一、設(shè)計(jì)要求1、設(shè)計(jì)一個(gè)數(shù)字鐘,能夠顯示當(dāng)前時(shí)間,分別用6個(gè)數(shù)碼管

3、顯示小時(shí)、分鐘、秒鐘的時(shí)間,秒針的計(jì)數(shù)頻率為1hz,可由系統(tǒng)脈沖分頻得到。2、整點(diǎn)報(bào)時(shí),可通過(guò)led閃爍實(shí)現(xiàn),閃爍頻率及花型可自己設(shè)計(jì)。3、能夠調(diào)整小時(shí)和分鐘的時(shí)間,調(diào)整的形式為通過(guò)按鍵進(jìn)行累加。4、具有鬧鐘功能,鬧鐘時(shí)間可以任意設(shè)定(設(shè)定的形式同樣為通過(guò)按鍵累加),并且在設(shè)定的時(shí)間能夠進(jìn)行提示,提示同樣可以由led閃爍實(shí)現(xiàn)。二、設(shè)計(jì)分析及系統(tǒng)方案設(shè)計(jì)數(shù)字計(jì)時(shí)器一般都由振蕩器、分頻器、計(jì)數(shù)器、譯碼器、顯示器等幾部分組成。其中振蕩器和分頻器組成標(biāo)準(zhǔn)秒信號(hào)發(fā)生器,由不同進(jìn)制的計(jì)數(shù)器、譯碼器和顯示器組成計(jì)時(shí)系統(tǒng)。秒信號(hào)送入計(jì)時(shí)器進(jìn)行計(jì)數(shù),把累積的結(jié)果以時(shí)、分、秒、的數(shù)字顯示出來(lái)。時(shí)顯示由二十四進(jìn)制計(jì)

4、數(shù)器、譯碼器、顯示器構(gòu)成,分、秒 顯示由六十進(jìn)制計(jì)數(shù)器、譯碼器、顯示器構(gòu)成。原理框圖如下:顯示器 顯示器 顯示器 顯示器 顯示器 顯示器譯碼器譯碼器譯碼器譯碼器譯碼器譯碼器 十進(jìn)制 計(jì)數(shù)器 六進(jìn)制 計(jì)數(shù)器 十進(jìn)制 計(jì)數(shù)器 六進(jìn)制 計(jì)數(shù)器 十進(jìn)制 計(jì)數(shù)器 三進(jìn)制 計(jì)數(shù)器時(shí)十位 時(shí)個(gè)位 分十位 分個(gè)位 秒十位 秒個(gè)位 分頻器 晶振三、系統(tǒng)以及模塊硬件電路設(shè)計(jì)系統(tǒng)的管腳配置如下表所示:四、系統(tǒng)的vhdl設(shè)計(jì)1.系統(tǒng)所用的庫(kù):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_log

5、ic_arith.all;2.系統(tǒng)頂層實(shí)體名及內(nèi)容entity time isport(clk,rst,stop,pls,plm,plh:in std_logic; alarmstart:in std_logic; p,q,r,t,u,v:out std_logic_vector(6 downto 0);-時(shí)鐘數(shù)碼管輸出 w,x:out std_logic_vector(6 downto 0);-鬧鐘小時(shí)數(shù)碼管輸出 y,z:out std_logic_vector(3 downto 0);-鬧鐘分鐘輸出 alarm:out std_logic;-鬧鐘開(kāi)關(guān) reptime:out std_log

6、ic);-清零end;architecture data of time is signal clk1s,clk1sp,clk10s,clk1m,clk1mp,clk10m,clk1h,clk1hp,rep:std_logic; signal a,b,c,d,e,f:std_logic_vector(3 downto 0); signal alarmstart1:std_logic; signal alarm1m,alarm10m,alarm1h,alarm10h:std_logic_vector(3 downto 0);begin3.時(shí)鐘部分process(stop) begin case

7、stop is when '0'=>clk1sp<=clk1s; when others =>clk1sp<=pls; end case;end process;process(stop) begin case stop is when '0'=>clk1mp<=clk1m; when others =>clk1mp<=plm; end case;end process;process(stop) begin case stop is when '0'=>clk1hp<=clk1h; w

8、hen others =>clk1hp<=plh; end case;end process;process(clk,rst) variable num:integer range 0 to 49999999; begin if rst='0' then num:=0; elsif rising_edge(clk) then if num=49999999 then num:=0; else num:=num+1; end if; if num<25000000 then clk1s<='0' else clk1s<='1&

9、#39; end if; end if;end process;4.時(shí)鐘校時(shí)部分 process(clk1sp,rst) begin if rst='0' then a<="0000" elsif clk1sp'event and clk1sp='1' then if a="1001" then a<="0000" else a<=a+1; end if;end if; if a="0000" then clk10s<='1' else

10、 clk10s<='0' end if; end process;process(clk10s,rst) begin if rst='0' then b<="0000" elsif clk10s'event and clk10s='1' then if b="0101" then b<="0000" else b<=b+1; end if; end if; if b="0000" then clk1m<='1' e

11、lse clk1m<='0' end if;end process;process(clk1mp,rst) begin if rst='0' then c<="0000" elsif clk1mp'event and clk1mp='1' then if c="1001" then c<="0000" else c<=c+1; end if; end if; if c="0000" then clk10m<='1'

12、 else clk10m<='0' end if; end process; process(clk10m,rst) begin if rst='0' then d<="0000" elsif clk10m'event and clk10m='1' then if d="0101" then d<="0000" else d<=d+1; end if; end if; if d="0000" then clk1h<='1&

13、#39; else clk1h<='0' end if;end process;process(clk1hp,rst) begin if rst='0' then e<="0000"f<="0000" elsif clk1hp'event and clk1hp='1' then if e="1001" then e<="0000"f<=f+1; elsif e="0011" and f="0010&q

14、uot; then e<="0000"f<="0000" else e<=e+1; end if; end if;end process;5.整點(diǎn)報(bào)時(shí)部分process(clk1s)beginif clk1s'event and clk1s='1' then if c="0000" and d="0000" then if (b="0000" and a="0000") or (b="0000" and a=&qu

15、ot;0100") or (b="0000" and a="0010") then rep<='1' else rep<='0' end if; else rep<='0' end if;end if;reptime<=rep;end process;6.設(shè)置鬧鐘部分process(plm,alarmstart)begin if alarmstart='1' then if plm'event and plm='1' then if

16、alarm1m="1001" then alarm1m<="0000" if alarm10m="0101" then alarm10m<="0000" else alarm10m<=alarm10m+1; end if; else alarm1m<=alarm1m+1; end if; end if; else alarm1m<=alarm1m;alarm10m<=alarm10m; end if;y<=alarm1m;z<=alarm10m;end process

17、;process(plh,alarmstart)begin if alarmstart='1' then if plh'event and plh='1' then if alarm1h="1001" then alarm1h<="0000"alarm10h<=alarm10h+1; elsif alarm1h="0011" and alarm10h="0010" then alarm1h<="0000"alarm10h<=&quo

18、t;0000" else alarm1h<=alarm1h+1; end if; end if; else alarm1h<=alarm1h;alarm10h<=alarm10h; end if;end process;7.時(shí)鐘與鬧鐘時(shí)間對(duì)比產(chǎn)生鬧鐘信號(hào)process(clk1s)begin if alarmstart='1' then if clk1s'event and clk1s='1' then if (c=alarm1m and d=alarm10m and e=alarm1h and f=alarm10h) the

19、n alarmstart1<='1' else alarmstart1<='0' end if; alarm<=alarmstart1; end if; else alarm<='0' end if; end process;8.數(shù)碼管顯示部分process(a)begin case a is when "0000"=>p<="1000000" when "0001"=>p<="1111001" when "0

20、010"=>p<="0100100" when "0011"=>p<="0110000" when "0100"=>p<="0011001" when "0101"=>p<="0010010" when "0110"=>p<="0000010" when "0111"=>p<="1111000"

21、when "1000"=>p<="0000000" when others=>p<="0010000"end case;end process;process(b)begin case b is when "0000"=>q<="1000000" when "0001"=>q<="1111001" when "0010"=>q<="0100100" when

22、 "0011"=>q<="0110000" when "0100"=>q<="0011001" when "0101"=>q<="0010010" when "0110"=>q<="0000010" when "0111"=>q<="1111000" when "1000"=>q<="000000

23、0" when others=>q<="0010000"end case;end process;process(c)begin case c is when "0000"=>r<="1000000" when "0001"=>r<="1111001" when "0010"=>r<="0100100" when "0011"=>r<="0110000&qu

24、ot; when "0100"=>r<="0011001" when "0101"=>r<="0010010" when "0110"=>r<="0000010" when "0111"=>r<="1111000" when "1000"=>r<="0000000" when others=>r<="0010000&

25、quot;end case;end process;process(d)begin case d is when "0000"=>t<="1000000" when "0001"=>t<="1111001" when "0010"=>t<="0100100" when "0011"=>t<="0110000" when "0100"=>t<="00

26、11001" when "0101"=>t<="0010010" when "0110"=>t<="0000010" when "0111"=>t<="1111000" when "1000"=>t<="0000000" when others=>t<="0010000"end case;end process;process(e)begin ca

27、se e is when "0000"=>u<="1000000" when "0001"=>u<="1111001" when "0010"=>u<="0100100" when "0011"=>u<="0110000" when "0100"=>u<="0011001" when "0101"=>u<=

28、"0010010" when "0110"=>u<="0000010" when "0111"=>u<="1111000" when "1000"=>u<="0000000" when others=>u<="0010000"end case;end process;process(f)begin case f is when "0000"=>v<=&quo

29、t;1000000" when "0001"=>v<="1111001" when "0010"=>v<="0100100" when "0011"=>v<="0110000" when "0100"=>v<="0011001" when "0101"=>v<="0010010" when "0110"=&g

30、t;v<="0000010" when "0111"=>v<="1111000" when "1000"=>v<="0000000" when others=>v<="0010000"end case;end process; process(alarm1h)begin case alarm1h is when "0000"=>w<="1000000" when "0001"=>w<="1111001" when "0010"=>w<="0100100" when "0011"=>w<="0110000" when "0100"=>w<="0011001" when "0101"=>w<="0010010&quo

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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)論