中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 用C語(yǔ)言實(shí)現(xiàn)鍵控彩燈系統(tǒng)

        用C語(yǔ)言實(shí)現(xiàn)鍵控彩燈系統(tǒng)

        作者: 時(shí)間:2012-08-22 來(lái)源:網(wǎng)絡(luò) 收藏

        源程序:

        #include     "reg51.h"#define   uchar  unsigned  charuchar   flag;uchar   light,assum;void  delay05s(){unsigned  char   i,j,k;for(i=5;i>0;i--)for(j=200;j>0;j--)for(k=250;k>0;k--);}void   delay10ms(void){unsigned   char  i,j;for(i=20;i>0;i--)for(j=250;j>0;j--)} void   left(){light=light1;if(light==1)  light=0x01;P2=~light;}void  right(){light=light>>1;if(light==0)  light=0x80;P2=~light;}void  assum(){uchar  code  dispcode[8]={0x7e,0xbd.0xdb,0xe7,0xdb,0xbd,0x7e,0xff};if(assum==7)   assum=0;elseassum++;}void  main(){IT0=1;EX0=1;EA==1;flag=1;light=0x01;assum=0;while(1){switch(flag){case  1:  left();   break;case  2:   right();    break;case  3:   assum()   break;}delay05s();}}void  int-0()   interrupt   0{delay10ms();if(INT0==0){flag++;if(flag>3)   flag=1;}}

        上一頁(yè) 1 2 下一頁(yè)

        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉