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

<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)用 > 利用單相關(guān)波整提供控制電路電源解析方案

        利用單相關(guān)波整提供控制電路電源解析方案

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

        源程序清單:

        該軟件在Keil C51 V6.02上編譯通過(guò),在目標(biāo)板上運(yùn)動(dòng)正常。如果用其它編譯器必須稍加修改。

        #include

        #define uchar unsigned char

        #define uint unsigned int

        uchar s,x,y=0;

        void timer0(void)interrupt 1 using 1 {/*T0中斷服務(wù)程序*/

        x=x+1;

        if(x/10>s){

        if(y= =0){P1=P10xfb; /*LED點(diǎn)亮*/

        x=0;y=1;}

        else {P1=P1|0x04; /*LED熄滅*/

        y=0;x=0;}}

        TF0=0;TH0=-(28/256);

        TL0=-(28%256);

        }

        void speed(s){ /*電機(jī)轉(zhuǎn)換子程序*/

        uchar pulsecount, pulseduration=0;

        uint i=0;

        uint j=0;

        if (((CMP10x02))!(CMP20x02)/*查詢比較器*/

        {for (i=0;i

        {for(j=0;j210;j++) ;} /*延時(shí)觸發(fā)*/

        CMP1=CMP10xfc;

        CMP2=CMP20xfc;

        pulsecount=1;

        {P1=P10xfe;

        pulseduration=12; /*觸發(fā)脈沖寬度*/

        while(pulseduration){pulseduration- -;}

        P1=P1|0x01;

        pulsecount- -;

        }

        }

        }

        void Initcomparatior(void){ //初始化P87LPC761//

        PT0AD=0x6f; /*禁止P0口的數(shù)字功能*/

        P0=0xff;

        P0M1=0x2a; /*P01,P03,P05設(shè)為高阻輸入*/

        P0M2=0xd5; /*P00,P04,P06設(shè)為推挽方式*/

        P1=0xff;

        P1M1=0x82; /*P17用于VZC檢測(cè)*/

        P1M2=0x05;

        CMP1=0x34;

        CMP2=0x34;

        }

        DIY機(jī)械鍵盤(pán)相關(guān)社區(qū):機(jī)械鍵盤(pán)DIY




        評(píng)論


        相關(guān)推薦

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

        關(guān)閉