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

正文內容

基于單片機的交通燈系統(tǒng)設計(編輯修改稿)

2025-02-12 13:29 本頁面
 

【文章內容簡介】 include bit red_green=0,red_yellow=1,green_red=0,yellow_red=0。sbit KEY1=P3^0。sbit KEY2=P3^1。sbit KEY3=P3^2。unsigned char second=55,counts=0,green_time=55,yellow_time=5。//紅燈55s,黃燈5scode unsigned char tab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}。 //共陰數(shù)碼管 09 unsigned char StrTab[4]。 //定義緩沖區(qū)void Delay(unsigned int t){ while(t)。}void time(void) interrupt 1 using 1{ static unsigned char count=0。 TH0=0xd8。//重新賦值,10ms中斷一次 TL0=0xf0。 count++。 if (count==100) { count=0。 second。 //秒減1 if(second==0) { if(red_yellow) { red_yellow=0。green_red=1。 second=yellow_time。 P1=0xf6。//車道紅燈,人行道黃燈,5s } else if(green_red) { green_red=0。yellow_red=1。 second=green_time。 P1=0xed。//車道綠燈,人行道紅燈,55s } else if(yellow_red) { yellow_red=0。red_green=1。 second=yellow_time。 P1=0xf9。//車道黃燈5s,人行道紅燈,5s } else if(red_green) { red_green=0。red_yellow=1。 second=green_time。 P1=0xde。//車道紅燈,人行道綠燈,55s } } }}void Settime(void){ if(!KEY1) //按鍵去抖以及動作 { Delay(10000)。 if(!KEY1) { counts++。 if(counts==3) //設置完成 { counts=0。red_green=0,red_yellow=1,green_red=0,yellow_red=0。//
點擊復制文檔內容
教學教案相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1