資源簡介
本實驗設計一個十字路口的交通燈控制器,分為東西和南北兩個部分。每個部分有五盞燈,分別為左轉燈、直行燈、右轉燈、人行道燈及黃燈,另外還有一個倒計時器。左轉燈、直行燈、右轉燈、人行道燈亮表示允許通行,燈滅表示禁止通行;黃燈亮表示即將有信號燈的狀態發生改變;倒計時顯示了到下一狀態的時間。
2.狀態表(0表示燈滅,1表示燈亮)
時間度量 東西方向 南北方向 東西方向 南北方向
t/s ← ↑ → 行人 黃 ← ↑ → 行人 黃 倒計時/s 倒計時/s
0~13 0 1 1 0 0 0 0 0 0 0 13 45
13~15 0 1 1 0 1 0 0 0 0 0 2
15~28 0 1 0 1 0 0 0 0 0 0 13
28~30 0 1 0 1 1 0 0 0 0 0 2
30~43 1 0 0 0 0 0 0 0 0 0 13
43~45 1 0 0 0 1 0 0 0 0 0 2
45~58 0 0 0 0 0 0 1 1 0 0 45 13
58~60 0 0 0 0 0 0 1 1 0 1 2
60~73 0 0 0 0 0 0 1 0 1 0 13
73~75 0 0 0 0 0 0 1 0 1 1 2
75~88 0 0 0 0 0 1 0 0 0 0 13
88~90 0 0 0 0 0 1 0 0 0 1 2
3.狀態圖(低電平表示燈滅,高電平表示燈亮)
4.頂層設計圖
如圖所示,交通燈控制器主要分為三個模塊,交通燈狀態控制,交通燈顯示和倒計時。交通燈狀態控制模塊:接受頻率為1Hz的時鐘信號,根據該信號進行處理,對交通燈顯示和倒計時模塊給出相應的狀態編號(12個狀態)。交通燈顯示模塊:通過相應的狀態設置兩組交通燈的亮滅。倒計時模塊:通過相應的狀態確定倒計時的基數及顯示。

代碼片段和文件信息
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-07-02?16:38??traffic\
?????文件????????1974??2013-07-02?17:02??traffic\atdaojishi.bsf
?????文件?????????507??2013-07-02?17:02??traffic\atdaojishi.vhd
?????文件???????12744??2013-07-02?17:06??traffic\Block1.bdf
?????文件????????1974??2013-07-02?17:03??traffic\btdaojishi.bsf
?????文件?????????506??2013-07-02?17:03??traffic\btdaojishi.vhd
?????目錄???????????0??2013-07-02?19:54??traffic\db\
?????文件????????1946??2013-07-02?17:06??traffic\db\jiaotongdeng.(0).cnf.cdb
?????文件?????????804??2013-07-02?17:06??traffic\db\jiaotongdeng.(0).cnf.hdb
?????文件????????5187??2013-07-02?17:06??traffic\db\jiaotongdeng.(1).cnf.cdb
?????文件????????1488??2013-07-02?17:06??traffic\db\jiaotongdeng.(1).cnf.hdb
?????文件????????3008??2013-06-30?17:20??traffic\db\jiaotongdeng.(2).cnf.cdb
?????文件?????????862??2013-06-30?17:20??traffic\db\jiaotongdeng.(2).cnf.hdb
?????文件????????1405??2013-07-02?17:06??traffic\db\jiaotongdeng.(3).cnf.cdb
?????文件?????????533??2013-07-02?17:06??traffic\db\jiaotongdeng.(3).cnf.hdb
?????文件????????9091??2013-07-02?17:06??traffic\db\jiaotongdeng.(4).cnf.cdb
?????文件????????1425??2013-07-02?17:06??traffic\db\jiaotongdeng.(4).cnf.hdb
?????文件????????1404??2013-07-02?17:06??traffic\db\jiaotongdeng.(5).cnf.cdb
?????文件?????????527??2013-07-02?17:06??traffic\db\jiaotongdeng.(5).cnf.hdb
?????文件????????1370??2013-07-02?17:06??traffic\db\jiaotongdeng.(6).cnf.cdb
?????文件?????????494??2013-07-02?17:06??traffic\db\jiaotongdeng.(6).cnf.hdb
?????文件????????1809??2013-07-02?17:07??traffic\db\jiaotongdeng.asm.qmsg
?????文件??????123802??2013-07-02?17:07??traffic\db\jiaotongdeng.asm_labs.ddb
?????文件??????????94??2013-07-02?17:06??traffic\db\jiaotongdeng.cbx.xml
?????文件???????37259??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.cdb
?????文件???????11706??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.hdb
?????文件?????????212??2013-07-02?17:06??traffic\db\jiaotongdeng.cmp.kpt
?????文件???????????4??2013-07-02?17:06??traffic\db\jiaotongdeng.cmp.logdb
?????文件???????23090??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.rdb
?????文件???????38431??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.tdb
?????文件??????129391??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp0.ddb
............此處省略58個文件信息
-----------?---------??----------?-----??----
?????目錄???????????0??2013-07-02?16:38??traffic\
?????文件????????1974??2013-07-02?17:02??traffic\atdaojishi.bsf
?????文件?????????507??2013-07-02?17:02??traffic\atdaojishi.vhd
?????文件???????12744??2013-07-02?17:06??traffic\Block1.bdf
?????文件????????1974??2013-07-02?17:03??traffic\btdaojishi.bsf
?????文件?????????506??2013-07-02?17:03??traffic\btdaojishi.vhd
?????目錄???????????0??2013-07-02?19:54??traffic\db\
?????文件????????1946??2013-07-02?17:06??traffic\db\jiaotongdeng.(0).cnf.cdb
?????文件?????????804??2013-07-02?17:06??traffic\db\jiaotongdeng.(0).cnf.hdb
?????文件????????5187??2013-07-02?17:06??traffic\db\jiaotongdeng.(1).cnf.cdb
?????文件????????1488??2013-07-02?17:06??traffic\db\jiaotongdeng.(1).cnf.hdb
?????文件????????3008??2013-06-30?17:20??traffic\db\jiaotongdeng.(2).cnf.cdb
?????文件?????????862??2013-06-30?17:20??traffic\db\jiaotongdeng.(2).cnf.hdb
?????文件????????1405??2013-07-02?17:06??traffic\db\jiaotongdeng.(3).cnf.cdb
?????文件?????????533??2013-07-02?17:06??traffic\db\jiaotongdeng.(3).cnf.hdb
?????文件????????9091??2013-07-02?17:06??traffic\db\jiaotongdeng.(4).cnf.cdb
?????文件????????1425??2013-07-02?17:06??traffic\db\jiaotongdeng.(4).cnf.hdb
?????文件????????1404??2013-07-02?17:06??traffic\db\jiaotongdeng.(5).cnf.cdb
?????文件?????????527??2013-07-02?17:06??traffic\db\jiaotongdeng.(5).cnf.hdb
?????文件????????1370??2013-07-02?17:06??traffic\db\jiaotongdeng.(6).cnf.cdb
?????文件?????????494??2013-07-02?17:06??traffic\db\jiaotongdeng.(6).cnf.hdb
?????文件????????1809??2013-07-02?17:07??traffic\db\jiaotongdeng.asm.qmsg
?????文件??????123802??2013-07-02?17:07??traffic\db\jiaotongdeng.asm_labs.ddb
?????文件??????????94??2013-07-02?17:06??traffic\db\jiaotongdeng.cbx.xm
?????文件???????37259??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.cdb
?????文件???????11706??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.hdb
?????文件?????????212??2013-07-02?17:06??traffic\db\jiaotongdeng.cmp.kpt
?????文件???????????4??2013-07-02?17:06??traffic\db\jiaotongdeng.cmp.logdb
?????文件???????23090??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.rdb
?????文件???????38431??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp.tdb
?????文件??????129391??2013-07-02?17:07??traffic\db\jiaotongdeng.cmp0.ddb
............此處省略58個文件信息
- 上一篇:IFIX_S7A_MPI_與300通訊詳細步驟
- 下一篇:在線音樂商店課程設計
評論
共有 條評論