


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、.VHDL數(shù)字秒表設(shè)計(jì)專 業(yè): 自動(dòng)化班級(jí)學(xué)號(hào): 5090629姓 名: X丹2021年 6 月14 日VHDL語言課程設(shè)計(jì)-秒表設(shè)計(jì)一、設(shè)計(jì)實(shí)驗(yàn)?zāi)康模涸贛AX+plusII軟件平臺(tái)上,熟練運(yùn)用VHDL語言,完成數(shù)字時(shí)鐘設(shè)計(jì)的軟件編程、編譯、綜合、仿真,使用EDA實(shí)驗(yàn)箱,實(shí)現(xiàn)數(shù)字秒表的硬件功能。二、設(shè)計(jì)實(shí)驗(yàn)說明及要求:1、數(shù)字秒表主要由:分頻器、掃描顯示譯碼器、一百進(jìn)制計(jì)數(shù)器、六十進(jìn)制計(jì)數(shù)器或十進(jìn)制計(jì)數(shù)器與6進(jìn)制計(jì)數(shù)器、十二進(jìn)制計(jì)數(shù)器或二十四進(jìn)制計(jì)數(shù)器電路組成。在整個(gè)秒表中最關(guān)鍵的是如何獲得一個(gè)準(zhǔn)確的100HZ計(jì)時(shí)脈沖,除此之外,數(shù)字秒表需有清零控制端,以及啟動(dòng)控制端、保持保持,以便數(shù)字時(shí)鐘能
2、隨意停頓及啟動(dòng)。2、數(shù)字秒表顯示由時(shí)12或24進(jìn)制任選、分60進(jìn)制、秒60進(jìn)制、百分之一秒一百進(jìn)制組成,利用掃描顯示譯碼電路在八個(gè)數(shù)碼管顯示。3、能夠完成清零、啟動(dòng)、保持可以使用鍵盤或撥碼開關(guān)置數(shù)功能。4、時(shí)、分、秒、百分之一秒顯示準(zhǔn)確。三、我的設(shè)計(jì)思路: 1、四個(gè)十進(jìn)制計(jì)數(shù)器:用來分別對(duì)百分之一秒、十分之秒、秒和分進(jìn)展計(jì)數(shù); 2、兩個(gè)6進(jìn)制計(jì)數(shù)器:用來分別對(duì)十秒和十分進(jìn)展計(jì)數(shù);3、一個(gè)24進(jìn)制計(jì)數(shù)器,用來對(duì)小時(shí)進(jìn)展計(jì)數(shù); 3、分頻率器:用來產(chǎn)生100Hz的計(jì)數(shù)脈沖; 4、顯示譯碼器:完成對(duì)顯示譯碼的控制。四、設(shè)計(jì)過程:1.分頻器:由10MHz變?yōu)?00Hz,10MHz的周期是10的-7次方,
3、而100Hz的周期是10的-2次方,而且方波是上下相間,只有高電平有效,所以100Hz的周期需要取一半,即0.02秒,這樣算出的分頻倍數(shù)就是50000分頻器代碼:將10MHz脈沖變成100Hz程序:library ieee;use ieee.std_logic_1164.all;entity fenpin isport(clr,clk: in bit;q: buffer bit);end fenpin;architecture a of fenpin is signal counter:integer range 0 to 49999;begin process(clr,clk) begini
4、f (clk=1 and clkevent) then if clr=1 then counter=0;elsif counter=49999 then counter=0; q= not q;else counter=counter+1; end if; end if; end process;end a;分頻器的仿真圖:2.十進(jìn)制計(jì)數(shù)器:原理為加法計(jì)數(shù)器,從0加到9,計(jì)到10個(gè)數(shù)時(shí)由cout進(jìn)位程序:library ieee; use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity c10 is port(clr
5、,start,clk: in bit;cout: out bit;daout: out std_logic_vector(3 downto 0);end c10;,architecture a of c10 is signal temp:std_logic_vector(3 downto 0);begindaout=temp;process(clk,clr)begin if clr=1 then temp=0000; cout=1001 then temp=0000;cout=1; else temp=temp+1; cout=0; end if; end if; end if; end pr
6、ocess;end a;十進(jìn)制計(jì)數(shù)器仿真圖:3.六進(jìn)制計(jì)數(shù)器:原理為加法計(jì)數(shù)器,從0 加到5計(jì)到第六個(gè)數(shù)時(shí)由cout進(jìn)位。程序:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity c6 is port(clr,start,clk: in bit; daout: out std_logic_vector(3 downto 0); cout: out std_logic);end c6;architecture a of c6 is signal temp:std_logic_vector(
7、3 downto 0);begindaout=temp; process(clk,clr) begin if clr=1 then temp=0000; cout=0101 then temp=0000;cout=1; else temp=temp+1; cout=0; end if; end if; end if; end process; end a;6進(jìn)制計(jì)數(shù)器仿真圖:4、二十四進(jìn)制計(jì)數(shù)器采用一個(gè)二進(jìn)制的計(jì)數(shù)器和一個(gè)四進(jìn)制的計(jì)數(shù)器相結(jié)合到一起,低位從0到9,到9向高位進(jìn)一,當(dāng)?shù)臀挥?jì)到四,高位計(jì)到2,進(jìn)展進(jìn)位輸出,即每二十四個(gè)數(shù)進(jìn)展一次進(jìn)位輸出library ieee;use ieee.s
8、td_logic_1164.all;use ieee.std_logic_unsigned.all;entity c24 isport(clr,start,clk:in std_logic;hour1,hour0:out std_logic_vector(3 downto 0);end c24;architecture a of c24 isbegin process(clr,clk)variablet1,t0:std_logic_vector(3 downto 0);beginif clr=1 then t0:=0000;t1:=0000;elsif clkevent and clk=1 t
9、henif start=1 thenift1=0010 andt0=0011thent1:=0000;t0:=0000;elsift01001 thent0:=t0+1;elset0:=0000;t1:=t1+1;end if;end if;end if;hour1=t1;hour0=t0;end process;end a;24進(jìn)制計(jì)數(shù)器仿真圖:5.數(shù)據(jù)選擇和數(shù)碼管選擇模塊代碼:其功能是選擇計(jì)數(shù)端口來的數(shù)據(jù),當(dāng)相應(yīng)的數(shù)據(jù)到來時(shí)數(shù)據(jù)選擇器數(shù)據(jù)后輸數(shù)給數(shù)碼管,并由數(shù)碼管顯示。八個(gè)數(shù)碼管分別顯示小時(shí),分鐘,秒,百分秒library ieee;use ieee.std_logic_1164.all;
10、use ieee.std_logic_unsigned.all;entity seltime isport(clk: in bit;dain0,dain1,dain2,dain3,dain4,dain5,dain6,dain7: in std_logic_vector(3 downto 0);sel: out std_logic_vector(2 downto 0);daout: out std_logic_vector(3 downto 0);end seltime;architecture a of seltime issignal temp:integer range 0 to 7;be
11、ginprocess(clk)beginif (clk=1and clkevent) thenif temp=7 then temp=0;else tempsel=000;daoutsel=001;daoutsel=010;daoutsel=011;daoutsel=100;daoutsel=101;daoutsel=110;daoutsel=111;daoutledledledledledledledledledledled=0000000;-00Hend case;end process;end a;五、秒表原理圖六:實(shí)驗(yàn)總結(jié)通過本次的課程設(shè)計(jì),我初步了解了vhdl語言的編程思想,以及利用EDA軟件進(jìn)展電子電路設(shè)計(jì)的方法,通過對(duì)一個(gè)課題的分析,將實(shí)驗(yàn)的內(nèi)容進(jìn)展分塊解讀,具體到每一個(gè)模塊的具體作用,然后將各個(gè)功能的模塊通過連線進(jìn)展總體的電路實(shí)現(xiàn),也可以通過Vhdl語言對(duì)各個(gè)模塊進(jìn)展組合,然后需要在程序編譯成功的根底上,安裝硬件,將程序下載到具體的芯片上
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- T/CCS 028-2023基于地理信息系統(tǒng)的工作面截割模板自動(dòng)生成系統(tǒng)技術(shù)要求
- T/CCMA 0115-2021塔式起重機(jī)使用說明書編寫導(dǎo)則
- T/CCMA 0090-2020綠色設(shè)計(jì)產(chǎn)品評(píng)價(jià)技術(shù)規(guī)范混凝土泵車
- T/CAQI 69-2019管道直飲水系統(tǒng)技術(shù)要求
- T/CAPEC 1-2018電站鍋爐制造監(jiān)理技術(shù)要求
- T/CAPE 13003-2024民用建筑裝配式通風(fēng)系統(tǒng)工程技術(shù)規(guī)程
- T/CAME 61-2023通倉交融手術(shù)室建設(shè)指南
- 大運(yùn)會(huì)保安考試題及答案
- 檢驗(yàn)招考試題及答案
- 干部交流面試題及答案
- JGJ79-2012 建筑地基處理技術(shù)規(guī)范
- 石藥集團(tuán)人才測評(píng)題庫
- 醫(yī)院財(cái)務(wù)科培訓(xùn)課件
- 四川省2023年普通高校對(duì)口招生統(tǒng)一考試數(shù)學(xué)試卷(解析版)
- 生物樣本庫建設(shè)方案
- lng基本知識(shí)及液化技術(shù)介紹
- 火災(zāi)自動(dòng)報(bào)警系統(tǒng)調(diào)試記錄
- 《消化內(nèi)鏡》課件
- 創(chuàng)業(yè)風(fēng)險(xiǎn)的識(shí)別與防范
- 值班值守工作培訓(xùn)課件
- 管理工具二八原則培訓(xùn)課件
評(píng)論
0/150
提交評(píng)論