【正文】
分成4位的端口,每個(gè)端口包含一個(gè)4位鎖存器。其內(nèi)部還有一個(gè)控制寄存器,即控制口。在編程時(shí),EA/Vpp腳還需加上21V的編程電壓。如EA為低電平,則不管地址大小,一律讀取外部程序存儲(chǔ)器指令。而訪(fǎng)問(wèn)內(nèi)部程序存儲(chǔ)器時(shí),ALE端將有一個(gè)1/6時(shí)鐘頻率的正脈沖信號(hào),這個(gè)信號(hào)可以用于識(shí)別單片機(jī)是否工作,也可以當(dāng)作一個(gè)時(shí)鐘向外輸出。 圖4 復(fù)位圖8051的復(fù)位方式可以是自動(dòng)復(fù)位,也可以是手動(dòng)復(fù)位,見(jiàn)下圖4。RESET由高電平下降為低電平后,系統(tǒng)即從0000H地址開(kāi)始執(zhí)行程序。現(xiàn)在我們對(duì)這些引腳的功能加以說(shuō)明:如圖3 圖3 MCS51引腳說(shuō)明Pin9:RESET/Vpd復(fù)位信號(hào)復(fù)用腳,當(dāng)8051通電,時(shí)鐘電路開(kāi)始工作,在RESET引腳上出現(xiàn)24個(gè)時(shí)鐘周期以上的高電平,系統(tǒng)即初始復(fù)位。下圖是MCS51系列單片機(jī)的內(nèi)部結(jié)構(gòu)示意圖2。單片機(jī)的結(jié)構(gòu)有兩種類(lèi)型,一種是程序存儲(chǔ)器和數(shù)據(jù)存儲(chǔ)器分開(kāi)的形式,即哈佛(Harvard)結(jié)構(gòu),另一種是采用通用計(jì)算機(jī)廣泛使用的程序存儲(chǔ)器與數(shù)據(jù)存儲(chǔ)器合二為一的結(jié)構(gòu),即普林斯頓(Princeton)結(jié)構(gòu)。 圖1 8051內(nèi)部結(jié)構(gòu)中央處理器: 單片機(jī)經(jīng)過(guò)3代的發(fā)展,目前單片機(jī)正朝著高性能和多品種方向發(fā)展,它們的CPU功能在增強(qiáng),內(nèi)部資源在增多,引角的多功能化,以及低電壓低功耗。 通常,單片機(jī)由單塊集成電路芯片構(gòu)成,內(nèi)部包含有計(jì)算機(jī)的基本功能部件:中央處理器、存儲(chǔ)器和I/O接口電路等。2 單片機(jī)概述 單片機(jī)微型計(jì)算機(jī)是微型計(jì)算機(jī)的一個(gè)重要分支,也是頗具生命力的機(jī)種。紅燈是禁行信號(hào),面對(duì)紅燈的車(chē)輛必須在交叉路口的停車(chē)線(xiàn)后停車(chē)。綠燈是通行信號(hào),面對(duì)綠燈的車(chē)輛可以直行,左轉(zhuǎn)彎和右轉(zhuǎn)彎,除非另一種標(biāo)志禁止某一種轉(zhuǎn)向。關(guān)鍵詞:?jiǎn)纹瑱C(jī) 交通燈控制器 接口 安全性Based on the design of the controler of traffic lights of single flat machinewith realizationAbstractIn recent years, along with the science and technology rapid development, the monolithic integrated circuit application unceasingly was moving towards thoroughly, at the same time led the traditional control to change with each new day. In the realtime examination and in the automatic control monolithic integrated circuit application system, the monolithic integrated circuit often is took a core part uses, at the same time unifies the concrete hardware architecture to carry on the correlation the software design, makes up the monolithic integrated circuit in certain aspects insufficiencies This article described to use MCS51 series monolithic integrated circuit Intel8031 and programmable parallel I/O connection chip 8255A design traffic light controller realization method. The article first introduced the monolithic integrated circuit related situation and the developing process, then described the system design to need the chip the basic structure and the performance, in detail discussed the controller software and hardware design and its the realization process, finally embarked from the system secure angle has designed the watchdog control circuit. Keywords: Only flat machine Traffic lights Controler Connection SecurityI 基于單片機(jī)的交通燈控制器的研究與設(shè)計(jì)目 錄摘要 …………………………………………………………………………………IAbstract ………………………………………………………………………………II1 引言 ………………………………………………………………………………12 單片機(jī)概述 ………………………………………………………………………13 芯片的選者與簡(jiǎn)介 ………………………………………………………………1 MCS51芯片簡(jiǎn)介 ……………………………………………………………1 8255芯片簡(jiǎn)介 ………………………………………………………………4 其他器件 ……………………………………………………………………54 控制器硬件的設(shè)計(jì) ……………………………………………………………… 6 ………………………………………………………… 6 ……………………………………………………………… 7 ……………………………………………………………7 …………………………………………………………7 ………………………………………………………………95控制器的軟件設(shè)計(jì) …………………………………………………………………9 ………………………………………………………………… 9 …………………………………………………………… 9 ………………………………………………………………9 …………………………………………………………………… 9