




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、東北石油大學(xué)課程設(shè)計(jì)課 程 eda技術(shù)課程設(shè)計(jì)題 目 脈沖按鍵電話顯示器院 系電子科學(xué)學(xué)院專業(yè)班級電子信息工程學(xué)生姓名學(xué)生學(xué)號指導(dǎo)教師2012年3月2日東北石油大學(xué)課程設(shè)計(jì)任務(wù)書課程 eda技術(shù)課程設(shè)計(jì)題目脈沖按鍵電話顯示器專業(yè) 電子信息工程 姓名 學(xué)號主要內(nèi)容、基本要求、主要參考資料等主要內(nèi)容:設(shè)計(jì)一個(gè)準(zhǔn)確地反映按鍵數(shù)字具有 8位顯示的電話按鍵顯示器,該電話顯示器要求具有重?fù)艿墓δ? 當(dāng)按下重?fù)苕I時(shí),能夠顯示最后一次輸入的電話號碼?;疽螅?、設(shè)計(jì)一個(gè)具有8位顯示的電話按鍵顯示器;2、能準(zhǔn)確地反映按鍵數(shù)字;3、顯示器顯示從低位向高位前移,逐位顯示按鍵數(shù)字,最低位為當(dāng)前輸入位;4、設(shè)置一個(gè)
2、重?fù)堋辨I,按下此鍵,能顯示最后一次輸入的電話號碼;5、掛機(jī)2秒后或按熄滅按鍵,熄滅顯示器顯示。主要參考資料:1潘松著.eda技術(shù)實(shí)用教程(第二版).北京:科學(xué)出版社,2005.2康華光主編.電子技術(shù)基礎(chǔ) 模擬部分.北京:高教出版社,2006.3閻石主編.數(shù)字電子技術(shù)基礎(chǔ).北京:高教出版社,2003.完成期限2012.3.5指導(dǎo)教師專業(yè)負(fù)責(zé)人2012年3月2日一、總體設(shè)計(jì)思想1 .基本原理ed微術(shù)就是依賴功能弓5大的計(jì)算機(jī),在 eda:具軟件平臺上,對以硬件描 述語言hd為系統(tǒng)邏輯描述手段完成的設(shè)計(jì)文件,自動的完成邏輯編譯、化簡、 分割、綜合、布局布線以及邏輯優(yōu)化和仿真測試,直至實(shí)現(xiàn)既定的電子線
3、路系 統(tǒng)功能。在本次課程設(shè)計(jì)中是用vhd語言實(shí)現(xiàn)一個(gè)能準(zhǔn)確地反映按鍵數(shù)字、具有 8位 顯示的電話按鍵顯示器。摘機(jī)時(shí)開始工作,顯示器顯示從低位向高位前移,逐 位顯示按鍵數(shù)字,最低位為當(dāng)前輸入位;設(shè)置一個(gè)“重?fù)堋辨I,按下此鍵能顯 示最后一次輸入的電話號碼;掛機(jī)2秒后或按熄滅鍵,熄滅顯示器顯示。2 .設(shè)計(jì)框圖圖1脈沖按鍵電話顯示器總體設(shè)計(jì)方案二、設(shè)計(jì)步驟和調(diào)試過程1、總體設(shè)計(jì)電路本文設(shè)計(jì)的脈沖按鍵電話顯示器由五個(gè)模塊組成:按鍵電路、譯碼器、移 位寄存、鎖存器和數(shù)碼管顯示電路,其中移位寄存、鎖存器和數(shù)碼管譯碼顯示 電路為系統(tǒng)的主要組成部分。做u2sh0w:u1cleari clk1i diali re
4、.dialf din1i9.01isme - 6eg716.0fc-l-=ga7.ol keyout圖2總體設(shè)計(jì)電路模塊2、模塊設(shè)計(jì)和相應(yīng)模塊程序2.1 頂層文件按鍵電路模塊。提供“ 0”到“9”數(shù)字按鍵的輸入,同時(shí)設(shè)置有撥號鍵, 清除鍵,掛機(jī)鍵和重?fù)苕I。(1)頂層文件程序模塊程序:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity up_key isport(din1:in std_logic_vector(9 downto 0);clk1,clear,dial,re_dial:in
5、std_logic;keyout:out std_logic;seg71:out std_logic_vector(6 downto 0);seg8:out std_logic_vector(7 downto 0);end entity;architecture one of up_key iscomponent show isport(din:in std_logic_vector(9 downto 0);clk,clear,dial,re_dial:in std_logic;keyout:out std_logic;set:out std_logic_vector(3 downto 0);
6、seg8:out std_logic_vector(7 downto 0);end component;component tra isport(bcd1:in std_logic_vector(3 downto 0);seg7:out std_logic_vector(6 downto 0);end component;signal set_1:std_logic_vector(3 downto 0); beginu1:showportmap(din1,clk1,clear,dial,re_dial,keyout,set_1,seg8);u2:tra port map(set_1,seg71
7、);end architecture one;(2) 各端口說明分別為:輸入:din19, 0 : 09十個(gè)數(shù)字鍵;clk1:時(shí)鐘脈沖;clear刪除鍵;dial:撥號鍵;re dail重?fù)苕I輸出:keyoutseg716seg32:可輸入數(shù)字指示燈;, 0 : 8 位數(shù)碼管;, 0 :數(shù)碼管的七段;2.2 bcd譯碼模塊譯碼器有兩個(gè)功能。第一,把輸入的一位鍵值轉(zhuǎn)換成四位bcd碼;第二,把 4 位二進(jìn)制碼譯成相應(yīng)的數(shù)碼管輸出顯示碼。(1)bcd譯碼子程序模塊程序:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsign
8、ed.all;entity tra isport(bcd1:in std_logic_vector(3 downto 0);seg7:out std_logic_vector(6 downto 0);end entity;architecture one of tra isbeginprocess(bcd1)isbegincase bcd1 iswhen 0000=seg7seg7seg7seg7seg7seg7seg7seg7seg7seg7seg7=0000000;end case;end process;end architecture;(2)bcd譯碼模塊電路tra:u2圖3 bcd譯
9、碼程序模塊電路各端口說明分別為:輸入:輸出:bcd13 0: 4位bc照;數(shù)碼管的七段顯示2.3 鍵值顯示模塊數(shù)碼管顯示用于將設(shè)置好的每個(gè)按鍵的鍵值在數(shù)碼管上顯示出來。由于實(shí) 驗(yàn)過程中需要使用8個(gè)數(shù)碼管,因此數(shù)碼管顯示模塊必須加上數(shù)碼管片選及移 位得程序,從而實(shí)現(xiàn)數(shù)據(jù)輸入以后從低位向高位移動、顯示。(1)鍵值顯示子程序 模塊程序:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity show isport(din:in std_logic_vector(9 downto 0);clk,cl
10、ear,dial,re_dial:in std_logic;keyout:out std_logic;set:out std_logic_vector(3 downto 0);seg8:out std_logic_vector(7 downto 0);end entity;architecture one of show issubtype ten is std_logic_vector(3 downto 0);signal bcd :ten;type number1 is array(7 downto 0) of std_logic_vector(3 downto 0);signal num
11、ber : number1;signal key,key1,clk1,dial1,re_dial1:std_logic;signal count:std_logic_vector(3 downto 0);signal count1:std_logic_vector(3 downto 0);signal count2:std_logic_vector(2 downto 0);signal din1: std_logic_vector(9 downto 0);signal lock: std_logic_vector(31 downto 0);beginprocess(clk)isbeginif
12、rising_edge(clk) thencount1=count1+1;end if;end process;clk1=0 when count11100 else 1;process(clk1)isbeginif rising_edge(clk1) thendin1(9 downto 0)=din(9 downto 0);dial1=dial;re_dial1=re_dial;end if;end process;key=(din1(0) or din1(1) or din1(2) or din1(3) or din1(4) ordin1(5) or din(6) or din1(7) o
13、r din1(8) or din1(9);process(clk1)isbeginif falling_edge(clk1) thenif count2=100 thenif clear=0and re_dial=0 thenkey1=key;elsif clear =1 and re_dial=0 thenkey1=clk;else key1=re_dial1;end if;count2=000;elsecount2=count2+1;end if;end if;end process;process(din1)isbeginif din1(6)=1 then bcd=0110;elsif
14、din1(1)=1 then bcd=0001;elsif din1(2)=1 then bcd=0010;elsif din1(3)=1 then bcd=0011;elsif din1(4)=1 then bcd=0100;elsif din1(5)=1 then bcd=0101;elsif din1(0)=1 then bcd=0000;elsif din1(7)=1 then bcd=0111;elsif din1(8)=1 then bcd=1000;elsif din1(9)=1 then bcd=1001;else bcd=0000;end if;end process;key
15、out=key1;process(key1)isbeginif rising_edge(key1) thenif clear=0 and re_dial1=0 thennumber(7)=number(6);number(6)=number(5);number(5)=number(4);number(4)=number(3);number(3)=number(2);number(2)=number(1);number(1)=number(0);number(0)=bcd;elsif clear=1 and re_dial1=0 thennumber(0)=number(1);number(1)
16、=number(2);number(2)=number(3);number(3)=number(4);number(4)=number(5);number(5)=number(6);number(6)= number(7);number(7)=1111;elsenumber(7)= lock(31 downto 28);number(6)= lock(27 downto 24);number(5)= lock(23 downto 20);number(4)= lock(19 downto 16);number(3)= lock(15 downto 12);number(2)= lock(11
17、downto 8);number(1)= lock(7 downto 4);number(0)= lock(3 downto 0);end if;end if;end process;process(clk)isbeginif rising_edge(clk) thencountset=number(7);seg8set=number(6);seg8set=number(5);seg8set=number(4);seg8set=number(3);seg8set=number(2);seg8set=number(1);seg8set=number(4);seg8null;end case;en
18、d process;process(dial1)isbeginif rising_edge(dial1) thenlock(31 downto 28)=number(7);lock(27 downto 24)=number(6);lock(23 downto 20)=number(5);lock(19 downto 16)=number(4);lock(15 downto 12)=number(3);lock(11 downto 8)=number(2);lock(7 downto 4)=number(1);lock(3 downto 0)=number(0);end if;end proce
19、ss;end architecture;(2)鍵值顯示模塊shoaf:u1圖4按鍵顯示控制框圖各端口說明分別為:輸入:輸出:din 9, 0: 09十個(gè)數(shù)字鍵;keyout :可輸入數(shù)字指示燈;clk時(shí)鐘脈沖;set3, 0:鍵值的bc網(wǎng)clear刪除鍵;seg32, 0:數(shù)碼管的七段;dial:撥號鍵;re_dail重?fù)苕I3、仿真及仿真結(jié)果分析圖5仿真圖x g j rl x j 6d( ljj x rldc 0 .二 %頤奴屹欲滋儂隊(duì)設(shè)孩儂4、實(shí)驗(yàn)調(diào)試結(jié)果將程序下載進(jìn)行硬件測試。在quartus h開發(fā)環(huán)境中進(jìn)行管腳鎖定,連接好 數(shù)碼管驅(qū)動電路,然后將目標(biāo)文件下載到器件中。最終可以看到按鍵正常顯示、 “重?fù)堋辨I功能正常、達(dá)到設(shè)計(jì)要求。三、結(jié)論及心得體會通過本次課程設(shè)計(jì),讓我在以前所學(xué)知識的基礎(chǔ)上,更加了解了對eda語言編程的認(rèn)識,不僅強(qiáng)化了以前所學(xué)過的知識,并且學(xué)到了許多書本上沒有的 知識,極大的擴(kuò)展了我的知識面,所獲匪淺。從復(fù)習(xí)以前所學(xué)的知識到對整體設(shè)計(jì)的了解,再從概要設(shè)計(jì)、詳細(xì)設(shè)計(jì)到開始使用軟件以及最后的調(diào)試,整個(gè)過程都很充實(shí)。雖然遇到不少困難,但當(dāng)我通過自己查資料向老師請教及與同學(xué)相互討論而設(shè)計(jì)出解決方案并成功實(shí)現(xiàn)時(shí),那種成就感和滿足感就讓我忘了所有的辛
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 初級養(yǎng)老護(hù)理員培訓(xùn)全套課件
- 中班健康的芹菜
- 新入院病人健康宣教要點(diǎn)
- 消化健康小知識
- 頤和園的英文介紹
- 木字旁教學(xué)設(shè)計(jì)
- 工程設(shè)計(jì)報(bào)告
- 《智能網(wǎng)聯(lián)汽車技術(shù)》課件-激光雷達(dá)
- 預(yù)防網(wǎng)絡(luò)犯罪班會課件
- 幼兒園廚房安全培訓(xùn)內(nèi)容
- 中共黨史知識競賽試題及答案
- 2020年杭州學(xué)軍中學(xué)高一入學(xué)分班考試英語試卷及答案
- (高清版)AQ 1044-2007 礦井密閉防滅火技術(shù)規(guī)范
- 死亡醫(yī)學(xué)證明書填寫培訓(xùn)
- 做自己的心理壓力調(diào)節(jié)師智慧樹知到期末考試答案章節(jié)答案2024年嘉興大學(xué)
- 學(xué)術(shù)期刊推廣方案
- 安檢設(shè)備采購安裝調(diào)試方案
- 實(shí)習(xí)生-OFFER正式通知函
- 市政臨時(shí)占道施工方案
- 《分娩方式的選擇》課件
- 《FABE銷售法則》課件
評論
0/150
提交評論