freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于單片機的交通燈控制設(shè)計-資料下載頁

2024-10-24 18:21本頁面

【導(dǎo)讀】當(dāng)今時代是一個自動化時代,交通燈控制等很多行業(yè)的設(shè)備都與計算機密切相關(guān)。好的交通燈控制系統(tǒng),將給道路擁擠、違章控制等方面給予技術(shù)革新。十字路口車輛穿梭,行人熙。攘,車行車道,人行人道,有條不紊??康氖墙煌ㄐ盘枱舻淖詣?。智能的交通信號燈指揮著人和各種車輛的安全運行,實現(xiàn)紅、黃、綠燈的自動指揮是城。鄉(xiāng)交通管理現(xiàn)代化的重要課題?;顒哟蛳乱欢ǖ幕A(chǔ)。根據(jù)設(shè)計要求,以AT89S51單片機為控制核心,模擬交通燈運行規(guī)則與時間。其中控制系統(tǒng)已給定,使。用AT89S51單片機系統(tǒng),下面進(jìn)行燈具模塊,顯示系統(tǒng),中斷系統(tǒng),電源驅(qū)動方案比較。方案三控制容易,功耗低,安全,綜合考慮采用方案三。方案二:應(yīng)用24個燈,取消備用等的模擬;

  

【正文】 zhi=ON。 EWYzuo=ON。 display1(deng/10,deng%10)。 display2(deng/10,deng%10)。 } 3 NSYzhi=OFF。 NSYzuo=OFF。 EWYzhi=OFF。 EWYzuo=OFF。 } void ISRT1(void) interrupt 3//定時器中斷程序 { TH1=(65536time)/256。//重新置記數(shù)初值 TL1=(65536time)%256。 C50ms++。 if(C50ms19) { deng。 A。b。C。D。E。F。 G。H。I。J。K。L。 C50ms=0。 } } void my_int0(void) interrupt 0 using 1//INT0 中斷子程序 { unsigned save1=P0。 unsigned save2=P2。 while(zhongduan==0) { P1=0x40。 Ashiwei=ON。 Agewei=ON。 Bshiwei=ON。 Bgewei=ON。 NSGzhi=OFF。 NSYzhi=OFF。 NSRzhi=ON。 NSGzuo=OFF。 NSYzuo=OFF。 NSRzuo=ON。 EWGzhi=OFF。 EWYzhi=OFF。 EWRzhi=ON 。 EWGzuo=OFF。 EWYzuo=OFF。 EWRzuo=ON。 } P0=save1。 P2=save2。 } void Delay10uS(uchar second) { int i。 while((second)!=0) 4 { for(i=0。i3。i++){。} } } void display1(uchar num1,uchar num2)//東西路口顯示 { P1=discode[num1]。 Ashiwei=ON。 Delay10uS(1)。 Ashiwei=OFF。 P1=discode[num2]。 Agewei=ON。 Delay10uS(1)。 Agewei=OFF。 } void display2(uchar num3,uchar num4)//南北路口顯示 { P1=discode[num3]。 Bshiwei=ON。 Delay10uS(1)。 Bshiwei=OFF。 P1=discode[num4]。 Bgewei=ON。 Delay10uS(1)。 Bgewei=OFF。 } void dongxizhixing() { while(A!=0)//東西向直行 { NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWGzhi=ON。 display1(A/10,A%10)。 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWGzhi=OFF。 while(b!=0)//黃燈等待 { NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWYzhi=ON。 display1(b/10,b%10)。 5 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWYzhi=OFF。 while(C!=0)//全紅等待已過線車通過 {NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(C/10,C%10)。 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 } void dongxizuoxing() { while(D!=0)//東西向左行 { NSRzhi=ON。 NSRzuo=ON。 EWGzuo=ON。 EWRzhi=ON。 display1(D/10,D%10)。 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWGzuo=OFF。 EWRzhi=OFF。 while(E!=0)//黃燈等待 { NSRzhi=ON。 NSRzuo=ON。 EWYzuo=ON。 EWRzhi=ON。 display1(E/10,E%10)。 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWYzuo=OFF。 6 EWRzhi=OFF。 while(F!=0)//全紅等待已過線車通過 { NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(F/10,F%10)。 display2(F/10,F%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 } void nanbeizhixing() { while(G!=0)//南北向直行 { NSGzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(L/10,L%10)。 display2(G/10,G%10)。 } NSGzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 while(H!=0)//黃燈等待 { NSYzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(L/10,L%10)。 display2(H/10,H%10)。 } NSYzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 while(I!=0)//全紅等待已過線車通過 { NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 7 EWRzhi=ON。 display1(L/10,L%10)。 display2(I/10,I%10)。 } NSRzhi=OFF。 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 } void nanbeizuoxing() { while(J!=0)//南北向左行 { NSRzhi=ON。 NSGzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(L/10,L%10)。 display2(J/10,J%10)。 } NSRzhi=OFF。 NSGzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 while(K!=0)//黃燈等待 { NSRzhi=ON。 NSYzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(L/10,L%10)。 display2(K/10,K%10)。 } NSRzhi=OFF。 NSYzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 while(L!=0)//全紅等待已過線車通過 { NSRzhi=ON。 NSRzuo=ON。 EWRzuo=ON。 EWRzhi=ON。 display1(L/10,L%10)。 display2(L/10,L%10)。 } NSRzhi=OFF。 8 NSRzuo=OFF。 EWRzuo=OFF。 EWRzhi=OFF。 } main() { P0=0xff。 P2=0xff。 Initial()。 while(1) { dongxizhixing()。 dongxizuoxing()。 nanbeizhixing()。 nanbeizuoxing()。 A=43,b=46,C=51,D=83,E=86,F=91,G=129,H=132,I=137,J=164,K=167,L=172。//重新賦及時值 } } 附錄三:元器件清單 序號 元器件 數(shù)目 1 AT89S51 單片機 1 2 DIP40 插座 1 3 30pF 電容 2 4 12M 晶振 1 5 按鍵開關(guān) 1 6 10uF 電容 1 7 560 歐電阻 12 8 黃色 led 燈 4 9 紅色 led 燈 5 10 綠色 led 燈 4 11 4位 8 段數(shù)碼管 1 12 六角開關(guān) 1 13 排針 1
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1