【正文】
統(tǒng)程序清單 ................. 錯(cuò)誤 !未定義書簽。 課題設(shè)計(jì)內(nèi)容 ..................................................................................................... 1 2 系統(tǒng)設(shè)計(jì) ................................................................................................................. 2 設(shè)計(jì)方案論證 ..................................................................................................... 2 系統(tǒng)硬件設(shè)計(jì) ................................................................................................... 3 控制模塊 .......................................................................................................... 5 通行燈顯示模塊 .............................................................................................. 6 時(shí)間顯示模塊 .................................................................................................. 7 電源電路 .......................................................................................................... 7 單片機(jī)概述 ....................................................................................................... 8 硬件電路中器件選擇 ....................................................................................... 9 系統(tǒng)軟件的設(shè)計(jì) ............................................................................................... 15 主程序 ............................................................................................................ 15 定時(shí)中斷服務(wù)程序 ...................................................................................... 15 特種車 中斷服務(wù)程序 .................................................................................... 17 算法分析 ........................................................................................................ 18 3 系統(tǒng)調(diào)試 .............................................................................................................. 19 硬件調(diào)試 .......................................................................................................... 19 靜態(tài)檢查 ...................................................................................................... 19 通電檢查 ...................................................................................................... 20 軟件調(diào)試及軟硬件聯(lián)調(diào) .................................................................................... 20 仿真器選擇 ..................................................................................................... 20 仿真過(guò)程 ......................................................................................................... 20 通行燈輸出調(diào)試 ............................................................................................. 22 時(shí)間顯示模塊調(diào)試 ......................................................................................... 23 特種車中斷程序調(diào)試 ..................................................................................... 24 脫機(jī)調(diào)試 ......................................................................................................... 24 實(shí)驗(yàn)結(jié)果 ......................................................................................................... 24 4 結(jié) 束 語(yǔ) ................................................................................. 錯(cuò)誤 !未定義書簽。 1 概 述 .................................................................................... 錯(cuò)誤 !未定義書簽。 在實(shí)驗(yàn)板上制作了基于單片機(jī)的交通燈控制系統(tǒng) 樣機(jī) ,對(duì)硬件和軟件部分 分別進(jìn)行了調(diào)試,再進(jìn)行了軟硬件聯(lián)調(diào) , 得到 的 交通燈控制系統(tǒng) 樣機(jī) 實(shí)物 ,可圓滿地完成畢業(yè)設(shè)計(jì)任務(wù)書所要求的功能。選用 Atmel 公司的 AT89S52 單片機(jī)作為控制 核心 , 東西南北四個(gè) 方向設(shè)置了 LED 時(shí)間 顯示和交通燈 顯 示 , 時(shí)間顯示采用三位 LED 顯示器,交通燈 顯示則 采 用紅綠雙色高亮發(fā)光二極管來(lái)模擬。 設(shè)計(jì)包括硬件和軟件兩大部分。 系統(tǒng)功能為: 以 MCS51 系列單片機(jī) 作 為控制核心,設(shè)計(jì)并制作交通燈控制系統(tǒng) , 東西 南北四個(gè)方向具有左拐、右拐、直行及行人 4 種通行指示燈, 用 計(jì)時(shí)器顯示路口通行轉(zhuǎn)換剩余時(shí)間 , 在特種車輛如 11 120 通過(guò)路口時(shí),系統(tǒng)可自動(dòng)轉(zhuǎn)為特種車輛放行,其他車輛禁止通行狀態(tài)。 實(shí)現(xiàn)了通過(guò) AT89S52 芯片的 P1 口設(shè)置紅、綠燈點(diǎn) 亮的功能 ,通過(guò) AT89S51 芯片的 RXD、 TXD 輸入、 輸出 設(shè)置 顯示時(shí)間 。 交通燈的單片機(jī)控制設(shè)計(jì) 摘 要 :交通燈安裝在各個(gè)路口上,成為疏導(dǎo)交通工具有效的手段,單片機(jī)是微型計(jì)算機(jī)的一個(gè)重要分支,特別適用于控制領(lǐng)域,故又稱為微控制器, 對(duì)基于單片機(jī)的交通燈控制系統(tǒng)進(jìn)行了設(shè)計(jì) 。本 系統(tǒng) 采用 美國(guó) ATMEL 公司生產(chǎn)的 單片機(jī) AT89S52,以及其它芯片來(lái) 設(shè)計(jì)交通燈控制 。單片機(jī)系統(tǒng)采用的直流供電。 在對(duì)系統(tǒng)功能分析的基礎(chǔ)上,提出了三種 設(shè)計(jì) 方案,經(jīng)比較,選擇性能較優(yōu)的LED 動(dòng)態(tài)循環(huán)顯示方案進(jìn)行了設(shè)計(jì)。 硬件 部分 包括單片機(jī)最小系統(tǒng)、 時(shí)間顯示、交通燈顯 示三部分。 軟件采用了模塊化的設(shè)計(jì)方法 ,主要 分為主程序 、 定時(shí)器中斷服務(wù) 子 程序 、 倒計(jì)時(shí)顯示子程序 、 交通燈 模擬 顯示子程序 四 部分。 關(guān)鍵詞 : 交通燈 ; 單片機(jī); AT89S52 Design of traffic light control system based on SCM 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 are put 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 color 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. The model of traffic lights control system is made in experiment board. Hardware and software is debugged respectively, then hardware and software are bined and debugged .The model of traffic lights control system can meet the requirement of design task book perfectly. Key words: Traffic light; SCM; AT89S52 目 錄 交通燈的單片機(jī)控制設(shè)計(jì) ........................................................ 錯(cuò)誤 !未定義書簽。 課題研究背景與意義 ..