


下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、“項目四秒表設(shè)計”實驗報告專業(yè)班級:電子144 姓名: 秦慧樺學號: 2014014273 實驗日期: 一、實驗?zāi)康?)熟悉并掌握計數(shù)器的設(shè)計;2)熟悉數(shù)碼管的設(shè)計;3)熟悉VHDL語言的分層次設(shè)計;二實驗內(nèi)容:1)對50MHz晶振進行500000分頻,得到100Hz信號;2)對該100Hz信號進行0-9的循環(huán)計數(shù),并用一位數(shù)碼管顯示;3) 在2成功的基礎(chǔ)上進行擴展,實現(xiàn)100Hz信號的0-99循環(huán)計數(shù),并用兩位數(shù)碼管進行顯示;4)擴展內(nèi)容:計數(shù)初值可以設(shè)置,計數(shù)值可以人為干預(yù);三、實驗結(jié)果1. 對50MHz晶振進行500000分頻,得到100Hz信號的程序代碼library ieee;use
2、 ieee.std_logic_1164.AII;use ieee.std_logic_unsigned.All;use ieee.std_logic_arith.All;entity div25 isport(clkin:in std_logic;clkout:buffer std_logic);end;architecture ret1 of div25 isbeginprocess(clkin)variable count:integer range 0 to 249999;beginif clkin' event and clkin='1' then if co
3、unt<249999 then count:=count+1;elsecount:=0;clkout<=not clkout;end if;end if;end process;end;2. 對 100Hz 信號的 0-99 循環(huán)計數(shù)程序代碼及仿真結(jié)果library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity cnt99 isport (clkout:in std_logic;gw:out std_logic_vector(3
4、 downto 0);sw:out std_logic_vector(3 downto 0); end;architecture rtl of cnt99 isbeginprocess(clkout)variable num:std_logic_vector (3 downto 0) ;variable s:std_logic_vector (3 downto 0) ; beginif clkout' event and clkout='1' thenif (num<9) thennum:=num+1;else num:="0000"s:=s+
5、1; if (s>9) then s:="0000"end if;end if ;end if;gw<=num;sw<=s;end process;end ;3頂層文件的截屏、引腳鎖定及實驗現(xiàn)象截圖,并對實驗現(xiàn)象進行分析 © Edit: X 7Node NameDirectionLocationI/O Bankfnf GroupI/O StandarddkInputPIN G21>B6 N12.5 V (default)q6OutputPIN.F137B7 N12.5 V (default)OutputPIN F127B7N1乙 5 V (
6、deFault)Outputpm Gi21B7 hll2,5 V (defadt)OutputPIN屮苗?B7 N12-5 V (default)OutputPIN H12J*B7 N12.5 V (蟲fault)OutputP1N FL17B7 N12.5 V (default)OutputPIN EllJE7 N12.5 V (default)OutputPIN A157B7 N12-5 V (default)OutputPIN E1B7 N12.5 V (default)OutputP1N B147B7 N12.5 V (default)OutputPIN A147B7 N1乙 5 V
7、(default)OutputPIN C137B7 N1V (default)OutputPIN B137B7 N1N5 V (deFault)s0Outpu tPIN A137B7 N12.5 V (default)實驗現(xiàn)象分析:單片機數(shù)碼管顯示從 099秒的計時四、如何實現(xiàn)秒表的倒計時功能?請給出程序及實驗結(jié)果library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity cntd99 isport (clkout:in std_logi
8、c;gw:out std_logic_vector(3 downto 0);sw:out std_logic_vector(3 downto 0);end;architecture rtl of cntd99 isbeginprocess(clkout)variable num:std_logic_vector (3 downto 0);variable s:std_logic_vector (3 downto 0);beginif clkout' event and clkout='1' thenif (num<9) thennum:=num+1;else nu
9、m:="0000"s:=s+1;if (s>9) then s:="0000"end if;end if ;end if;gw<=9_num;sw<=9-s;end process;end ;實驗總結(jié)Ll_psA) ns.itu. U ns Z4U. U ns JU. U ns 4UJ. U ns ilm t»U. U ns t*iU. U ns fZU. U ns.占HI II liIie.9 nsJArmniwiwiMmnmwuinnjinnjinwmnwumnminnjuinjumijmnmnwuuVUC91XmX7JC引rnr5X4】;(131)G本次實驗是在上次實驗的基礎(chǔ)上進行的,上次實驗中,我們做了059的計數(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)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 提升銷售談判中溝通質(zhì)量的技巧
- 2022-2027年中國兒童安全座椅市場全景評估及投資規(guī)劃建議報告
- 幼兒教育中的個性化學習支持
- 提高生活品質(zhì)的五大飲食秘笈
- 抗菌自潔建筑材料行業(yè)深度調(diào)研及發(fā)展項目商業(yè)計劃書
- 田園風光農(nóng)舍改造企業(yè)制定與實施新質(zhì)生產(chǎn)力項目商業(yè)計劃書
- 甘肅省天水李子金礦有限公司礦產(chǎn)資源開發(fā)與恢復(fù)治理方案專家組審查意見
- 藥品自動配液系統(tǒng)行業(yè)跨境出海項目商業(yè)計劃書
- 2025年中國U盤未來趨勢預(yù)測分析及投資規(guī)劃研究建議報告
- 醫(yī)藥包裝自動化打包系統(tǒng)企業(yè)制定與實施新質(zhì)生產(chǎn)力項目商業(yè)計劃書
- 2025-2030中國疏浚工程行業(yè)發(fā)展態(tài)勢與前景規(guī)劃分析報告
- 科室vte管理制度
- 2025年山西萬家寨水務(wù)控股集團所屬企業(yè)招聘筆試參考題庫含答案解析
- 中小學美術(shù)教學評價構(gòu)建及實施策略
- 2025-2030玉石行業(yè)風險投資發(fā)展分析及運作模式與投融資研究報告
- 公共組織績效評估-形考任務(wù)二(占10%)-國開(ZJ)-參考資料
- 西門子SAMA圖DEH邏輯講解
- 施工現(xiàn)場安全、文明施工檢查評分表
- 管道支架重量計算表常用圖文精
- 國家開放大學《數(shù)據(jù)結(jié)構(gòu)(本)》單元測試參考答案
- 中藥化學成分的預(yù)試驗大全
評論
0/150
提交評論