【正文】
圖 書 分類號(hào): 密 級(jí): 畢業(yè)論文 基于 8051 單片機(jī)交通燈控制系統(tǒng)的設(shè)計(jì) BASEDON THE 8051 MICROCONTROLLER TRAFFIC SIGNAL CONTROL DESIGN 學(xué)生學(xué)號(hào) 學(xué)生姓名 學(xué)院名稱 信電工程學(xué)院 專業(yè)名稱 電子信息工程技術(shù) 指導(dǎo)教師 2022 年 5 月 20 日 徐州工程學(xué)院畢業(yè) 論文 I 摘 要 近年來(lái)隨著科技的飛速發(fā)展,單片機(jī)的應(yīng)用正在不斷深入,同時(shí)帶動(dòng)傳統(tǒng)控制檢測(cè) 技術(shù)日益更新 。在實(shí)時(shí)檢測(cè)和自動(dòng)控制的單片機(jī)應(yīng)用系統(tǒng)中, 單片機(jī)往往作為一個(gè)核心部件來(lái)使用,僅單片機(jī)方面知識(shí)是不夠的,還應(yīng)根據(jù)具體硬件結(jié)構(gòu)軟 硬 件結(jié)合,加以完善。 十字路口車輛 穿梭 ,行人熙攘,車行車道,人行人道,有條不紊。那么靠什么來(lái)實(shí)現(xiàn)這井然秩序呢?靠的 就 是交通信號(hào)燈的自動(dòng)指揮系統(tǒng)。交通信號(hào)燈控制方式很多。本系統(tǒng)采用 MSC51系列單片機(jī) ATSC51和可編程并行 I/O 接口芯片 8255A為中心器件來(lái)設(shè)計(jì)交通燈控制器,實(shí)現(xiàn)了能根據(jù)實(shí)際車流量通過(guò) 8051芯片的 P1口設(shè)置紅、綠燈燃亮?xí)r間的功能 ;紅綠燈循環(huán)點(diǎn)亮,倒計(jì)時(shí)剩 5 秒時(shí)黃燈閃爍警示( 交通燈信號(hào)通過(guò) PA 口輸出 , 顯示時(shí)間直接通過(guò) 8255 的 PC 口 輸出 至雙位數(shù)碼管) ; 車輛闖紅燈報(bào)警;綠燈時(shí)間可檢測(cè)車流量并可通過(guò)雙位數(shù)碼管顯示。本 系統(tǒng) 實(shí)用性強(qiáng) 、 操作簡(jiǎn)單 、擴(kuò)展 功能 強(qiáng) 。 關(guān)鍵詞 單片機(jī);交通燈; 8051;檢測(cè)車流量 徐州工程學(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 芯片簡(jiǎn)介 ..................................................................................................................................... 4 MCS51芯片簡(jiǎn)介 ................................................................................................................. 4 中斷系 統(tǒng) .............................................................................................................................. 5 時(shí)鐘電路 .............................................................................................................................. 5 8255芯片簡(jiǎn)介 ..................................................................................................................... 7 4系統(tǒng)硬件設(shè)計(jì) .............................................................................................................................. 9 ........................................................................................................... 9 ............................................................................................................ 9 (見附錄 2) ................................................................................... 10 .............................................................................................................. 10 5控制器的軟件設(shè)計(jì) ................................................................................................................... 11 ................................................................................................................. 11 計(jì)數(shù)器初值計(jì)算 ......................................................................................................... 11 1秒的方法 ................................................................................................................. 11 相應(yīng)程序代碼 ............................................................................................................. 11 軟件延時(shí) ............................................................................................................................ 12 時(shí)間及信號(hào)燈的顯示 ........................................................................................................ 12 8051并行口的擴(kuò)展 .................................................................................................... 12 顯示原理 ..................................................................................................................... 12 8255輸出信號(hào)與數(shù)碼管的連接 ................................................................................ 13 8255與 8051 的連接 .................................................................................................. 13 程序設(shè)計(jì) ............................................................................................................................ 14 6 結(jié)論 ........................................................................................................................................... 16 致謝 ............................................................................................................................................... 17 參考文獻(xiàn) .................................................