【正文】
基于 DSP 的交通燈 信 息 工 程 學(xué) 院 班級: 0312405 姓名: 覃川 學(xué)號: 031240507 摘要: 結(jié)合我國的交通現(xiàn)狀和實際需求,研發(fā)的靈活配時的交通信號控制,實現(xiàn)定時控制方式。這里主要介紹信號定時的具體實現(xiàn);系統(tǒng)的設(shè)計主要圍繞配時設(shè)置展開。本文提出了基于 DSP 的交通信號控制機的具體實現(xiàn)方法,給出了詳細(xì)的硬件、軟件設(shè)計。首先提出系統(tǒng) 的總體設(shè)計;然后以信號機功能為主線介紹上位機實現(xiàn)各功能的方法,以各模塊 組成為中心介紹下位機的硬件設(shè)計,圍繞倌號機 程序編制的重點和難點介紹了下位機的固件設(shè)計 , 即 DSP 程序;最后提出了以 U盤文件方式進(jìn)行配時設(shè)置,介紹了 U盤和文件系統(tǒng)識別的基本過程 . 關(guān)鍵字: 交通信號控制機 Abstract: Combining with the traffic situation in China and the actual demand, traffic signalcontrol at the time of flexible with R amp。 D, to achieve timing control method. Here mainly introduce the concrete realization of the timing signal。 system designmainly around the timing setting expansion. This paper presents the concrete realization methodof traffic signal controller based on DSP, gives the detaileddesign of hardware and software. First proposed the overall design of the system。 and then to the signal function as the main line the puter realization method of each function, hardware design as the center to introduce the lower position machine by each module, key and difficulty about programming machinegroom number describes the firmware design of lower puter, namely the DSP program。 finally puts forward setting with to U disk file mode, introduces the basicprocess of U disk and filesystem identification. Key words: DSP、 Traffic singnal controller 目錄 1 系統(tǒng)概述 .............................................. 4 設(shè)計目的 ..................................................... 4 設(shè)計任務(wù) .................................................... 4 2 方案論證 ....................................................... 5 設(shè)計思路 ..................................................... 5 設(shè)計方案 ..................................................... 5 工作狀態(tài) .................................................... 6 3 硬件設(shè)計 ........................................................ 7 硬件總體設(shè)計 ................................................. 7 交通燈顯示模塊 .............................................. 7 計數(shù)顯示模塊 ................................................. 8 開關(guān)模塊 ..................................................... 9 4 軟件設(shè)計 ........................................................ 9 程序流程 ..................................................... 9 交通燈模擬 顯示 .............................................. 10 定時器及中斷設(shè)計 ............................................ 11 外中斷設(shè)計 .................................................. 12 5 系統(tǒng)調(diào)試 ....................................................... 13 硬件調(diào)試 .................................................... 13 軟件調(diào)試 .................................................... 15 系統(tǒng)下載 .................................................... 18 6 致謝 ............................................................ 18 參考文獻(xiàn) ......................................................... 18 附錄 .............................................................. 20 1 系統(tǒng)概述 (1)練習(xí)自主獨立的設(shè)計,實現(xiàn)理論和實踐的統(tǒng)一,提高自我動手能力。 (2)利用 DSP 開發(fā)環(huán)境 CCS C2020 對源程序文件進(jìn)行編譯、鏈接、裝載調(diào)試,以完成基本的 DSP 項目文件設(shè)計。 (3)通過此次課程設(shè)計,學(xué)習(xí) DSPF2812 芯片的 I/O 端口控制方法,熟悉字模的簡單構(gòu)建和使用,熟悉掌握在 DSP 軟硬件環(huán)境下的程序開發(fā)流程,達(dá)到學(xué)以致用的目的。 設(shè)計任務(wù) 利用 ICETEKEDU 實驗箱提供的設(shè)備,設(shè)計模擬實際生活中十字路口交通燈控制的程序。要求如下: 交通燈分紅黃綠三色,東、南、西、北各一組,用燈光 信號實現(xiàn)對交通的控制:綠燈信號表示通行,黃燈表示警告,紅燈禁止通行,燈光閃爍表示信號即將改變。 計時顯示: 8 8點陣顯示兩位計數(shù),為倒計時,每秒改變計數(shù)顯示。 正常交通控制信號順序:正常交通燈信號自動變換 (1)南北方向綠燈,東西紅燈 (10秒 )。 (2)南北方向綠燈閃爍 3 次 ,東西紅燈 (4 秒 )。 (3)南北方向黃燈 ,東西紅燈 (2 秒 )。 (4)南北方向紅燈,東西方向綠燈( 10 秒)。 (5)南北方向紅燈,東西方向綠燈閃 3次 (4 秒 )。 (6)南北方向紅燈,東西方向黃燈( 2秒)。 (7)返回 (1)循環(huán)控制。 功能鍵:( 1)啟動開關(guān) ( 2)急救燈的啟動開關(guān) 緊急情況處理:模仿緊急情況 (重要車隊通過、急救車通過等 )發(fā)生時,交通警察手動控制 (1)當(dāng)任意方向通行剩余時間多于 10秒,將時間改成 10 秒。 (2)正常變換到四面紅燈 (20 秒 )。 ( 3)直接返回正