【正文】
ntrol of traffic light signal controller design, use 12MHZ crystals and monolithic integrated circuit AT89S52 connections, through software programming method of realization of intersection traffic control. Its input device is a keyboard switch, used to control the traffic operation mode and setting passage of time, display device is two LED seven segment digital tube. Overall by singlechip microputer system, LED display, traffic lights demonstration system, keyboard circuit and control circuit ponent. This system in addition to the basic traffic lights function outside, still have the countdown, emergency, adjust the passage of time and according to the specific circumstances of manual control etc. Function. KEY WORDS AT89S52 SCM, the lights, LED display, keyboard switch circuit. 1 目 錄 摘 要 ..........................................................................................................................................................I ABSTRACT .................................................................................................................................................. II 1 概述 .........................................................................................................................................................1 設(shè)計(jì)背景 .................................................................................................................................1 設(shè)計(jì)目的 .................................................................................................................................1 設(shè)計(jì)要求 .................................................................................................................................1 2 系統(tǒng)總體方案及硬件設(shè)計(jì) ....................................................................................................2 總體方案 ...................................................................................................................................2 各功能模塊設(shè)計(jì) ..................................................................................................................3 單片機(jī) AT89S52 介紹 .....................................................................................................3 設(shè)計(jì)思路 .................................................. 3 時(shí)鐘電路模塊 ....................................................................................................................4 復(fù)位電路模塊 ....................................................................................................................5 交通燈演示模塊 ...............................................................................................................5 LED 顯示模塊 .............................................. 6 鍵盤(pán)開(kāi)關(guān)模塊 ....................................................................................................................7 3 軟件設(shè)計(jì) .............................................................................................................................................9 系統(tǒng)流程圖 .............................................................................................................................9 系統(tǒng)軟件設(shè)計(jì) ..................................................................................................................... 10 LED 的編程 ........................................................................................................................ 10 交通燈模塊的編寫(xiě)設(shè)計(jì) ................................................................................................11 定時(shí)器程序 .......................................................................................................................11 2 鍵盤(pán)程序 ........................................................................................................................... 12 4 PROTEUS 仿真 ................................................................................................................................ 13 正常工作狀態(tài) ..................................................................................................................... 14 時(shí)間調(diào)整 ................................................................................................................................ 16 狀態(tài)調(diào)整 ................................................................................................................................ 18 結(jié) 論 ...................................................................................................................................................... 19 致 謝 ...................................................................................................................................................... 20 參考文獻(xiàn) ................................................................................................................................................ 21 附 錄 ...................................................................................................................................................... 22 附錄 1 系統(tǒng)原理圖 ................................................................................................................... 22 附錄 2 源程序代碼 ................................................................................................................. 23 1 1 概述 設(shè)計(jì)背景 在車(chē)輛日漸增多的今天,人們也越來(lái)越關(guān)注交通問(wèn)題,而交通燈在安全行車(chē)過(guò)程中無(wú)疑起著十分重要的作用??傮w由單片機(jī)系統(tǒng)、 LED 顯示、交通燈演示系統(tǒng)、鍵盤(pán)電路及其控制電路組成。 本科畢業(yè)論文(設(shè)計(jì)) 題 目 交通燈信號(hào)控制器設(shè)計(jì) 指導(dǎo)老師 職稱(chēng) 副教授 學(xué)生姓名 學(xué)號(hào) 專(zhuān) 業(yè) 電子信息工程 班級(jí) 電信 (1)班 院 (系 ) 電子信息工程學(xué)院 完成時(shí)間 2021年 04 月 12 日 I 交通燈信號(hào)控制器設(shè)計(jì) 摘 要 本設(shè)計(jì)是單片機(jī)控制的交通燈信號(hào)控制器設(shè)計(jì),使用 12MHZ 晶振與單片機(jī) AT89S52相連接 ,通過(guò)軟件編程的方法實(shí)現(xiàn)十字路口的交通燈控制。其輸入裝置是鍵盤(pán)開(kāi)關(guān),用于控制交通燈的運(yùn)行模式以及設(shè)置通行時(shí)間,顯示裝置是兩位的 LED 七段數(shù)碼管。該系統(tǒng)除基本交通燈功能外,還具有倒計(jì)時(shí)、緊急情況處理、調(diào)整通行時(shí)間以及根據(jù)具體情況手動(dòng)控制等功能?,F(xiàn)在交通燈一般都設(shè)在十字路口,用紅、綠、黃三種顏色的指示燈和一個(gè)倒計(jì)時(shí)的顯示計(jì)時(shí)器來(lái)