【正文】
為綠燈,此道車輛通行;南北方向?yàn)榧t燈,南北道車輛禁止通過(guò),行人通行。選用設(shè)備8031(AT89S52)單片機(jī)一片選用設(shè)備:8031單片機(jī)一片,8255并行通用接口芯片一片,74LS07兩片,MAX692‘看門狗’一片,共陰極的七段數(shù)碼管兩個(gè)雙向晶閘管若干,7805三端穩(wěn)壓電源一個(gè),紅、黃、綠交通燈各兩個(gè),開(kāi)關(guān)鍵盤、連線若干。(4),為1系統(tǒng)就開(kāi)始工作。第五章 控制器的軟件設(shè)計(jì) 每秒鐘的設(shè)定 延時(shí)方法可以有兩種一中是利用MCS51內(nèi)部定時(shí)器才生溢出中斷來(lái)確定1秒的時(shí)間,另一種是采用軟延時(shí)的方法。在方式0時(shí)M為213 ;在方式1時(shí)M的值為216;在方式2和3為28 計(jì)算公式 T=(M-TC)T計(jì)數(shù) 或TC=MT/T計(jì)數(shù) T計(jì)數(shù)是單片機(jī)時(shí)鐘周期TCLK的12倍;TC為定時(shí)初值如單片機(jī)的主脈沖頻率為TCLK12MHZ ,經(jīng)過(guò)12分頻方式0 TMAX=213?。蔽⒚耄椒绞剑薄 MAX=216?。蔽⒚耄健★@然1秒鐘已經(jīng)超過(guò)了計(jì)數(shù)器的最大定時(shí)間,所以我們只有采用定時(shí)器和軟件相結(jié)合的辦法才能解決這個(gè)問(wèn)題. 1秒的方法 我們采用在主程序中設(shè)定一個(gè)初值為20的軟件計(jì)數(shù)器和使T0定時(shí)50毫秒.這樣每當(dāng)T0到50毫秒時(shí)CPU就響應(yīng)它的溢出中斷請(qǐng)求,進(jìn)入他的中斷服務(wù)子程序。初值:TC=MT/ T計(jì)數(shù)=216-50ms/1us=15536=3CBOH ORG 1000HSTART: MOV TMOD, 01H 。開(kāi)T0中斷 SEBT TR0;啟動(dòng)T0計(jì)數(shù)器 MOV RO,14H。 MOV IE, 82H RET1 END 軟件延時(shí) MCS51的工作頻率為212MHZ,我們選用的8031單片機(jī)的工作頻率為6MHZ。 時(shí)間及信號(hào)燈的顯示 8051并行口的擴(kuò)展 8051雖然有4個(gè)8位I/O端口,但真正能提供借用的只有P1口,因?yàn)镻2和P0口通常用于傳送外部傳送地址和數(shù)據(jù),P3口也有它的第二功能。我們用8255并行接口信片來(lái)擴(kuò)展I/O端口。主程序的入口地址 LJMP MAIN 。跳轉(zhuǎn)到中斷服務(wù)程序處 ORG 0013H 。T1計(jì)數(shù)器清零 MOV TL1,00H SETB TR1 。給8255賦初值,8255工作于方式0 MOVX DPTR, A //ST0:MOV P3 ,0F0HAGAIN: JB ,N0 。存入東西方向綠燈初始時(shí)間 MOV R3,A LCALL DISP1 LCALL DELAY AJMP AGAINRED: MOV A,P1 ANL A,7FH 。N0: SETB TR0 。置8255A口,東西方向紅燈亮,南北方向綠燈亮 MOV A,0DDH MOVX DPTR, AN01: JB ,B0N02: SETB CJNE R3,00H,N01 。N13: MOV DPTR,0000H 。N2: MOV R7,00H MOV A,R0 。置8255A口,東西,南北方向黃燈亮 MOV A,0E2H MOVX DPTR,AN31: MOV R4,00H CJNE R4,7DH,$ 。閃爍時(shí)間達(dá)5秒則退出 SJMP N00。報(bào)警 CJNE R2,00H,B01 。判斷延時(shí)是否夠一秒,不夠則調(diào)用顯示子程序 MOV R5,00H 。調(diào)用顯示子程序 RETI 。顯示十位 MOV DPTR,TAB MOVC A,A+DPTR MOV DPTR,0002H MOVX DPTR,A MOV DPTR,0001H MOV A,0F7H MOVX DPTR,A LCALL DELAYDS2: MOV A,7AH 。中斷到100次則清零E1: SJMP N22。顯示個(gè)位 MOV DPTR,TAB MOVC A,A+DPTR MOV DPTR,0002H MOVX DPTR,A MOV DPTR,0001H MOV A,0FBH MOVX DPTR,A LJMP N7。系統(tǒng)不足之處不能控制車的左、右轉(zhuǎn)、以及自動(dòng)根據(jù)車流改變紅綠燈時(shí)間等。 設(shè)計(jì)心得體會(huì) 1.“斷改進(jìn)”是在設(shè)計(jì)程序時(shí),不能妄想一次就將整個(gè)程序設(shè)計(jì)好,反復(fù)修改,不程序設(shè)計(jì)的必經(jīng)之路.,但我們應(yīng)該將每次遇到的問(wèn)題記錄下來(lái),并分析清楚,以免下次再碰到同樣的問(wèn)題. ,我感觸最深的當(dāng)屬查閱大量的設(shè)計(jì)資料了。雖然過(guò)去從未獨(dú)立應(yīng)用過(guò)它們,但在學(xué)習(xí)的過(guò)程中帶著問(wèn)題去學(xué)我發(fā)現(xiàn)效率很高,這是我做這次課程設(shè)計(jì)的又一收獲。t agree with the disciplinary action your employer has taken against youappealeddamagesbased agreement. In England and Wales, your solicitor can39。re clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. s antiracism taskforce, is in London for the Football Association39。opened disciplinary proceedings against CSKAs governing body, has also ordered an immediate investigation into the referee39?;蛟S是愧疚于自己似乎把轉(zhuǎn)瞬即逝的很多個(gè)不同的日子過(guò)成了同一天的樣子;或許是追溯過(guò)去,對(duì)自己那些近乎偏執(zhí)的怪異信念的醒悟,這些天以來(lái),思緒一直很凌亂,在腦海中不斷糾纏。 Junior high school, thought to have a crush on just means that the real growth, but over the past three years later, his writing of alumni in peace, suddenly found that isn39。t remember his appearance. 童年時(shí),覺(jué)得壓歲錢和新衣服是過(guò)年必備,但是隨著年齡的推進(jìn),會(huì)越來(lái)越發(fā)現(xiàn),那些東西根本就可有可無(wú);初中時(shí),以為要有一場(chǎng)暗戀才意味著真正的成長(zhǎng),但三年過(guò)去后,自己心平氣和的寫同學(xué)錄的時(shí)候,突然就發(fā)現(xiàn)是不是真正的成長(zhǎng)了,好像并沒(méi)有那么重要了;然后到了高中,覺(jué)得非要吐露出自己的心聲才能為高中生涯里的懵懂情愫劃上一個(gè)句點(diǎn),但畢業(yè)晚會(huì)的時(shí)候最終還是被梗塞在了咽喉,后來(lái)再次站在他曾經(jīng)揮汗如雨的球場(chǎng),看著他投過(guò)籃球的球框時(shí),突然間發(fā)現(xiàn)自己已經(jīng)想不起他的容顏。想要的,不想要的,界限明確,好像沒(méi)有什么可以撼動(dòng)自己。At the moment, the sky is dark, the air is fresh factor after just rained. Suddenly thought of blue plaid shirt。t start planning... Those years, those days of do, finally, like youth, will end in our life. 此刻,天空是陰暗的,空氣里有著剛下過(guò)雨之后的清新因子。s not needed. Instead, he plans to deploy his 270squarefoot (25squaremeter) main chute at an altitude of around 5,000 feet (1,524 meters).In order to deploy this chute successfully, he will have to slow to 172 mph (277 kph). He will have a reserve parachute that will open automatically if he loses consciousness at mach speeds.Even if everything goes as planned, it won39。Baumgartner the disappointing news: Mission aborted. r plays an important role in this mission. Starting at the ground, conditions have to be very calm winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our daytoday weather lives. It will climb higher than the tip of Mount Everest ( miles/ kilometers), drifting even higher than the cruising altitude of mercial airliners ( miles/ kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause),e can expect a lot of turbulence.The supersonic descent could happen as early as Sunda.The weatheThe balloon will slowly drift to the edge of space at 120,000 feet ( Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.Below, the Earth bees the concrete bottom of a swimming pool that he wants to land on, but not too hard. Still, he39。 From the corner at the beginning of deep friendship。嫌惡過(guò)自己的怯懦,最終卻發(fā)現(xiàn)有很多緣分,有很多錯(cuò)過(guò),好像冥冥之中真的已經(jīng)注定。A person39。 Then in high school, think don39。二十年的人生軌跡深深淺淺,突然就感覺(jué)到有些事情,非做不可了。s plaint. In a statement the Russian side added: We found no racist insults from fans of CSKA.Age has reached the end of the beginning of a word. May be guilty in his seems to passing a lot of different life became the appearance of the same day。City39。s Premier League match at Chelsea on Sunday.I am going to be at the m