【正文】
圖 書 分類號: 密 級: 畢業(yè)論文 基于 8051 單片機(jī)交通燈控制系統(tǒng)的設(shè)計 BASEDON THE 8051 MICROCONTROLLER TRAFFIC SIGNAL CONTROL DESIGN 學(xué)生學(xué)號 學(xué)生姓名 學(xué)院名稱 信電工程學(xué)院 專業(yè)名稱 電子信息工程技術(shù) 指導(dǎo)教師 2022 年 5 月 20 日 徐州工程學(xué)院畢業(yè) 論文 I 摘 要 近年來隨著科技的飛速發(fā)展,單片機(jī)的應(yīng)用正在不斷深入,同時帶動傳統(tǒng)控制檢測 技術(shù)日益更新 。在實(shí)時檢測和自動控制的單片機(jī)應(yīng)用系統(tǒng)中, 單片機(jī)往往作為一個核心部件來使用,僅單片機(jī)方面知識是不夠的,還應(yīng)根據(jù)具體硬件結(jié)構(gòu)軟 硬 件結(jié)合,加以完善。 十字路口車輛 穿梭 ,行人熙攘,車行車道,人行人道,有條不紊。那么靠什么來實(shí)現(xiàn)這井然秩序呢?靠的 就 是交通信號燈的自動指揮系統(tǒng)。交通信號燈控制方式很多。本系統(tǒng)采用 MSC51系列單片機(jī) ATSC51和可編程并行 I/O 接口芯片 8255A為中心器件來設(shè)計交通燈控制器,實(shí)現(xiàn)了能根據(jù)實(shí)際車流量通過 8051芯片的 P1口設(shè)置紅、綠燈燃亮?xí)r間的功能 ;紅綠燈循環(huán)點(diǎn)亮,倒計時剩 5 秒時黃燈閃爍警示( 交通燈信號通過 PA 口輸出 , 顯示時間直接通過 8255 的 PC 口 輸出 至雙位數(shù)碼管) ; 車輛闖紅燈報警;綠燈時間可檢測車流量并可通過雙位數(shù)碼管顯示。本 系統(tǒng) 實(shí)用性強(qiáng) 、 操作簡單 、擴(kuò)展 功能 強(qiáng) 。 關(guān)鍵詞 單片機(jī);交通燈; 8051;檢測車流量 徐州工程學(xué)院畢業(yè) 論文 II Abstract In recent years, with the rapid development of science and technology, the application of SCM is at the same time, traditional detection techniques to control the growing update. In realtime detection and automatic control system of singlechip applications, often as a singlechip core ponent to use only singlechip is not enough knowledge, but also the structure of hardware and software in accordance with the specific bination of hardware, to be improved. Crossroads shuttle vehicles, pedestrians bustling, car lanes, the pavement and orderly. So to achieve the orderly what order? Is the traffic lights on the automatic control system. Many traffic lights control. The system uses MSC51 series singlechip ATSC51 and programmable parallel I / O interface chip 8255Acentric device designed to control traffic lights, can be achieved in accordance with the actual traffic flow through the P1 port 8051 chip set red, green fuel Liang function of time。 traffic light cycle, the countdown five seconds left when the yellow light flashing warning (traffic lights through the PA output signal indicates the time directly through the PC port output 8255 to doubledigits)。 vehicle alarm。 green time traffic flow can be detected through a doubledigital display. The system practical, simple and strong extensions. Key words Singlechip detection of traffic lights red light running traffic徐州工程學(xué)院畢業(yè) 論文 I 目 錄 1 緒論 ............................................................................................................................................. 1 2 單片機(jī)的發(fā)展及應(yīng)用 ................................................................................................................. 2 單片機(jī)的發(fā)展 ...................................................................................................................... 2 單片機(jī)的應(yīng)用 ...................................................................................................................... 2 3 芯片簡介 ..................................................................................................................................... 4 MCS51芯片簡介 ................................................................................................................. 4 中斷系 統(tǒng) .............................................................................................................................. 5 時鐘電路 .............................................................................................................................. 5 8255芯片簡介 ..................................................................................................................... 7 4系統(tǒng)硬件設(shè)計 .............................................................................................................................. 9 ........................................................................................................... 9 ............................................................................................................ 9 (見附錄 2) ................................................................................... 10 .............................................................................................................. 10 5控制器的軟件設(shè)計 ................................................................................................................... 11 ................................................................................................................. 11 計數(shù)器初值計算 ......................................................................................................... 11 1秒的方法 ................................................................................................................. 11 相應(yīng)程序代碼 ............................................................................................................. 11 軟件延時 ............................................................................................................................ 12 時間及信號燈的顯示 ........................................................................................................ 12 8051并行口的擴(kuò)展 .................................................................................................... 12 顯示原理 ..................................................................................................................... 12 8255輸出信號與數(shù)碼管的連接 ................................................................................ 13 8255與 8051 的連接 .................................................................................................. 13 程序設(shè)計 ............................................................................................................................ 14 6 結(jié)論 ........................................................................................................................................... 16 致謝 ............................................................................................................................................... 17 參考文獻(xiàn) .................................................