1024手机基地看电影,午夜福利视频导航,国产精品福利在线一区,亚洲欧美日韩另类成人,在线观看午夜日本理论片,成年超爽免费网站,国产精品成人免费,精品动作一级毛片,成人免费观看网站,97精品伊人久久大香蕉

標題: 24秒倒計時 [打印本頁]

作者: edc、    時間: 2018-7-12 11:35
標題: 24秒倒計時
#include<stc12c5a60s2.h>
sbit        LED=P2^0;
sbit        BEEP=P1^0;
sbit        CLEAR=P3^3;
sbit        START=P3^2;
typedef unsigned int        uint;
typedef unsigned char        uchar;               
void        delay(unsigned        int        i)
{
        while(i--);
}

void        main()
{
        uint        T_Count=0;
        uchar        count;
       
        LED=1;
        BEEP=1;
        CLEAR=1;
        START=1;

        TMOD=0x01;
        TH0=(65535-50000)/256;
        TL0=(65535-50000)%256;

        while(START);
        TR0=1;
        count=48;

        while(1)
        {
                if(TF0==1)
                {
                        TF0=0;
                        TH0=(65535-50000)/256;
                        TL0=(65535-50000)%256;
                        if(++T_Count==10)
                        {
                                T_Count=0;
                                LED=~LED;
                                count--;
                                if(count==0)
                                while(CLEAR)
                                {
                                        BEEP=1;
                                        delay(200);
                                }
                                BEEP=1;
                                while(START);
                                count=48;
                        }
                }
        }
}






歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1