自制44光立方程序无锁存Word格式.docx
《自制44光立方程序无锁存Word格式.docx》由会员分享,可在线阅读,更多相关《自制44光立方程序无锁存Word格式.docx(21页珍藏版)》请在冰豆网上搜索。
i<
del;
i++)
for(j=0;
j<
18270;
j++)
;
}
/*******************************主函数*****************************/
voidmain()
uinti;
for(i=2;
i>
1;
i++)
for(i=1;
i<
5;
{
/*单层*/
P0=0X8;
P1=0X00;
P2=0X00;
P0=0X4;
P1=0X0;
Delay
(2);
P0=0X2;
P2=0X0;
P0=0X1;
/**群体闪烁**/
P0=0XFF;
P0=0X00;
/*渐灭*/
P1=0X80;
P1=0XC0;
P1=0XE0;
P1=0XF0;
P1=0XF8;
P1=0XFC;
P1=0XFE;
P1=0XFF;
P2=0X80;
P2=0XC0;
P2=0XE0;
P2=0XF0;
P2=0XF8;
P2=0XFC;
P2=0XFE;
P2=0XFF;
/*zhuan*/
for(i=1;
10;
P2=0XF;
Delay
(1);
P2=0X87;
P2=0XC7;
P1=0XEF;
P2=0XE7;
P1=0XE7;
P2=0XF7;
P1=0XE3;
P1=0XE1;
P2=0Xff;
P1=0X78;
P1=0X7C;
P2=0X7E;
P1=0X7E;
P2=0X3E;
P1=0X7F;
P2=0X1E;
/*kuosan*/
P2=0XF9;
P1=0X9F;
P2=0X6;
P1=0X60;
/*bianhuan*/
8;
P2=0X7D;
P1=0XD7;
/*1*/
P2=0XEB;
P1=0XBE;
/*2*/
/*蛇*/
4;
/*1ceng*/
/*2ceng*/
/*3ceng*/
/*4ceng*/
/*liangliezhuan*/
/*1*/
P1=0X3F;
/*2*/
/*3*/
/*4*/
P2=0XBD;
/*5*/
P2=0XDB;
/*6*/
/*7*/
P2=0XF3;
/*8*/
P0=0XFF;
P1=0XCF;
/*9*/
/*10*/
P1=0XDB;
/*11*/
P1=0XBD;
/*12*/