




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
附錄A八位七段數(shù)碼管顯示程序libraryieee;useledisport(clk:instd_logic; --ClockSignaldata_in:instd_logic_vector(7downto0);--databusledag:outstd_logic_vector(6downto0);--定義七位輸出信號sel:outstd_logic_vector(2downto0)--ledagSelect);endled;architecturebehaveofledissignaldcount :std_logic_vector(2downto0);signaladh,adl:std_logic_vector(6downto0);signaladcount:std_logic_vector(7downto0);signaldin_h,din_l:std_logic_vector(3downto0);signalcoclk:std_logic;beginprocess(clk)--outenablesignalbeginif(clk'eventandclk='1')thenifadcount=""thencoclk<='1';when"0111"=>adh<="0000111"; when"0111"=>adh<="0000111"; --display7adcount<="00000000";elseadcount<=adcount+1;coclk<='0';endif;endif;endprocess;process(clk)--rdtheadcdatabeginif(clk'eventandclk='1')thendin_h<=data_in(7downto4);din_l<=data_in(3downto0);endif;endprocess;process(clk)begincasedin_his-display-display0-display1-display2-display3-display4-display5-display6when"0001"=>adh<="0000110";when"0010"=>adh<="1011011";when"0011"=>adh<="1001111";when"0100"=>adh<="1100110";when"0101"=>adh<="1101101";when"0110"=>adh<="1111101";when"1000"=>adh<="1111111"; when"1000"=>adh<="1111111"; --display8when"1101"=>adl<="1011110";when"1101"=>adl<="1011110";--displaydwhen"1001"=>adh<="1101111";when"1010"=>adh<="1110111";when"1011"=>adh<="1111100";when"1100"=>adh<="0111001";when"1101"=>adh<="1011110";when"1110"=>adh<="1111001";when"1111"=>adh<="1110001";whenothers=>adh<=adh;endcase;casedinliswhen"0000"=>ad<="0111111";when"0001"=>ad<="0000110";when"0010"=>ad<="1011011";when"0011"=>ad<="1001111";when"0100"=>ad<="1100110";when"0101"=>ad<="1101101";when"0110"=>ad<="1111101";when"0111"=>ad<="0000111";when"1000"=>ad<="1111111";when"1001"=>ad<="1101111";when"1010"=>ad<="1110111";when"1011"=>ad<="1111100";when"1100"=>ad<="0111001";-display9-displaya-displayb-displayc-displayd-displaye-displayf--nochange-display0-display1-display2-display3-display4-display5-display6-display7-display8-display9-displaya-displayb-displaycwhen"1110"=>adl<="1111001"; when"1110"=>adl<="1111001"; --displaye--displayf--displayf--nochangewhenothers=>adl<=adl;endcase;endprocess;process(coclk)--displayprocessbeginif(coclk'eventandcoclk='1')thendcount<=dcount+1;sel<=dcount;casedcountiswhen"000"=>ledag<="1000000";when"001"=>ledag<="1000000";when"010"=>ledag<="1000000";when"011"=>ledag<=adh;when"100"=>ledag<=adl;when"101"=>ledag<="10000
溫馨提示
- 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 合作社規(guī)范化經(jīng)營協(xié)議書
- 老年惡性腫瘤患者衰弱狀況及其影響因素分析
- 電器安裝維修服務(wù)風(fēng)險(xiǎn)免責(zé)協(xié)議
- 交通出行業(yè)智能交通信號控制系統(tǒng)開發(fā)應(yīng)用
- 初中數(shù)學(xué)家長指導(dǎo)心得體會
- 影視后期制作保密免責(zé)協(xié)議書
- 新能源無服務(wù)邊緣計(jì)算環(huán)境的資源分配研究
- 企業(yè)采購與研發(fā)協(xié)作計(jì)劃書
- 座椅動態(tài)支撐對人體腰部疲勞的影響機(jī)制研究
- 2025年初中學(xué)業(yè)水平考試地理模擬試卷:環(huán)境與可持續(xù)發(fā)展知識測試題
- 合同恢復(fù)工作協(xié)議
- T-CPIA 0056-2024 漂浮式水上光伏發(fā)電錨固系統(tǒng)設(shè)計(jì)規(guī)范
- 游泳館租賃安全責(zé)任協(xié)議書
- 貴州省銅仁市2022-2023學(xué)年度六年級下學(xué)期期末質(zhì)量檢測科學(xué)試卷
- 行政復(fù)議法-形考作業(yè)4-國開(ZJ)-參考資料
- 塑造陽光心態(tài)班會省公開課一等獎全國示范課微課金獎?wù)n件
- 語文六年級下冊辯
- 煤礦+925東大巷掘進(jìn)作業(yè)規(guī)程
- 完整解讀2024年關(guān)于加強(qiáng)社區(qū)工作者隊(duì)伍建設(shè)的意見內(nèi)容課件
- 醫(yī)院護(hù)理培訓(xùn)課件:《改善患者就醫(yī)感受提高患者滿意度》
- 淺談抖音短視頻對大學(xué)生的影響
評論
0/150
提交評論