六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)_第1頁
六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)_第2頁
六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)_第3頁
六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)_第4頁
六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)_第5頁
已閱讀5頁,還剩6頁未讀 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、可編程邏輯器件技術(shù)項目設(shè)計報告課題名稱:六位數(shù)碼管動態(tài)掃描顯示電路設(shè)計與實現(xiàn)班 級:13電子(2)班指導(dǎo)老師:一、設(shè)計要求1)用VHDL語言設(shè)計一個可以實現(xiàn)以下功能的程序:六個數(shù)碼 管可以同時工作,顯示不同的數(shù)字。2)編寫完程序之后并在開發(fā)系統(tǒng)上進行硬件測試。二、任務(wù)分析串行連接,即每個數(shù)碼管對應(yīng)的引腳都要連接在一起(如每個 數(shù)碼管的a引腳都要接到一起,然后再接到CPLD/FPGA上的一 個引腳上),通過控制公共端(圖5中的K端)控制相對應(yīng)的數(shù) 碼管亮、滅(共陰極數(shù)碼管的公共端為高電平時,LED不亮; 共陽極的公共端為低電平時,LED不亮)。串行法的優(yōu)點在于消耗的系統(tǒng)資源少,占用的I/O 口少

2、,N個 數(shù)碼管只需要(7+N)個引腳(如果需要小數(shù)點,則是(8+N) 個引腳)。其缺點是控制起來不如并行法容易。三、設(shè)計原理四、硬件要求主芯片EPM240T100C5,六個共陰極七段數(shù)碼管。五、源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity dt isport(clock:in std_logic;numa,numb: in integer range 0 to 9;en:out std_logic_vector(0 to 5);display:out std_logic_ve

3、ctor(0 to 6)-(ag);end;architecture decoder of dt issignal counter:integer range 0 to 9;signal clk_1:std_logic;signal numc,numd,nume,numf:integer range 0 to 9;beginnumc=0;numd=0;nume=0;numf=0;variable cntl: integer range 0 to 1000;variable cnt2: integer range 0 to 50;1000Hzbeginif rising_edge(clock)

4、thenif cnt1=1000 thencnt1:=0;Ifcnt2=50thencnt2:=0;clk_1=not clk_1;elsecnt2:=cnt2+1;end if;elsecnt1:=cnt1+1;end if;end if;end process;process(clk_1)variable num:integer range 0 to 9;beginif rising_edge(clk_1) thenif counter=5 thencounter=0;elsecounteren二011111”;num:=numa;when 1二en二101111”;num:=numb;w

5、hen 2=en二110111”;num:=numc;when 3=en=”111011”;num:=numd;when 4=en=”111101”;num:=nume;when 5=enen二000000”;num:=0;end case;case num iswhen 0=display二1111110”;when 1=display二0110000”;when 2=display=1101101;when 3=display=1111001;when 4=display=0110011;when 5=display=1011011;when 6=display=0011111;when

6、7=display=1110000;when 8=display=1111111;when 9=display=1111011;when others=display=0000000;end case;end if;end process;六、接線圖Node NameDirectionLocationIQ Bank1 dothInputPIH_1212_/ display 0OutputFm_?L23_/ display 1OutputPIhl_9224_/ displsvUOutputPIN_9525displayt?OutputPIN_9625display -4OutputPIN_972

7、7_/ disphy5OutputPIN_9&2a_/ display 6Output2g_/ HenEOOutputPIhl_l210enlOutputPIN_21iien2OutputPIN_3112_/ enJOutputPiro113_/en4OutputPIN_51H_/en5OutputFWi_6115numm 丑InputPIN_35116numa2InputPIN_34117numalInputPIN_S3118_/ numa0InputPIN_3a119numblInput120numb 2InputPIN_38121numblInputPIN_37122numbQInputPIN_滯123 numc3Input由numcZInput25numclInput七、現(xiàn)象描述以上程序在硬件上的現(xiàn)象是從左往右數(shù),前四個顯示字形為0, 后兩個數(shù)碼管由八個撥碼開關(guān)控制顯示字形。撥碼開關(guān)打到相應(yīng) 位置的二進制數(shù),對應(yīng)在七段數(shù)碼管上顯示相應(yīng)字形,形如七段 數(shù)碼管顯示譯碼器的硬件現(xiàn)象測試。八、總結(jié)通過這次動態(tài)掃描設(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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論