【正文】
基于單片機的交通信號燈模擬控制器的設(shè)計 THE DESIGN OF TRAFFIC LIGHTS’ANALOG CONTROLLER BASED ON SINGLECHIP MICROCOMPUTER ii 摘要 隨著人類科技文明的發(fā)展,人們對于日常交通便利的要求在不斷地提高。交通信號燈已不僅僅被看成一種用來指揮交通的工具, 在很多實際應(yīng)用中它還需要能夠?qū)崿F(xiàn)更多其它功能。本課題設(shè)計正是基于這個方向設(shè)計一個 符合指標(biāo)要求的模擬交通信號燈控制器。 AT89S51 就是 51 系列中的一個比較成熟的型號,它完全兼容 51 單片機的指令。該控制系統(tǒng)包括了按鍵控制電路、定時控制電路、顯示電路等幾部分的組成。主要硬件有: AT89S51 單片機、 16*16 點陣式 LED 顯示屏、七段數(shù)碼管、 LED 和按鍵等。 設(shè)計完成的模擬交通信號燈控制器能夠準(zhǔn)確指揮交通,并具有人工控制功能,實現(xiàn)了人工智能一體化。 關(guān)鍵字: AT89S51; LED 顯示 ; 交通燈 iii Abstract Has analyzed the modern municipal transportation control and the management question present situation, unified the city and countryside transportation the actual situation to elaborate the traffic light control system principle of work, has produced one kind of simple practical city traffic light control system hardware circuit design plan. Along with the social economy development, the municipal transportation question more and more arouses people39。s later periods, these cities constructs the city speedway in abundance, pletes the initial period in the speedway construction ,they also once effectively improved the transportation condition. However, and lacks along with the volume of traffic fast growth to the speedway system research and the control, the speedway not fully plays the anticipated role. But city speedway in structure charact eristic, also had decided the city speedway transportation condition inevitably receives the speedway and the ordinary path coupling place transportation condition restriction. Therefore, how uses the appropriate control method, maximum limit uses the good consumption large amount of money construction the city speedway, alleviates branch with Ramp , the city supports with the peripheral locality transportation stops up the condition, more and more bees the main question which the transportation management and the urban planning department urgently awaits to be solved. There fore, applied the knowledge through me which studied to design a set of traffic lights control circuit traffic light control system mainly by the timing circuit, the host controls the electric circuit, the signal light switch, the pulse signal generating devices posed. Key word: The AT89S51。transportation light I 目錄 第 1 章 緒論 ................................................. 1 引言 ......................................................... 1 課題研究的背景 ............................................... 1 單片機的應(yīng)用與發(fā)展 ..................................... 1 LED 技術(shù)的應(yīng)用 .......................................... 2 交通信號燈的發(fā)展 ....................................... 4 課題研究的 主要內(nèi)容 ........................................... 5 課題研究的目的及意義 ......................................... 6 第 2章 系統(tǒng)總體結(jié)構(gòu)設(shè)計 ..................................... 7 系統(tǒng)總體方案設(shè)計 ............................................. 7 硬件系統(tǒng)中的芯片認(rèn)識 ......................................... 7 AT89S51 芯片簡介 ...................................... 8 8255 芯片簡介 ......................................... 10 74LS164 芯片簡介 ....................................... 11 74LS273 芯片簡介 ....................................... 13 第 3章 系統(tǒng)硬件電路設(shè)計 .................................... 14 單片機控制系統(tǒng)設(shè)計 .......................................... 14 AT89S51 最小系統(tǒng)的設(shè)計 ................................. 14 按鍵控制電路設(shè)計 ............................................ 15 LED 顯示電路設(shè)計 ............................................. 16 LED 結(jié)構(gòu)和參數(shù) ......................................... 16 LED 器件的恒流驅(qū)動方式 ................................. 17 LED 器件的脈沖驅(qū)動方式 ................................. 18 點陣式 LED 顯示屏 ...................................... 18 以單片機為核心的動態(tài)掃描電路設(shè)計 ............................ 19 電源設(shè)計 .................................................... 21 II 第 4章 系統(tǒng)軟件設(shè)計 ........................................ 23 單片機開發(fā)流程 .............................................. 23 KEIL UVISION2 軟件的仿真調(diào)試 ................................... 23 Keil 的介紹 ............................................ 23 Keil uVision2 軟件的操作 ............................... 24 系統(tǒng)軟件設(shè)計程序流程 ........................................ 24 定時電路設(shè)計 .......................................... 26 倒計時電路流程圖設(shè)計 .................................. 28 按鍵電路流程圖設(shè)計 .................................... 29 圖形顯示電路和字形顯示電路流程圖設(shè)計 .................. 29 工作原理分析 ................................................ 30 第 5章 系統(tǒng)設(shè)計總結(jié)與展望 .................................. 32 總結(jié) ........................................................ 32 系統(tǒng)主要特點 ................................................ 33 展望 ........................................................ 33 結(jié)論 ........................................................ 34 致謝 ........................................................ 35 參考文獻 .................................................... 36 附錄一 控制源 程序清單 ...................................... 37 附錄二 電路原理圖 .......................................... 43 1 第 1 章 緒論 引言 隨著科學(xué)技術(shù)發(fā)展的日新月異、不斷發(fā)展,自動化、智能化、功能多樣化越來越成為電氣控制的主流。我國經(jīng)濟的快速發(fā)展,車輛的增多,交通擁擠問題日益嚴(yán)重。我們也應(yīng)當(dāng)適當(dāng)?shù)馗纳菩盘枱舻墓δ?,使其日益完善,滿足現(xiàn)在交通的要求?,F(xiàn)在為了使交通更加流暢,更有秩序,我們可以在以往得基礎(chǔ)上,加上按鍵,用以控制突發(fā)事件和交通擁擠等。 課題研究的背景 單片機的應(yīng)用與發(fā)展 單片機自 1976 年由 Intel 公司推出 MCS48 開始,迄今已有 三 十多年了 , 由于單片機集成度高、功能強、可靠性高、體積 小、功耗地、使用方便、價格低廉等一系列優(yōu)點,目前已經(jīng)滲入到人們工作和生活的方方面面。 單片機有兩種基本結(jié)構(gòu)形式 :一種是在通用微型計算機中廣泛采用的,將程序存儲器和數(shù)據(jù)存儲器合用一個存儲器空間的結(jié)構(gòu),稱為普林斯頓結(jié)構(gòu)。 [1] 20 世紀(jì) 80 年代中期以后, Intel 公司以專利轉(zhuǎn)讓的形式把 8051 內(nèi)核技術(shù)轉(zhuǎn)讓給許多半導(dǎo)體芯片生產(chǎn)廠家,如 ATMEL、 PHILIPS、 ANALOG、 DEVICES、 DALLAS等。這些兼容機與 8051 的系統(tǒng)結(jié)構(gòu)(主要是指令系統(tǒng))相同,采 2 用 CMOS 工藝,因而,常用 80C51 系列來稱呼所有具有 8051 指令系統(tǒng)的單片機,它們對 8051 單片機一般都作了一些擴充,更有特點。 MCS51 系列及 80C51 單片機有多種品種。目前使用的 MCS51系列單片機及其兼容產(chǎn)品通常分成以下幾類:基本型、增強型、低功耗型、專用型、超 8 位型、片內(nèi)閃爍存儲器型。以單片機制成的電子時鐘具有計時準(zhǔn)確,功耗低的優(yōu)點。單片機正處在微控制器的全面發(fā)展階段,各公司的產(chǎn)品在盡量兼容的同時,向高速,強運算能力,尋 址范圍大以及小型廉價方面發(fā)展。單片機正向著功能更強,速度更快,功耗更低,輻射更小的方向發(fā)展。這也是單片機以后發(fā)展的重要趨勢。 從單片機近年的發(fā)展趨