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

<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)用 > 單片機(jī)C語(yǔ)言程序設(shè)計(jì):用定時(shí)器設(shè)計(jì)的門鈴

        單片機(jī)C語(yǔ)言程序設(shè)計(jì):用定時(shí)器設(shè)計(jì)的門鈴

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

        /* 名稱:用的門鈴


        說(shuō)明:按下按鍵時(shí)蜂鳴器發(fā)出叮咚的門鈴聲。


        */


        #includereg51.h>


        #define uchar unsigned char


        #define uint unsigned int


        sbit Key=P1^7;


        sbit DoorBell=P3^0;


        uint p=0;


        //主程序


        void main()


        {


        DoorBell=0;


        TMOD=0x00; //T0 方式 0


        TH0=(8192-700)/32; //700us 定時(shí)


        TL0=(8192-700)%32;


        IE=0x82;


        while(1)


        {


        if(Key==0) //按下按鍵啟動(dòng)定時(shí)器


        {


        TR0=1;


        while(Key==0);


        }


        }


        }

        蜂鳴器相關(guān)文章:蜂鳴器原理

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

        評(píng)論


        相關(guān)推薦

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

        關(guān)閉