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

正文內容

模擬路燈控制系統(tǒng)課程設計-資料下載頁

2025-06-02 23:48本頁面
  

【正文】 制采用 PWM 方式。通過全面調試,系統(tǒng)各項性能指標都 到達了題目要求 。 最后,請尊敬的各位老師和親愛的同學們對論文和今后的研究工作提出寶貴的指導意見和建議。 模擬 路燈控制系統(tǒng) 31 致謝 模擬 路燈控制系統(tǒng) 32 參考文獻 [1] 馬忠梅 .單片機的 C 語言應用程序設計 .北京航空航天大學出版社 ,2021 [2] 胡宴如 .模擬電子技術 .高等教育出版社 ,2021 [3] 謝文和 .傳感技術及其應用 .高等教育出版社 , 2021 [4]周立功 .單片機實驗與實踐 .北京:北京航空航天大學出版社 [5]閻石 .數字電子技術基礎 .北京:高等教育出版社, 2021 [6]譚浩強 .C 程序設計 .北京 :清華大學出版社 ,2021 年 . [7]侯振鵬 .嵌入式 C 語言程序設計 .北京:人民郵電出版社, 2021. [8]李光飛 李良兒 .單片機 C 程序設計 .北京:北京航空航天大學出版社, 2021 [9]王港元 .電工電子實踐指導 .江西 :江西科學技術出版社 ,2021 年 [10]何立民 .《單片機中級教程 —— 原理與應用》 .北京航空航天大學出版社 .2021 [11]趙亮等 .《 單片機 C 語言編程與實例》 .人民郵電出版社 .2021 [12]沙占友等 .《單片機外圍電路設計》 .電子工業(yè)出版社 .2021 [13]姜志海 .《單片機原理及應用》 .電子工業(yè)出版社 .2021 模擬 路燈控制系統(tǒng) 33 附件一 實物圖 模擬 路燈控制系統(tǒng) 34 附件二 系統(tǒng)原理圖 模擬 路燈控制系統(tǒng) 35 附件三 系統(tǒng) PCB 圖 模擬 路燈控制系統(tǒng) 36 附件四 系統(tǒng)程序 include include sbit beep = P2^0。 sbit light1 = P1^0。 sbit light2 = P1^1。 sbit signal1 = P3^5。 sbit signal2 = P3^6。 sbit signal3 = P3^7。 sbit ligres = P3^2。 sbit ligres1 = P3^3。 sbit ligres2 = P3^4。 sbit keyset = P2^4。 sbit keyadd = P2^3。 sbit keysub = P2^2。 unsigned char hour=23,min=59,sec=58,temp=0。 unsigned char flag_l=0,flag_r=0。 void init(void)。 void display(void)。 void settime(void)。 void control(void)。 void main() { init()。 while(1) { settime()。 control()。 模擬 路燈控制系統(tǒng) 37 GotoXY(8,1)。 LCD_Write(1,flag_l%10+0x30)。 LCD_Write(1,flag_r%10+0x30)。 } } void timer0() interrupt 1 /*定時器中斷 50ms*/ { TH0=(6553650000)/256。 TL0=(6553650000)%256。 if(temp++ 18) { temp = 0。 if(sec++ 58) { sec = 0。 if(min++ 58) { min = 0。 if(hour++ 22) hour = 0。 } } } display()。 } void init(void) /*定時器初始化函數 */ { TMOD = 0x01。 //T0 TH0 = (6553650000)/256。 TL0 = (6553650000)%256。 模擬 路燈控制系統(tǒng) 38 EA = 1。 ET0 = 1。 TR0 = 1。 LCD_Initial()。 GotoXY(0,0)。 Print(NOW:)。 GotoXY(0,1)。 Print(error:)。 } void display(void) { unsigned char t=0,t1=0,t2=0。 GotoXY(4,0)。 LCD_Write(1,hour/10+0x30)。 LCD_Write(1,hour%10+0x30)。 LCD_Write(1,39。:39。)。 LCD_Write(1,min/10+0x30)。 LCD_Write(1,min%10+0x30)。 LCD_Write(1,39。:39。)。 LCD_Write(1,sec/10+0x30)。 LCD_Write(1,sec%10+0x30)。 if(keyadd==0) { if(signal1==0) t=0。 else t=1。 if(signal2==0) t1=0。 else t1=1。 if(signal3==0) t2=0。 else t2=1。 GotoXY(13,1)。 LCD_Write(1,t+0x30)。 LCD_Write(1,t1+0x30)。 LCD_Write(1,t2+0x30)。 模擬 路燈控制系統(tǒng) 39 } else if(keysub==0) { if(ligres==0) t=0。 else t=1。 if(ligres1==0) t1=0。 else t1=1。 if(ligres2==0) t2=0。 else t2=1。 GotoXY(13,1)。 LCD_Write(1,t+0x30)。 LCD_Write(1,t1+0x30)。 LCD_Write(1,t2+0x30)。 } else { GotoXY(13,1)。 Print( )。 } } void settime(void) { unsigned char num=0。 if(keyset==0) { while(keyset==0)。 delay(9000)。 GotoXY(15,0)。 LCD_Write(1,39。m39。)。 while(num==0) //set min { if(keyadd==0) {while(keyadd==0)。if(min59) min++。} else if(keysub==0) {while(keysub==0)。if(min0) min。} 模擬 路燈控制系統(tǒng) 40 else if(keyset==0) {while(keyset==0)。delay(9000)。num++。} } GotoXY(15,0)。 LCD_Write(1,39。h39。)。 while(num==1) //set hour { if(keyadd==0) {while(keyadd==0)。if(hour23) hour++。} else if(keysub==0) {while(keysub==0)。if(hour0) hour。} else if(keyset==0) {while(keyset==0)。num++。} } GotoXY(15,0)。 Print( )。 } } void control(void) { if(ligres==0) //如果光線暗 { if(light1==0 amp。amp。 light2==0) //判斷左右方向 { if(signal1==0) flag_l=1。 else if(signal3==0) flag_r=1。 } if(flag_l==1) //如果人從左邊來 { if(signal1==0) //如果有人 { light1 = 0。 //開燈 light2 = 1。 //關燈 GotoXY(6,1)。 模擬 路燈控制系統(tǒng) 41 if(ligres1==0) //故障 { beep = 0。 LCD_Write(1,1+0x30)。 } else { LCD_Write(1,39。n39。)。 beep = 1。 } } else if(signal2==0) { light2 = 0。 light1 = 1。 GotoXY(7,1)。 if(ligres2==0) { beep = 0。 LCD_Write(1,2+0x30)。 } else { LCD_Write(1,39。n39。)。 beep = 1。 } } else if(signal3==0) { light2 = 1。 light1 = 1。 flag_l = 0。 flag_r = 0。 } 模擬 路燈控制系統(tǒng) 42 } if(flag_r==1) //如果人從右邊來 { if(signal3==0) //如果有人 { light2 = 0。 //開燈 light1 = 1。 //關燈 GotoXY(6,1)。 if(ligres2==0) //故障 { beep = 0。 LCD_Write(2,1+0x30)。 } else { LCD_Write(1,39。n39。)。 beep = 1。 } } else if(signal2==0) { light1 = 0。 light2 = 1。 GotoXY(7,1)。 if(ligres1==0) { beep = 0。 LCD_Write(1,1+0x30)。 } else { LCD_Write(1,39。n39。)。 模擬 路燈控制系統(tǒng) 43 beep = 1。 } } else if(signal1==0) { light1 = 1。 light2 = 1。 flag_l = 0。 flag_r = 0。 } } } }
點擊復制文檔內容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1