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

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

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

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

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 52單片機(jī)定時器2實現(xiàn)1s中斷

        52單片機(jī)定時器2實現(xiàn)1s中斷

        作者: 時間:2012-10-08 來源:網(wǎng)絡(luò) 收藏
        include    // 要寫,不能寫//--------默認(rèn)為16位自動重載方式------------//void main(){/* T2定時器溢出預(yù)載值,溢出16次就是1s65536-62500=3036,即0x0bdc */RCAP2H=0x0B;RCAP2L=0xDC; ET2=1;    //  允許T2中斷EA=1;     // 開總中斷TR2=1;    // 啟動T2while(1);  //等待溢出中斷}void t2 ( ) interrupt 5{static unsigned char count;            TF2=0;   // 溢出標(biāo)志必須軟件清0count++;if(count==16) {count=0;P1=~P1;  }}


        關(guān)鍵詞: 52單片機(jī) 定時器2 1s中斷

        評論


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

        關(guān)閉