【正文】
《單片機技術(shù)》課程設(shè)計說明書 基于單片機的簡易 交通燈 設(shè)計 院 、 部: 電氣與信息工程 學(xué)院 學(xué)生姓名: 方 掙 掙 指導(dǎo)教師: 桂友超 職稱 講師 專 業(yè): 電子信息工程 班 級: 電子 1004 班 完成時間: 202164 湖南工學(xué)院《單片機課程設(shè)計說明書》 摘 要 對基于單片機的交通燈控制系統(tǒng)進行了設(shè)計。系統(tǒng)功能為:以 MCS51 系列單片機作為控制核心,設(shè)計并制作交通燈控制系統(tǒng),東西南北四個方向具有左拐、右拐、直行及行人 4 種通行指示燈,用計時器顯示路口通行轉(zhuǎn)換剩余時間,在特種車輛如 11 120 通過路口時,系統(tǒng)可轉(zhuǎn)為特種車輛放行,其他車輛禁止通行狀態(tài)。 在對系統(tǒng)功能分析的基礎(chǔ)上,選擇性能較優(yōu)的 LED 動態(tài)循環(huán)顯示方案進行了設(shè)計。設(shè)計包括硬件和軟 件兩大部分。硬件部分包括單片機最小系統(tǒng)、交通燈顯示二部分。選用 Atmel公司的 AT89S52單片機作為控制核心,東西南北四個方向設(shè)置了 LED 時間顯示和交通燈顯示,時間顯示采用二位 LED顯示器,交通燈顯示則采用紅綠黃三種高亮發(fā)光二極管來模擬。軟件采用了模塊化的設(shè)計方法,主要分為主程序、定時器中斷服務(wù)子程序、倒計時顯示子程序、交通燈模擬顯子程序四部分。 關(guān)鍵詞: 單片機; AT89S52; 交通燈 湖南工學(xué)院《單片機課程設(shè)計說明書》 ABSTRACT Traffic light control system based on SCM (Single Chip Microputer) is designed in this paper. System requires that MCS51 series SCM is used as CPU. Traffic light control system should be designed and made .There are four groups light which indicate to turn left, turn right, and go straight ahead and pedestrian access in east, west, north and south four directions. Timer shows traffic conversion remainder time. When special vehicles, such as 119,120 go through, the system can automatically allow special vehicles running and other vehicles is prohibited. Based on analysis of the system functions, three schemes areput forward .By parison, LED dynamic cycle display scheme has better functions and it is selected to be designed. The design includes hardware part and software part. Hardware has three parts .They are SCM system, LED time display, traffic lights. AT89S52 SCM is selected as control CPU. LED display and traffic lights are set in east, west, north and south four directions. Three LED monitors are used to show time. Highlight and redgreen two clor traffic lights are used as traffic lights. Software is designed by module. It is divided into main program, timer interrupting service subroutine, LED display subroutine, traffic display subroutine. Key words: scm; AT89S52 ; traffic light 湖南工學(xué)院《單片機課程設(shè)計說明書》 目 錄 1 設(shè)計課題任務(wù)、功能要求說明及總體方案介紹 .............................................................. 1 設(shè)計課題任務(wù)與功能要求 ..................................................................................... 1 設(shè)計課題總體方案介紹及工作原理說明 ................................................................ 1 2 設(shè)計課題硬件系統(tǒng)的設(shè)計 .............................................................................................. 2 設(shè)計課題硬件系統(tǒng)各模塊功能簡要介紹 ............................................................... 2 主控制系統(tǒng)模塊 ................