




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、多功能數(shù)字鐘課程設(shè)計(jì)報(bào)告班級(jí):計(jì)算機(jī)1002姓名:莊忠明學(xué)號(hào):3100602044指導(dǎo)老師:丁偉完成日期:2012年1月10日1、 設(shè)計(jì)任務(wù)及要求(1) 擁有正常的是、分、秒計(jì)時(shí)功能;(2) 能利用實(shí)驗(yàn)板上的案件實(shí)現(xiàn)校時(shí)、較分及秒清零功能;(3) 能利用實(shí)驗(yàn)板上的揚(yáng)聲器做整點(diǎn)報(bào)時(shí);(4) 鬧鐘功能;(5) 在maxplus 中采用層次化方法進(jìn)行設(shè)計(jì);(6) 完成全部電路設(shè)計(jì)后在實(shí)驗(yàn)板上下載,驗(yàn)證設(shè)計(jì)課題的正確性。2、 設(shè)計(jì)方案(1) 計(jì)時(shí)模塊該模塊的設(shè)計(jì)相對(duì)簡(jiǎn)單,使用一個(gè)二十四進(jìn)制和兩個(gè)六十進(jìn)制計(jì)數(shù)器級(jí)聯(lián),構(gòu)成數(shù)字鐘的基本框架。二十四進(jìn)制計(jì)數(shù)器用于計(jì)時(shí),六十進(jìn)制計(jì)數(shù)器用于計(jì)分和計(jì)秒。只要給秒計(jì)
2、數(shù)器一個(gè)1hz的時(shí)鐘脈沖,則可以進(jìn)行正常計(jì)時(shí)。分計(jì)數(shù)器以秒計(jì)數(shù)器的進(jìn)位作為計(jì)數(shù)脈沖,小時(shí)計(jì)數(shù)器以分計(jì)數(shù)器的進(jìn)位作為技術(shù)脈沖。(2) 校時(shí)模塊校時(shí)模塊設(shè)計(jì)要求實(shí)現(xiàn)校時(shí)、較分及秒清零的功能。1. 打開(kāi)校時(shí)鍵,小時(shí)計(jì)數(shù)器迅速遞增以調(diào)至所需要的小時(shí)位;2. 打開(kāi)較分鍵,分計(jì)數(shù)器迅速遞增至所需要的分位;3. 打開(kāi)清零鍵,將秒計(jì)數(shù)器清零。為此,可以用vhdl語(yǔ)言設(shè)計(jì)一個(gè)器件,該器件的功能是用3個(gè)波動(dòng)開(kāi)關(guān)控制校時(shí)功能:清零鍵打開(kāi)時(shí),秒計(jì)數(shù)器的清零端為0;較分鍵打開(kāi)時(shí)分計(jì)數(shù)器的使能端為1,進(jìn)位端輸出為零,同時(shí)給予它一個(gè)4hz的時(shí)鐘信號(hào);校時(shí)鍵打開(kāi)小時(shí)計(jì)數(shù)器使能端為1,時(shí)鐘信號(hào)為4hz。(3) 整點(diǎn)報(bào)時(shí)功能該模
3、塊的功能是:計(jì)時(shí)到59分50秒時(shí),每?jī)擅胍淮蔚鸵魣?bào)時(shí),整點(diǎn)時(shí)進(jìn)行高音報(bào)時(shí)。方法是用vhdl語(yǔ)言設(shè)計(jì)一個(gè)器件,其輸入端與計(jì)時(shí)器分、秒的輸出端相接。當(dāng)時(shí)間為59分50秒、52秒、54秒、56秒、58秒時(shí)編號(hào)為hz500的輸出端為1,否則為0。當(dāng)00分00秒時(shí)編號(hào)為hz1k的輸出端為1,否則為0。 hz500的輸出端與500hz的連線同接在與門(mén)上, hz1k的輸出端與1khz的連線同接在與門(mén)上,2個(gè)與門(mén)輸出端接在一個(gè)或門(mén)上,輸出端連在揚(yáng)聲器上。(4) 分頻模塊在本系統(tǒng)中需要用到多種不同頻率的脈沖信號(hào),所有這些脈沖信號(hào)均可以通過(guò)一個(gè)基準(zhǔn)頻率器生成?;鶞?zhǔn)頻率器就是一個(gè)進(jìn)制很大的計(jì)數(shù)器,利用計(jì)數(shù)器的分頻功
4、能,從不同的輸出位得到所需要的脈沖信號(hào)。(5) 動(dòng)態(tài)顯示用vhdl語(yǔ)言設(shè)計(jì)2個(gè)器件。第1個(gè)器件的功能是接入計(jì)數(shù)器的各個(gè)輸出端,再把所接入的各位數(shù)上的數(shù)據(jù)按所在位置分別輸出,同時(shí)控制相應(yīng)的數(shù)碼管亮起。而第2個(gè)器件接受第一個(gè)器件的數(shù)據(jù),將其編譯成七段led顯示器所需的7個(gè)信號(hào)。(6) 鬧鐘模塊鬧鐘模塊要求數(shù)字鐘計(jì)時(shí)到所設(shè)定的任意時(shí)間均能驅(qū)動(dòng)揚(yáng)聲報(bào)時(shí)。編寫(xiě)一個(gè)新器件,在調(diào)用一個(gè)二十四進(jìn)制計(jì)數(shù)器,一個(gè)六十進(jìn)制計(jì)數(shù)器和一個(gè)校時(shí)模塊。用校時(shí)模塊調(diào)整兩個(gè)計(jì)時(shí)器的時(shí)間至所需時(shí)間,將其接入到新器件中。該器件同時(shí)接入計(jì)時(shí)器信號(hào),當(dāng)兩個(gè)時(shí)間相同時(shí),控制揚(yáng)聲器響起。另再編寫(xiě)一個(gè)新器件,該器件可以控制鬧鐘的開(kāi)關(guān),同時(shí)可
5、以切換鬧鐘的設(shè)定時(shí)間與計(jì)時(shí)器的時(shí)間顯示。 3、 程序清單:頂層圖六十進(jìn)制計(jì)數(shù)器二十四進(jìn)制計(jì)數(shù)器校時(shí):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity jiaoshi_44 isport(clk,s,m,h:in std_logic;a,b,c,sclr,men,hen1,hen2:out std_logic);end jiaoshi_44 ;architecture hz of jiaoshi_44 issignal count:std_logic_vector(2 downto 0)
6、;signal hz4,hz1:std_logic;beginprocess(clk) beginif (clk'event and clk='1') then if (count="111") then count<="000" elsecount<= count+1;end if;end if;hz4<=count(0);hz1<=count(2);if(s='0') thena<=hz1;sclr<='1'elsesclr<='0'en
7、d if;if(m='0') thenb<=hz1;men<='0'hen1<='1'elseb<=hz4;men<='1'hen1<='0'end if;if(h='0') thenc<=hz1;hen2<='0'elsec<=hz4;hen2<='1'end if;end process; end hz;整點(diǎn)報(bào)時(shí):library ieee; use ieee.std_logic_1164.all;use
8、ieee.std_logic_unsigned.all;entity zheng_44 isport(min1,min0,sec1,sec0:in std_logic_vector(3 downto 0); hz500,hz1k:out std_logic);end zheng_44;architecture behave of zheng_44 isbeginprocess(min0) beginhz500<='0'hz1k<='0'if min1="0101" and min0="1001" then if
9、 sec1="0101"and (sec0="0000" or sec0="0010" or sec0="0100" or sec0="0110" or sec0="1000") then hz500<='1' else hz500<='0'end if;end if; if min1="0000" and min0="0000"and sec1="0000" and se
10、c0="0000" thenhz1k<='1'elsehz1k<='0'end if;end process;end behave;分頻功能:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity fenpin11_44 isport(clk:in std_logic;hz512,hz256,hz128,hz64,hz32,hz16,hz8,hz4,hz2,hz1,hz05:out std_logic);end fenpin11
11、_44 ;architecture hz of fenpin11_44 issignal count:std_logic_vector(10 downto 0);beginprocess(clk) beginif (clk'event and clk='1') then if (count="11111111111") then count<="00000000000" elsecount<= count+1;end if;end if;end process; hz512 <= count(0); hz256
12、<= count(1);hz128<=count(2);hz64 <= count(3);hz32<=count(4);hz16<=count(5);hz8<=count(6);hz4<=count(7);hz2<=count(8);hz1<=count(9);hz05<=count(10);end hz;動(dòng)態(tài)顯示模塊:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity
13、select61_44 is port( clk:in std_logic; sec1,sec0,min1,min0,h1,h0:in std_logic_vector(3 downto 0); selout:out std_logic_vector(3 downto 0); sel:out std_logic_vector(5 downto 0);end select61_44;architecture fun of select61_44 is signal count:std_logic_vector(2 downto 0);begin process(clk) begin if(clk
14、'event and clk='1') then if(count>="101") then count<="000" else count<=count+1; end if; end if; case count is when"000"=>selout<= sec0; when"001"=>selout<= sec1; when"010"=>selout<= min0; when"011"=&g
15、t;selout<= min1; when"100"=>selout<=h0; when others =>selout<=h1; end case; case count is when"000"=>sel<="000001" when"001"=>sel<="000010" when"010"=>sel<="000100" when"011"=>sel<=
16、"001000" when"100"=>sel<="010000" when others =>sel<="100000" end case; end process;end fun;library ieee;use ieee.std_logic_1164.all;entity decoder47_44 isport(a:in std_logic_vector(3 downto 0); b:out std_logic_vector(6 downto 0);end decoder47_44;a
17、rchitecture behavior of decoder47_44 isbegin with a select b<="1111110"when"0000", "0110000"when"0001", "1101101"when"0010", "1111001"when"0011", "0110011"when"0100", "1011011"when"0
18、101", "1011111"when"0110", "1110000"when"0111", "1111111"when"1000", "1111011"when"1001", "xxxxxxx"when others;end behavior;鬧鐘:library ieee; use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;enti
19、ty naozhong_44 isport(min1,min0,h1,h0,fen1,fen0,shi1,shi0:in std_logic_vector(3 downto 0); hz1k:out std_logic);end naozhong_44;architecture behave of naozhong_44 isbegin process(min0) begin hz1k<='0'if min1<=fen1 and min0<=fen0 and h1<=shi1 and h0<=shi0 then hz1k<='1
20、9; else hz1k<='0'end if; end process;end behave;library ieee; use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity nao_switch_44 isport(key,show:in std_logic; sec1,sec0,min1,min0,h1,h0,fen1,fen0,shi1,shi0:in std_logic_vector(3 downto 0); secout1,secout0,minout1,minout0,hout1,hout0:out std_logic_vector(3 downto 0); hz1k:out std_logic)
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年山東職業(yè)學(xué)院輔導(dǎo)員考試真題
- 2024年山東交通學(xué)院輔導(dǎo)員考試真題
- 年度團(tuán)隊(duì)激勵(lì)計(jì)劃的實(shí)施
- 2024年陜西實(shí)驗(yàn)高級(jí)中學(xué)招聘筆試真題
- 多樣化學(xué)習(xí)資源的開(kāi)發(fā)與利用計(jì)劃
- 2024年甘肅省鄉(xiāng)村振興局下屬事業(yè)單位真題
- 建材市場(chǎng)安全保障總結(jié)與規(guī)劃計(jì)劃
- 2024年瀘州市納溪區(qū)事業(yè)單位引進(jìn)筆試真題
- 2025屆浙江省金華市婺城區(qū)第四中學(xué)八下數(shù)學(xué)期末聯(lián)考試題含解析
- 應(yīng)對(duì)壓力的心理調(diào)適計(jì)劃
- 廣東旅游車(chē)隊(duì)公司一覽
- ESD標(biāo)準(zhǔn)培訓(xùn)資料ppt課件
- 河南省確山縣三里河治理工程
- 水利工程合同工程完工驗(yàn)收工程建設(shè)管理工作報(bào)告
- photoshop實(shí)訓(xùn)指導(dǎo)書(shū)
- 多級(jí)泵檢修及維護(hù)(1)
- 涵洞孔徑計(jì)算
- 測(cè)量未知電阻的方法
- 中國(guó)民主同盟入盟申請(qǐng)表
- 觀感質(zhì)量檢查表
- 企業(yè)信息登記表
評(píng)論
0/150
提交評(píng)論