欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1764|回復(fù): 0
打印 上一主題 下一主題
收起左側(cè)

32顆流水燈

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:318258 發(fā)表于 2018-4-28 09:53 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
#include <reg51.h>//寫入單片機(jī)預(yù)處理{定義了特殊處理器名稱}
#include <intrins.h>//51頭文件
unsigned char code i[9]={0xf8,0xc7,0x3e,0xf1,0x8f,0x7c,0x7c,0xe3,0x1f};//依次移動(dòng)3個(gè)單位數(shù)組                                          
unsigned char code d[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//P0口單個(gè)點(diǎn)亮
unsigned char code c[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};//P3口倒起點(diǎn)亮
unsigned char code b[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf};//P1口順亮
unsigned char code z[]={0xbf,0xdf,0xef,0xf7,0xfb,0xfd};//P2口倒亮
unsigned char code hua[]={0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xe7,0xdb,0xbd,0x7e,0xbd,0xdb,0xe7,0xff,0xe7,0xc3,0x81,0x00,0x81,0xc3,0xe7,0xff,
0xaa,0x55,0x18,0xff,0xf0,0x0f,0x00,0xff,0xf8,0xf1,0xe3,0xc7,0x8f,0x1f,0x3f,0x7f,
0x7f,0x3f,0x1f,0x8f,0xc7,0xe3,0xf1,0xf8,0xff,0x00,0x00,0xff,0xff,0x0f,0xf0,0xff,
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,
0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,
0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff };//花式閃爍
unsigned char code shi[]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf9,0xf3,0xe7,0xcf,0x9f,0x3f,0xff,
0xe7,0xdb,0xbd,0x7e,0xbd,0xdb,0xe7,0xff,0xe7,0xc3,0x81,0x00,0x81,0xc3,0xe7,0xff,
0xaa,0x55,0x18,0xff,0xf0,0x0f,0x00,0xff,0xf8,0xf1,0xe3,0xc7,0x8f,0x1f,0x3f,0x7f,
0x7f,0x3f,0x1f,0x8f,0xc7,0xe3,0xf1,0xf8,0xff,0x00,0x00,0xff,0xff,0x0f,0xf0,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,
0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00,
0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff };//花式閃爍         
void Delay100ms()                //@11.0592MHz
{                                                                                                         
        unsigned char i, l, k;
        _nop_();
        _nop_();
        i = 2;
        l = 3;
        k = 4;
        do
        {
                do
                {
                        while (--k);
                } while (--l);
        } while (--i);
}//100ms延時(shí)

void main()
{       
        unsigned char a,j,u;
        P0=0xff;
        P1=0xff;
        P2=0xff;
        P3=0xff;
        for(j=0;j<=0;j--)
        {
                for(a=0;a<=8;a++)
                {
                        P0=P0<<1;
                        Delay100ms();
                        P1=P1<<1;
                        Delay100ms();
                        P2=P2<<1;
                        Delay100ms();
                        P3=P3<<1;
                        Delay100ms();
                 }
                P0=0xff;
                P1=0xff;
                P2=0xff;
                P3=0xff;
                for(u=0;u<=8;u++)
                {               
                        P0=0x00;
                        Delay100ms();
                        P0=0xff;
                        Delay100ms();
                        P1=0x00;
                        Delay100ms();
                        P1=0xff;
                        Delay100ms();
                        P2=0x00;
                        Delay100ms();
                        P2=0xff;
                        Delay100ms();
                        P3=0x00;
                        Delay100ms();
                        P3=0xff;
                        Delay100ms();
                }
                P0=0xff;
                P1=0xff;
                P2=0xff;
                P3=0xff;
                for(a=0;a<=8;a++)
                {
                        P0=i[a];
                    Delay100ms();
                        P1=i[a];
                        Delay100ms();
                        P2=i[a];
                        Delay100ms();
                        P3=i[a];
                        Delay100ms();
                }
                        P0=0xff;
                        P1=0xff;
                        P2=0xff;
                        P3=0xff;
                for(a=0;a<=8;a++)
                {       
                        P0=d[a];
                        Delay100ms();
                }
                P0=0xff;
                Delay100ms();       
                P1=0x7f;
                Delay100ms();
                P1=0xff;
                Delay100ms();
                P2=0x7f;
                Delay100ms();
                P2=0xff;
                Delay100ms();
                for(a=0;a<=8;a++)
                {
                        P3=c[a];
                        Delay100ms();
                }
                P3=0xff;
                Delay100ms();
                P2=0xfe;
                Delay100ms();
                P2=0xff;
                Delay100ms();
                for(a=0;a<7;a++)
                {
                        P1=b[a];
                        Delay100ms();
                }
                for(a=0;a<=6;a++)
                {
                        P2=z[a];
                        Delay100ms();
                }
                for(a=0;a<=136;a++)
                {
                        P0=hua[a];
                        P1=hua[a];
                          Delay100ms();
                        P2=shi[a];
                        P3=shi[a];
                }          
        }
}

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表