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

正文內(nèi)容

基于51單片機(jī)的c語(yǔ)言程序設(shè)計(jì)-展示頁(yè)

2025-07-03 16:36本頁(yè)面
  

【正文】 0x99,0x92,0x82,0xf8,0x80,0x90}。 i=(i+1)%10。 DelayMS(300)。i11。 P0=0x00。t++)。 while(x) for(t=0。}06 單只數(shù)碼管循環(huán)顯示0~9/* 名稱:?jiǎn)沃粩?shù)碼管循環(huán)顯示0~9 說明:主程序中的循環(huán)語(yǔ)句反復(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}。 Operation_Type=1。 if(++Flash_Count!=10) return。 YELLOW_B=~YELLOW_B。 break。 DelayMS(2000)。YELLOW_B=1。GREEN_A=1。 case 3: //東西向紅燈,南北向綠燈亮 RED_A=0。 Operation_Type=3。 if(++Flash_Count!=10) return。 YELLOW_A=~YELLOW_A。 break。 DelayMS(2000)。YELLOW_B=1。GREEN_A=0。}//交通燈切換void Traffic_Light(){ switch(Operation_Type) { case 1: //東西向綠燈與南北向紅燈亮 RED_A=1。i120。 //閃爍次數(shù),操作類型變量//延時(shí)void DelayMS(uint x){ uchar i。sbit GREEN_B=P0^5。sbit RED_B=P0^3。 //東西向燈sbit YELLOW_A=P0^1。 } }}05 LED模擬交通燈/* 名稱:LED模擬交通燈 說明:東西向綠燈亮若干秒,黃燈閃爍5次后紅燈亮, 紅燈亮后,南北向由紅燈變?yōu)榫G燈,若干秒后南北向黃燈閃爍5此后變紅燈,東西向變綠燈,如此重復(fù)。 P2=Pattern_P2[i]。i136。 }}//主程序void main(){ uchar i。i120。//延時(shí)void DelayMS(uint x){ uchar i。 } }}04 花樣流水燈/* 名稱:花樣流水燈 說明:16只LED分兩組按預(yù)設(shè)的多種花樣變換顯示*/includedefine uchar unsigned chardefine uint unsigned intuchar code Pattern_P0[]={ 0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,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, 0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe, 0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe, 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff}。i++) { P2=_cror_(P2,1)。 } for(i=0。i++) { P2=_crol_(P2,1)。 while(1) { for(i=0。 }}//主程序void main(){ uchar i。i120。 }}03 8只LED左右來回點(diǎn)亮/* 名稱:8只LED左右來回點(diǎn)亮 說明:程序利用循環(huán)移位函數(shù)_crol_和_cror_形成來回滾動(dòng)的效果*/includeincludedefine uchar unsigned chardefine uint unsigned int//延時(shí)void DelayMS(uint x){ uchar i。 while(1) { P0=_crol_(P0,1)。i++)。 while(x) { for(i=0。 DelayMS(150)。i++)。 while(x) { for(i=0?;?1單片機(jī)的C語(yǔ)言程序設(shè)計(jì)實(shí)訓(xùn)100例第 01 篇 基礎(chǔ)程序設(shè)計(jì)01 閃爍的LED/* 名稱:閃爍的LED 說明:LED按設(shè)定的時(shí)間間隔閃爍*/includedefine uchar unsigned chardefine uint unsigned intsbit LED=P1^0。//延時(shí)void DelayMS(uint x){ uchar i。i120。 }}//主程序void main(){ while(1) { LED=~LED。 }}02 從左到右的流水燈/* 名稱:從左到右的流水燈 說明:接在P0口的8個(gè)LED從左到右循環(huán)依次點(diǎn)亮,產(chǎn)生走馬燈效果*/includeincludedefine uchar unsigned chardefine uint unsigned int//延時(shí)void DelayMS(uint x){ uchar i。i120。 }}//主程序void main(){ P0=0xfe。 //P0的值向左循環(huán)移動(dòng) DelayMS(150)。 while(x) { for(i=0。i++)。 P2=0x01。i7。 //P2的值向左循環(huán)移動(dòng) DelayMS(150)。i7。 //P2的值向右循環(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}。 while(x) { for(i=0。i++)。 while(1) { //從數(shù)組中讀取數(shù)據(jù)送至P0和P2口顯示 for(i=0。i++) { P0=Pattern_P0[i]。 DelayMS(100)。*/includedefine uchar unsigned chardefine uint unsigned intsbit RED_A=P0^0。sbit GREEN_A=P0^2。 //南北向燈sbit YELLOW_B=P0^4。uchar Flash_Count=0,Operation_Type=1。 while(x) for(i=0。i++)。YELLOW_A=1。 RED_B=0。GREEN_B=1。 Operation_Type=2。 case 2: //東西向黃燈閃爍,綠燈關(guān)閉 DelayMS(300)。GREEN_A=1。 //閃爍5次 Flash_Count=0。 break。YELLOW_A=1。 RED_B=1。GREEN_B=0。 Operation_Type=4。 case 4: //南北向黃燈閃爍5次 DelayMS(300)。GREEN_B=1。 Flash_Count=0。 }}//主程序void main(){ while(1) Traffic_Light()。//延時(shí)void DelayMS(uint x){ uchar t。t120。}//主程序void main(){ uchar i=0。 while(1) { /* for(。i++){ P0=~DSY_CODE[i]。} //注:另一方案 */ P0=~DSY_CODE[i]。 DelayMS(300)。//延時(shí)void DelayMS(uint x){ uchar t。t120。}//主程序void main(){ uchar i,wei=0x80。i8。 //關(guān)閉顯示 wei=_crol_(wei,1)。 //發(fā)送數(shù)字段碼 P2=wei。 } }}08 8只數(shù)碼管動(dòng)態(tài)顯示多個(gè)不同字符電路如上圖/* 名稱:8只數(shù)碼管動(dòng)態(tài)顯示多個(gè)不同字符 說明:數(shù)碼管動(dòng)態(tài)掃描顯示0~7。//延時(shí)void DelayMS(uint x){ uchar t。t120。}//主程序void main(){ uchar i,wei=0x80。i8。 P0=DSY_CODE[i]。 P2=wei。 } }}09 8只數(shù)碼管閃爍顯示數(shù)字串電路如上圖/* 名稱:8只數(shù)碼管閃爍顯示數(shù)字串 說明:數(shù)碼管閃爍顯示由0~7構(gòu)成的一串?dāng)?shù)字 本例用動(dòng)態(tài)刷新法顯示一串?dāng)?shù)字,在停止刷新時(shí)所有數(shù)字顯示消失。//位碼表uchar code DSY_IDX[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80}。 while(x) for(t=0。t++)。 while(1) { for(i=0。i++) { for(j=0。j++) { P0=0xff。 //發(fā)送段碼 P2=DSY_IDX[j]。 } } P2=0x00。 }}10 8只數(shù)碼管滾動(dòng)顯示數(shù)字串電路如上圖/* 名稱:8只數(shù)碼管滾動(dòng)顯示數(shù)字串 說明:數(shù)碼管向左滾動(dòng)顯示3個(gè)字符構(gòu)成的數(shù)字串*/includeincludedefine uchar unsigned chardefine uint unsigned int//段碼表uchar code DSY_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff}。//延時(shí)void DelayMS(uint x){ uchar t。t120。}//主程序void main(){ uchar i,j,k=0,m=0x80。i15。j8。 P0=DSY_CODE[Num[(k+j)%11]]。 P2=m。 } } k=(k+1)%11。 while(x) for(i=0。i++)。0x10)==0) P0=_cror_(P0,1)。0x20)==0) P0=_crol_(P0,1)。0x40)==0) P
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1