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

正文內(nèi)容

基于51單片機(jī)的c語言程序設(shè)計(jì)(專業(yè)版)

2025-08-05 16:36上一頁面

下一頁面
  

【正文】 while(Key==0)。 j=(j+1)%8。*/includeincludedefine uchar unsigned chardefine uint unsigned int//待顯示圖形編碼uchar code M[][8]={ {0x00,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x00}, //圖1 {0x00,0x38,0x44,0x54,0x44,0x38,0x00,0x00}, //圖2 {0x00,0x20,0x30,0x38,0x3c,0x3e,0x00,0x00} //圖3}。 //從0開始顯示 TMOD=0x00。 TR0=1。 Digits_of_6DSY[0]++。 //50ms定時(shí) TL0=(6553650000)%256。 //因?yàn)橹挥袃晌粩?shù)碼管,計(jì)數(shù)控制在100以內(nèi)(00~99)}//INT0中斷函數(shù)void Clear_Counter() interrupt 0{ Count=0。 計(jì)數(shù)器的清零用外部中斷0控制。 Key_Flag_Idx=0。 switch(Key_Flag_Idx) { case 1: EA=1。 if(++tc0==10) //150ms轉(zhuǎn)換狀態(tài) { tc0=0。 //啟動(dòng)定時(shí)器 while(1) { P1=TH0。 case 1: G1=~G1。sbit G1=P0^1。 }}28 TIMER0控制流水燈 /* 名稱:TIMER0控制流水燈 說明:定時(shí)器控制P0、P2口的LED滾動(dòng)顯示,本例未使用中斷函數(shù)。 Show_Counts()。 } Buffer_Counts[5]=Count_B/100。*/includedefine uchar unsigned chardefine uint unsigned intsbit K3=P3^4。}//主程序void main(){ P0=0x00。 i++。 if(K4==0) Play(4)。sbit K4=P1^7。sbit K1=P1^7。t++)。 }}19 繼電器控制照明設(shè)備/* 名稱:繼電器控制照明設(shè)備 說明:按下K1燈點(diǎn)亮,再次按下時(shí)燈熄滅*/includedefine uchar unsigned chardefine uint unsigned intsbit K1=P1^0。 } BEEP=0。 default:KeyNo=16。//延時(shí)void DelayMS(uint x){ uchar i。 } } } return(1)。i++)。 P1=0xff。 Num_Buffer[2]=Key_Counts/100。 break。i++) { P0=0xff。 case 2: P0=0xf0。i120。sbit K4=P1^3。0x80)==0) P2=_crol_(P2,1)。 P0=DSY_CODE[Num[(k+j)%11]]。 //發(fā)送段碼 P2=DSY_IDX[j]。 P2=wei。 //關(guān)閉顯示 wei=_crol_(wei,1)。 while(1) { /* for(。 Operation_Type=4。 Operation_Type=2。sbit GREEN_A=P0^2。 //P2的值向右循環(huán)移動(dòng) DelayMS(150)。 }}//主程序void main(){ P0=0xfe。i++)。 while(1) { for(i=0。i136。}//交通燈切換void Traffic_Light(){ switch(Operation_Type) { case 1: //東西向綠燈與南北向紅燈亮 RED_A=1。 case 3: //東西向紅燈,南北向綠燈亮 RED_A=0。}06 單只數(shù)碼管循環(huán)顯示0~9/* 名稱:單只數(shù)碼管循環(huán)顯示0~9 說明:主程序中的循環(huán)語句反復(fù)將0~9的段碼送至P0口,使數(shù)字0~9循環(huán)顯示*/includeincludedefine uchar unsigned chardefine uint unsigned intuchar code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff}。 while(x) for(t=0。t++)。}//主程序void main(){ uchar i,j。t++)。} //根據(jù)P1口的按鍵移動(dòng)LEDvoid Move_LED(){ if ((P1amp。 } }}12 K1K4 按鍵狀態(tài)顯示/* 名稱:K1K4 按鍵狀態(tài)顯示 說明:KK2按下時(shí)LED點(diǎn)亮,松開時(shí)熄滅, KK4按下并釋放時(shí)LED點(diǎn)亮,再次按下并釋放時(shí)熄滅;*/includedefine uchar unsigned chardefine uint unsigned intsbit LED1=P0^0。 if(K3==0) { while(K3==0)。 k=0。//延時(shí)void DelayMS(uint x){ uchar i。 P1=0xff。//待顯示的3位緩沖uchar Num_Buffer[]={0,0,0}。 DelayMS(1)。 case 0xfb: Key_Counts=0。k++) //對(duì)4行分別進(jìn)行掃描 { P1=sCode。 else P2_LED=1。break。break。 }}18 開關(guān)控制LED/* 名稱:開關(guān)控制LED 說明:開關(guān)S1和S2分別控制LED1和LED2。 RELAY=~RELAY。 for(i=0。 while(1) { if(K1==1) { Alarm(90)。 DelayMS(t)。 while(SONG_LONG[i]!=0||SONG_TONE[i]!=0) { //播放各個(gè)音符,SONG_LONG為拍子長度 for(j=0。 //獲取3個(gè)數(shù) DSY_Buffer[1]=Count%100/10。//主程序void main(){ LED=1。t++)。 DelayMS(1)。 IE=0x82。 TH0=(6553640000)/256。 IE=0x82。 P0=0xff。 //定時(shí)器1:50ms TL1=(6553650000)%256。bit Key_State。P2=0x3f。 //恢復(fù)定時(shí)器0初值 TL0=(6553650000)%256。 //允許INT0中斷 EA=1。t++)。 if(i==1) Dot=1。uchar i,j=0。 //保持刷新一段時(shí)間 t=0。 //輸出位碼和段碼 P0=~Table_of_Digits[Num_Index*8+i]。 //允許定時(shí)器0、外部0中斷 i=0xff。uint p=0。*/includedefine uchar unsigned chardefine uint unsigned intsbit Key=P1^7。 IT0=1。 //恢復(fù)初值 TL0=(81922000)%32。 j=(j+1)%8。*/includeincludedefine uchar unsigned chardefine uint unsigned int//段碼,最后一位是“”的段碼uchar code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xbf}。 P3=j。 while(ms) for(t=0。 //計(jì)數(shù)值為1 ET0=1。 Key_Event_Handle()。break。*/includedefine uchar unsigned chardefine uint unsigned intsbit K1=P3^7。 //定時(shí)器0:15ms TL0=(6553615000)%256。 } if(++j300) return。 //定時(shí)器0工作方式2 TH0=256200。 TR0=1。 //定時(shí)器0工作方式0 TH0=(81925000)/32。i++) { P2=DSY_Scan_Bits[i]。 while(x) for(t=0。 }}//INT0中斷函數(shù)void EX_INT0() interrupt 0{ Count++。sbit Clear_Key=P3^6。t++)。i100。j++)。 DSY_Buffer[1]=Num/10%10。 RELAY=1。 Pre_KeyNo=KeyNo。break。 Tmp=P1^0x0f。i=KeyNo。 //行掃描碼初值 for(k=0。 case 0xfd: if(Key_Counts0) Key_Counts。 P0=DSY_CODE[Num_Buffer[i]]。 }}15 K1K4 控制數(shù)碼管加減演示/* 名稱:K1K4 控制數(shù)碼管加減演示 說明:按下K1后加1計(jì)數(shù),按下K2后減1計(jì)數(shù),按下K3后清零。 P2=0x00。//位碼uchar code DSY_Index[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}。 if(t!=P1) continue。 while(1) { LED1=K1。 //保存最近按鍵 Move_LED()。i120。 while(x) for(t=0。t120。 while(x) for(t=0。 }}07 8只數(shù)碼管滾動(dòng)顯示單個(gè)數(shù)字/* 名稱:8只數(shù)碼管滾動(dòng)顯示單個(gè)數(shù)字 說明:數(shù)碼管從左到右依次滾動(dòng)顯示0~7,程序通過每次僅循環(huán)選通一只數(shù)碼管*/includeincludedefine uchar unsigned chardefine uint unsigned intuchar code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}。 Operation_Type=1。 Operation_Type=3。i120。 }}//主程序void main(){ uchar i。 }}//主程序void main(){ uchar i。 while(x) { for(i=0。 //P0的值向左循環(huán)移動(dòng) DelayMS(150)。uchar code Pattern_P2[]={ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f,0xff, 0xe7,0xdb,0xbd,0x7e,0xbd,0xdb,0xe7,0xff,0xe7,0xc3,0x81,0x00,0x81,0xc3,0xe7,0xff, 0xaa,0x55,0x18,0xff,0xf0,0x0f,0x00,0xff,0xf8,0xf1,0xe3,0xc7,0x8f,0x1f,0x3f,0x7f, 0x7f,0x3f,0x1f,0x8f,0xc7,0xe3,0xf1,0xf8,0xff,0x00,0x00,0xff,0xff,0x0f,0xf0,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f, 0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00, 0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff}。 //南北向燈sbit YELLOW_B=P0^4。 case 2: //東西向黃燈閃爍,綠燈關(guān)閉 DelayMS(300)。 case 4: //南北向黃燈閃爍5次 DelayMS(300)。i++){ P0=~DSY_CODE[i]。 //發(fā)送數(shù)字段碼
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1