- #include <STC12C2052AD.h>
- #include<intrins.h>
- #define uint unsigned int
- #define uchar unsigned char
- unsigned int scale; //占空比控制变量
- unsigned char code tabP0[38][8]={0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00};
- unsigned char code tabP2[]={0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F}; //扫描
- unsigned char code PWMsz[8]={0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00}; //中间四个
- /********************************************************************
- * 名称 : Delay_1ms()
- * 功能 : 延时子程序,延时时间为 1ms * x
- * 输入 : x (延时一毫秒的个数)
- * 输出 : 无
- ***********************************************************************/
- //结束呼吸灯专用
- uchar code table[]={
- 0,0,1,2,3,4,5,6,7,8,9,10,
- 11,12,13,14,15,16,17,18,
- 19,20,21,22,23,24,25,26,27,
- 28,29,30,31,32,33,34,35,36,
- 37,38,39,40,41,42,43,44,45,
- 46,47,48,49,50,51,52,53,54,
- 55,56,57,58,59,60,61,62,63,
- 64,65,66,67,68,69,70,71,72,
- 73,74,75,76,77,78,79,80,81,82,
- 83,84,85,86,87,88,89,90,91,
- 92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,
- 110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150};
- void delay(uint z)
- {
- uint x,y;
- for(x=80;x>0;x--)
- for(y=z;y>0;y--);
- }
- void light1(uchar num1)
- {
- uchar j;
- P0=0x00;
- P2=0x00;
- j = table[num1];
- delay(j);
- P0=0xff;
- P2=0x00;
- delay(150-j);
- }
- void light2(uchar num2)
- {
- uchar j;
- P0=0xff;
- P2=0x00;
- j = table[num2];
- delay(j);
- P0=0x00;
- P2=0x00;
- delay(150-j);
- }
- /*******************************************************************/
- void ys(uchar i)//1ms延时
- {
- uchar x,j;
- for(j=0;j<i;j++)
- for(x=0;x<=148;x++);
- }
- void init() //初始化函数
- {
- TMOD=0x02; //定时器0,工作模式2(0000,0010),8位定时模式
- TH0=0x06; //写入预置初值6到定时器0,使250微秒溢出一次(12MHz)
- TL0=0x06; //写入预置值
- ET0=1; //允许定时器0中断
- EA=1; //允许总中断
- }
- void alllighttooff() //闪动4下最后关闭
- {
- unsigned char code tabP0[8][8]={
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<8;j++)
- {
- for(k=0;k<25;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
-
- }
- void randomlight() //随机亮完
- {
- unsigned char code tabP0[38][8]={
- {0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x20,0x00,0x00,0x00,0x00,0x10,0x00},
- {0x00,0x20,0x00,0x00,0x00,0x02,0x10,0x00},
- {0x00,0x20,0x04,0x00,0x00,0x02,0x10,0x00},
- {0x00,0xA0,0x04,0x00,0x00,0x02,0x10,0x00},
- {0x00,0xA0,0x24,0x10,0x00,0x02,0x10,0x00},
- {0x40,0xA0,0x24,0x10,0x00,0x02,0x10,0x00},
- {0x40,0xA0,0x24,0x10,0x20,0x02,0x10,0x00},
- {0x40,0xA0,0x24,0x10,0x20,0x22,0x10,0x00},
- {0x40,0xA0,0x24,0x10,0x20,0x22,0x14,0x42},
- {0x40,0xA0,0x24,0x10,0x20,0x26,0x14,0x42},
- {0x40,0xA0,0x25,0x10,0x20,0x26,0x14,0x42},
- {0x44,0xA0,0x25,0x10,0x20,0x26,0x14,0x42},
- {0x44,0xA0,0x25,0x50,0x20,0x26,0x14,0x42},
- {0x44,0xA0,0x25,0x50,0xA0,0x26,0x14,0x42},
- {0x44,0xA0,0x25,0x50,0xA0,0x27,0x14,0x43},
- {0x44,0xA0,0x25,0x50,0xA0,0x27,0x14,0x53},
- {0x44,0xA0,0x65,0x50,0xA0,0x27,0x54,0x53},
- {0x44,0xA0,0x65,0x50,0xA0,0xA7,0x54,0x53},
- {0x44,0xA0,0x65,0x50,0xA8,0xA7,0x54,0x53},
- {0x44,0xA0,0x65,0x50,0xA8,0xA7,0x56,0x5B},
- {0x46,0xA0,0x67,0x52,0xA8,0xA7,0x56,0x5B},
- {0x46,0xA1,0x67,0x52,0xA8,0xA7,0x56,0x5B},
- {0x46,0xB1,0x67,0x52,0xA8,0xA7,0x56,0x5B},
- {0x46,0xB1,0x67,0x5A,0xA8,0xA7,0x56,0x5B},
- {0x56,0xB1,0x67,0x5A,0xA8,0xA7,0x56,0x5B},
- {0x56,0xB1,0x67,0x5A,0xA8,0xE7,0x56,0x5B},
- {0x56,0xB1,0x67,0x5A,0xAA,0xE7,0x56,0x5F},
- {0x56,0xB1,0x67,0x5A,0xAA,0xE7,0x56,0x7F},
- {0x56,0xF9,0x67,0x7A,0xAA,0xE7,0x56,0x7F},
- {0x56,0xF9,0x67,0x7A,0xAE,0xE7,0x5E,0x7F},
- {0x5E,0xFD,0x67,0x7B,0xAE,0xE7,0x5E,0x7F},
- {0x5E,0xFD,0x67,0x7B,0xEE,0xE7,0xDE,0xFF},
- {0xDE,0xFD,0xE7,0xFB,0xEF,0xE7,0xFF,0xFF},
- {0xDE,0xFD,0xF7,0xFB,0xFF,0xF7,0xFF,0xFF},
- {0xDE,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}
- };
- int j,k,i;
- for(j=0;j<38;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void randomoff() //随机灭完
- {
- unsigned char code tabP0[23][8]={
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xFF,0xDF},
- {0xFF,0xFF,0xDF,0xFF,0xFF,0xFF,0xED,0xDF},
- {0xFF,0xF7,0xDD,0xFF,0xFF,0xFF,0xED,0xDF},
- {0xFF,0xF7,0xDD,0xEF,0xFF,0xDF,0xED,0xDF},
- {0xFF,0xF7,0x5D,0xAF,0xFD,0xDF,0xED,0xDF},
- {0xFF,0xF7,0x5C,0xAF,0xDD,0xDF,0xED,0xDF},
- {0xFF,0xE7,0x5C,0xAF,0xDD,0xDF,0x6D,0xDD},
- {0xFF,0xE7,0x5C,0x2F,0xDD,0xD7,0x6D,0x9D},
- {0xFF,0xE5,0x5C,0x2F,0xDD,0xD7,0x69,0x9D},
- {0xFF,0xA5,0x5C,0x2B,0xDD,0x57,0x69,0x9D},
- {0xFF,0xA5,0x5C,0x29,0xDD,0x57,0x69,0x8D},
- {0xBD,0x85,0x5C,0x29,0xDD,0x57,0x69,0x8D},
- {0xBD,0x85,0x54,0x29,0xDD,0x53,0x48,0x8D},
- {0x9D,0x85,0x54,0x29,0xDD,0x53,0x08,0x8D},
- {0x9D,0x81,0x54,0x09,0xDD,0x13,0x08,0x8D},
- {0x95,0x81,0x54,0x09,0xDD,0x12,0x08,0x85},
- {0x95,0x01,0x54,0x09,0xC9,0x12,0x08,0x85},
- {0x95,0x01,0x54,0x01,0x89,0x12,0x08,0x84},
- {0x95,0x01,0x40,0x01,0x89,0x02,0x08,0x80},
- {0x95,0x00,0x40,0x01,0x88,0x02,0x08,0x00},
- {0x94,0x00,0x00,0x00,0x88,0x00,0x08,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<23;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void allfalloff() //由全亮到下落关闭只剩一排
- {
- unsigned char code tabP0[4][8]={
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF},
- {0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF}
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<15;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void turnR() //由下面一排转到右面
- {
- unsigned char code tabP0[6][8]={
- {0x00,0x00,0x0F,0xF0,0x00,0x00,0x00,0xFF},
- {0x00,0x0F,0xF0,0x00,0x00,0x00,0x00,0xFF},
- {0x0F,0xF0,0x00,0x00,0x00,0x00,0xF0,0x0F},
- {0xF0,0x00,0x00,0x00,0x00,0xF0,0x0F,0x0F},
- {0x00,0x00,0x00,0x00,0xF0,0x0F,0x0F,0x0F},
- {0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F}
- };
- int j,k,i;
- for(j=0;j<6;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(6);
- }
- }
- }
- }
- void righttoleft() //右面平移到左面
- {
- unsigned char code tabP0[4][8]={
- {0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F},
- {0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0},
- {0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00},
- {0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void lefttoright() //左面平移到右面
- {
- unsigned char code tabP0[4][8]={
- {0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00},
- {0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0},
- {0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F}
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void turnD() //从右面到下面
- {
- unsigned char code tabP0[6][8]={
- {0x00,0x00,0x00,0x00,0xF0,0x0F,0x0F,0x0F},
- {0xF0,0x00,0x00,0x00,0x00,0xF0,0x0F,0x0F},
- {0x0F,0xF0,0x00,0x00,0x00,0x00,0xF0,0x0F},
- {0x00,0x0F,0xF0,0x00,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0x0F,0xF0,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF}
- };
- int j,k,i;
- for(j=0;j<6;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void toptofollowing() //上面平移到下面
- {
- unsigned char code tabP0[4][8]={
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00},
- {0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void followingtotop() //下面平移到上面
- {
- unsigned char code tabP0[4][8]={
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00},
- {0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void alllight() //右到左全亮
- {
- unsigned char code tabP0[4][8]={
- {0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F},
- {0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF},
- {0xF0,0xF0,0xF0,0xF0,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}
- };
- int j,k,i;
- for(j=0;j<4;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void evel() // 斜面亮
- {
- unsigned char code tabP0[7][8]={
- {0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xF7},
- {0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x73},
- {0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x23},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x48,0x48,0x00,0x00,0x21,0x21},
- {0x00,0x48,0x48,0x48,0x00,0x21,0x21,0x21},
- {0x48,0x48,0x48,0x48,0x21,0x21,0x21,0x21},
- };
- int j,k,i;
- for(j=0;j<7;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void followtotop() //上面转移到后面 可以接旋转
- {
- unsigned char code tabP0[10][8]={
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xEE,0x11,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xEC,0x12,0x01,0x00,0xFF,0x00,0x00,0x00},
- {0xC8,0x24,0x12,0x01,0xEF,0x10,0x00,0x00},
- {0x88,0x48,0x24,0x12,0xCE,0x21,0x10,0x00},
- {0x88,0x88,0x48,0x24,0x8C,0x42,0x21,0x10},
- {0x88,0x88,0x88,0x48,0x88,0x84,0x42,0x21},
- {0x88,0x88,0x88,0x88,0x88,0x88,0x84,0x42},
- {0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x84},
- {0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88}
- };
- int j,k,i;
- for(j=0;j<15;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void spin() // 旋转
- {
- unsigned char code tabP0[8][8]={
- {0x48,0x48,0x48,0x48,0x21,0x21,0x21,0x21},
- {0x44,0x44,0x44,0x44,0x22,0x22,0x22,0x22},
- {0x22,0x22,0x22,0x22,0x44,0x44,0x44,0x44},
- {0x21,0x21,0x21,0x21,0x48,0x48,0x48,0x48},
- {0x31,0x31,0x31,0x31,0xC8,0xC8,0xC8,0xC8},
- {0x30,0x30,0x30,0x30,0xC0,0xC0,0xC0,0xC0},
- {0xC0,0xC0,0xC0,0xC0,0x30,0x30,0x30,0x30},
- {0xC8,0xC8,0xC8,0xC8,0x31,0x31,0x31,0x31},
- };
- int j,k,i;
- for(j=0;j<8;j++)
- {
- for(k=0;k<8;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void Thenthelast() //接旋转下来到第一排
- {
- unsigned char code tabP0[3][8]={
- {0x00,0x48,0x48,0x48,0x00,0x21,0x21,0x21},
- {0x00,0x00,0x48,0x48,0x00,0x00,0x21,0x21},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21}
- };
- int j,k,i;
- for(j=0;j<3;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void thelast() //接下来一排斜的 后4点转到左上1
- {
- unsigned char code tabP0[43][8]={
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x23},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8E},
- {0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x8C},
- {0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x88},
- {0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x80},
- {0x00,0x00,0x00,0x8E,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x17,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x30},
- {0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x70},
- {0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x70},
- {0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60},
- {0x00,0x00,0x00,0x60,0x00,0x00,0x20,0x40},
- {0x00,0x00,0x00,0x60,0x00,0x00,0x60,0x00},
- {0x00,0x00,0x40,0x20,0x00,0x00,0x60,0x00},
- {0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00},
- {0x00,0x00,0x60,0x00,0x00,0x20,0x40,0x00},
- {0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00},
- {0x00,0x40,0x20,0x00,0x00,0x60,0x00,0x00},
- {0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00},
- {0x00,0x60,0x00,0x00,0x20,0x40,0x00,0x00},
- {0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x00},
- {0x40,0x20,0x00,0x00,0x60,0x00,0x00,0x00},
- {0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00},
- {0x70,0x00,0x00,0x00,0x40,0x00,0x00,0x00},
- {0x70,0x00,0x00,0x00,0x10,0x00,0x00,0x00},
- {0x30,0x00,0x00,0x00,0x11,0x00,0x00,0x00},
- {0x10,0x00,0x00,0x00,0x13,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x17,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x8E,0x00,0x00,0x00},
- {0x80,0x00,0x00,0x00,0x8C,0x00,0x00,0x00},
- {0x88,0x00,0x00,0x00,0x88,0x00,0x00,0x00},
- {0x8C,0x00,0x00,0x00,0x80,0x00,0x00,0x00},
- {0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<43;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(5);
- }
- }
- }
- }
- void twoidea() //左上1开始 三个走 最后 底层亮完
- {
- unsigned char code tabP0[19][8]={
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x01,0x03,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x8F,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xEF,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x30},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x70},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xF0},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xF8},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFC},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFE},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- };
- int j,k,i;
- for(j=0;j<19;j++)
- {
- for(k=0;k<8;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(12);
- }
- }
- }
- }
- void around2() //从左下第一点贪吃蛇样 转到左上第一点
- {
- unsigned char code tabP0[27][8]={
- {0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x11},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0C},
- {0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x08},
- {0x00,0x00,0x88,0x00,0x00,0x00,0x80,0x00},
- {0x00,0x00,0x8C,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x10,0x03,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x10,0x01,0x00,0x00,0x10,0x00,0x00},
- {0x00,0x10,0x00,0x00,0x00,0x11,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x80,0x0C,0x00,0x00},
- {0x80,0x00,0x00,0x00,0x80,0x08,0x00,0x00},
- {0x88,0x00,0x00,0x00,0x80,0x00,0x00,0x00},
- {0x8C,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<3;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void spread() //从左上1扩散全部一次 最后回到右上1
- {
- unsigned char code tabP0[42][8]={
- {0x13,0x01,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x37,0x33,0x01,0x00,0x10,0x00,0x00,0x00},
- {0x7F,0x37,0x13,0x01,0x31,0x10,0x00,0x00},
- {0xFF,0x7F,0x37,0x13,0x73,0x31,0x10,0x00},
- {0xFF,0xFF,0x7F,0x3F,0xFF,0x77,0x33,0x11},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x77,0x33},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFE,0xEC,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFE,0xEC,0xC8,0xFF,0xFF,0xFF,0xEF},
- {0xFE,0xEC,0xC8,0x80,0xFF,0xFF,0xEF,0xCE},
- {0xEC,0xC8,0x80,0x00,0xFF,0xEF,0xCE,0x8C},
- {0xC8,0x80,0x00,0x00,0xEF,0xCE,0x8C,0x08},
- {0x80,0x00,0x00,0x00,0xCE,0x8C,0x08,0x00},
- {0x00,0x00,0x00,0x00,0x8C,0x08,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x8C,0x08,0x00,0x00},
- {0x80,0x00,0x00,0x00,0xCE,0x8C,0x08,0x00},
- {0xC8,0x80,0x00,0x00,0xEF,0xCE,0x8C,0x08},
- {0xEC,0xC8,0x80,0x00,0xFF,0xEF,0xCE,0x8C},
- {0xFE,0xEC,0xC8,0x80,0xFF,0xFF,0xEF,0xCE},
- {0xFF,0xFE,0xEC,0xC8,0xFF,0xFF,0xFF,0xEF},
- {0xFF,0xFF,0xFE,0xEC,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xEC},
- {0xFF,0xFF,0xFF,0xEF,0xFF,0xFE,0xEC,0xC8},
- {0xFF,0xFF,0xEF,0xCE,0xFE,0xEC,0xC8,0x80},
- {0xFF,0xEF,0xCE,0x8C,0xEC,0xC8,0x80,0x00},
- {0xEF,0xCE,0x8C,0x08,0xC8,0x80,0x00,0x00},
- {0xCE,0x8C,0x08,0x00,0x80,0x00,0x00,0x00},
- {0x8C,0x08,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<42;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void framework()//从右上第一点延伸框架
- {
- unsigned char code tabP0[8][8]={
- {0x00,0x00,0x00,0x00,0x13,0x01,0x00,0x00},
- {0x10,0x00,0x00,0x00,0x17,0x01,0x01,0x00},
- {0x11,0x00,0x00,0x00,0x1F,0x01,0x01,0x01},
- {0x13,0x01,0x00,0x00,0x9F,0x09,0x01,0x13},
- {0x97,0x01,0x01,0x10,0x9F,0x09,0x09,0x17},
- {0x9F,0x01,0x01,0x11,0x9F,0x09,0x09,0x9F},
- {0x9F,0x09,0x01,0x93,0x9F,0x09,0x09,0x9F},
- {0x9F,0x09,0x09,0x9F,0x9F,0x09,0x09,0x9F},
- };
- int j,k,i;
- for(j=0;j<8;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void nextkj1() //第一种接框架后 4个小正方形转动最后全亮
- {
- unsigned char code tabP0[32][8]={
- {0x9F,0x09,0x09,0x9F,0x9F,0x09,0x09,0x9F},
- {0x06,0x99,0x99,0x06,0x06,0x99,0x99,0x06},
- {0x00,0x66,0x66,0x00,0x00,0x66,0x66,0x00},
- {0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00},
- {0x00,0xC0,0xC0,0x00,0x00,0xC0,0xC0,0x00},
- {0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x66,0x66,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66},
- {0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC},
- {0x00,0x00,0xC0,0xC0,0x00,0x00,0xC0,0xC0},
- {0x00,0x00,0xCC,0xCC,0x00,0x00,0x00,0x00},
- {0x00,0xCC,0xCC,0x00,0x00,0x00,0x00,0x00},
- {0xCC,0xCC,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x33,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x33,0x33,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x77,0x77,0x00,0x00,0x00,0x00},
- {0x33,0x33,0xFF,0xFF,0x00,0x00,0x00,0x00},
- {0x33,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xCC,0xCC,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xEE,0xEE,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x33,0x00},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x33,0x33},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x77,0x77},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- };
- int j,k,i;
- for(j=0;j<32;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void nextkj2() //第二种接框架后 最后上面一排亮
- {
- unsigned char code tabP0[10][8]={
- {0x9F,0x09,0x09,0x9F,0x9F,0x09,0x09,0x9F},
- {0xF0,0x90,0x90,0xF0,0x9F,0x09,0x09,0x9F},
- {0x00,0x00,0x00,0x00,0xFF,0x99,0x99,0xFF},
- {0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x0F},
- {0x00,0x00,0x00,0x00,0x0F,0x09,0x09,0x00},
- {0x00,0x00,0x00,0x00,0x0F,0x09,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xF0,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<10;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void drip() //接上面全亮的,滴水 ,最后最下面的一排亮
- {
- unsigned char code tabP0[25][8]={
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFE,0x01,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFC,0x02,0x01,0x00,0xFF,0x00,0x00,0x00},
- {0xF8,0x04,0x02,0x01,0xFF,0x00,0x00,0x00},
- {0xF0,0x08,0x04,0x03,0xFF,0x00,0x00,0x00},
- {0xF0,0x00,0x08,0x07,0xFF,0x00,0x00,0x00},
- {0xF0,0x00,0x00,0x0F,0xFF,0x00,0x00,0x00},
- {0xE0,0x10,0x00,0x0F,0xFF,0x00,0x00,0x00},
- {0xC0,0x20,0x10,0x0F,0xFF,0x00,0x00,0x00},
- {0x80,0x40,0x20,0x1F,0xFF,0x00,0x00,0x00},
- {0x00,0x80,0x40,0x3F,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x80,0x7F,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFF,0xEF,0x10,0x00,0x00},
- {0x00,0x00,0x00,0xFF,0xCF,0x20,0x10,0x00},
- {0x00,0x00,0x00,0xFF,0x8F,0x40,0x20,0x10},
- {0x00,0x00,0x00,0xFF,0x0F,0x80,0x40,0x30},
- {0x00,0x00,0x00,0xFF,0x0F,0x00,0x80,0x70},
- {0x00,0x00,0x00,0xFF,0x0F,0x00,0x00,0xF0},
- {0x00,0x00,0x00,0xFF,0x0E,0x01,0x00,0xF0},
- {0x00,0x00,0x00,0xFF,0x0C,0x02,0x01,0xF0},
- {0x00,0x00,0x00,0xFF,0x08,0x04,0x02,0xF1},
- {0x00,0x00,0x00,0xFF,0x00,0x08,0x04,0xF3},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x08,0xF7},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- };
- int j,k,i;
- for(j=0;j<25;j++)
- {
- for(k=0;k<15;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(5);
- }
- }
- }
- }
- void followingtofront() //从最下面全亮到最前面一列
- {
- unsigned char code tabP0[7][8]={
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0x88,0x77,0x00,0x00,0x88,0x77},
- {0x00,0x88,0x44,0x33,0x00,0x88,0x44,0x33},
- {0x88,0x44,0x22,0x11,0x88,0x44,0x22,0x11},
- {0x44,0x22,0x11,0x11,0x44,0x22,0x11,0x11},
- {0x22,0x11,0x11,0x11,0x22,0x11,0x11,0x11},
- {0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11},
- };
- int j,k,i;
- for(j=0;j<7;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(6);
- }
- }
- }
-
- }
- void around() //最前面一面全亮开始 围着光立方转 最后回到第一面
- {
- unsigned char code tabP0[12][8]={
- {0x13,0x13,0x13,0x13,0x10,0x10,0x10,0x10},
- {0x17,0x17,0x17,0x17,0x00,0x00,0x00,0x00},
- {0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00},
- {0x8E,0x8E,0x8E,0x8E,0x00,0x00,0x00,0x00},
- {0x8C,0x8C,0x8C,0x8C,0x80,0x80,0x80,0x80},
- {0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88},
- {0x80,0x80,0x80,0x80,0x8C,0x8C,0x8C,0x8C},
- {0x00,0x00,0x00,0x00,0x8E,0x8E,0x8E,0x8E},
- {0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F},
- {0x00,0x00,0x00,0x00,0x17,0x17,0x17,0x17},
- {0x10,0x10,0x10,0x10,0x13,0x13,0x13,0x13},
- {0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11}
- };
- int j,k,i;
- for(j=0;j<12;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void aroundnext() //接Around 第一面转到第一列
- {
- unsigned char code tabP0[13][8]={
- {0x11,0x11,0x11,0x10,0x11,0x11,0x11,0x13},
- {0x11,0x11,0x11,0x00,0x11,0x11,0x11,0x17},
- {0x11,0x11,0x10,0x00,0x11,0x11,0x13,0x0F},
- {0x11,0x10,0x00,0x00,0x11,0x13,0x17,0x8E},
- {0x10,0x00,0x00,0x80,0x13,0x17,0x0F,0x8C},
- {0x00,0x00,0x00,0x88,0x17,0x0F,0x8E,0x88},
- {0x00,0x00,0x80,0x8C,0x0F,0x8E,0x8C,0x80},
- {0x00,0x80,0x88,0x8E,0x8E,0x8C,0x88,0x00},
- {0x80,0x88,0x8C,0x0F,0x8C,0x88,0x80,0x00},
- {0x88,0x8C,0x8E,0x0F,0x88,0x80,0x00,0x00},
- {0x8C,0x8E,0x0F,0x0F,0x80,0x00,0x00,0x00},
- {0x8E,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00},
- {0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<13;j++)
- {
- for(k=0;k<13;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
-
- }
- void rain() //全关 水滴到全关
- {
- unsigned char code tabP0[40][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x51},
- {0x00,0x00,0x00,0x49,0x00,0x00,0x00,0x84},
- {0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13},
- {0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x45},
- {0x00,0x00,0x00,0x41,0x00,0x00,0x00,0x89},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00},
- {0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00},
- {0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00},
- {0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x8C},
- {0x00,0x00,0x00,0xE4,0x00,0x00,0x00,0x32},
- {0x00,0x00,0x00,0xC4,0x00,0x00,0x00,0x31},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x2A,0x00,0x00,0x00,0x68},
- {0x00,0x00,0x00,0x1A,0x00,0x00,0x00,0x1B},
- {0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x1B},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C},
- {0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x4A},
- {0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x29},
- {0x00,0x00,0x00,0x2C,0x00,0x00,0x00,0x19},
- {0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x19}
- };
- int j,k,i;
- for(j=0;j<40;j++)
- {
- for(k=0;k<11;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void nextfourspread() //由右上四个小正方体扩散一次 在扩散一次 回到中间四个
- {
- unsigned char code tabP0[28][8]={
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x77,0x77,0x07,0x00,0x77,0x31,0x00,0x00},
- {0xFF,0x77,0x77,0x11,0x77,0x77,0x31,0x00},
- {0xFF,0xFF,0xFF,0x77,0xFF,0xFF,0x73,0x31},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x73},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xEC,0xCC,0xFF,0xFF,0xFF,0xEF},
- {0xFF,0xFE,0xCC,0xC8,0xFF,0xFF,0xEF,0xCE},
- {0xFF,0xEC,0xC8,0x88,0xFF,0xEF,0xEC,0x8C},
- {0xFE,0xC8,0x88,0x80,0xFE,0xCE,0x8C,0x80},
- {0x00,0x00,0x00,0x00,0xCE,0xCC,0x88,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xEE,0xCC,0x08,0x00},
- {0xE0,0x80,0x00,0x00,0xEF,0xCC,0x88,0x88},
- {0xEC,0xC8,0x80,0x00,0xFF,0xEE,0x8C,0x88},
- {0xEE,0xEC,0xCC,0x00,0xFF,0xEF,0xCC,0x8C},
- {0xFE,0xFE,0xEC,0x8C,0xFF,0xEF,0xEF,0xEC},
- {0xFF,0xFF,0xFE,0xEC,0xFF,0xFF,0xFF,0xEF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0xC3,0xE7,0x7E,0x3C,0x3C,0x7E,0xE7,0xC3},
- {0x42,0xE7,0x7E,0x24,0x24,0x7E,0xE7,0x42},
- {0x00,0x66,0x76,0x20,0x00,0x66,0xE7,0x42},
- {0x00,0x66,0x66,0x00,0x00,0x66,0x66,0x00},
- {0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00},
- {0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00}
- };
- int j,k,i;
- for(j=0;j<28;j++)
- {
- for(k=0;k<12;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void fourspread() //从中间四个小灯亮扩散到外面四个亮
- {
- unsigned char code tabP0[12][8]={
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x05,0x00,0x05,0x00,0x50,0x00,0x50,0x00},
- {0x09,0x00,0x00,0x09,0x09,0x00,0x00,0x09},
- {0x05,0x00,0x05,0x00,0x50,0x00,0x50,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x66,0x66,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00},
- {0x09,0x00,0x00,0x09,0x09,0x00,0x00,0x09},
- {0x00,0x60,0x60,0x00,0x00,0x60,0x60,0x00}
- };
- int j,k,i;
- for(j=0;j<12;j++)
- {
- for(k=0;k<18;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void any1() //3个点 贪吃蛇样 到最上面一层全亮 可以接上面到后面在接旋转
- {
- unsigned char code tabP0[52][8]={
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x01,0x11,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x11},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C},
- {0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x88},
- {0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x80},
- {0x00,0x00,0x04,0x88,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x06,0x08,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x31,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x60,0x00,0x00,0x00,0x40,0x00},
- {0x00,0x00,0x40,0x00,0x00,0x00,0x44,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x08,0x0C,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x0C,0x08,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x00},
- {0x00,0x80,0x00,0x00,0x00,0xC0,0x00,0x00},
- {0x00,0xC0,0x00,0x00,0x00,0x80,0x00,0x00},
- {0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x62,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x26,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x08,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0x80,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xC0,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xE0,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xF0,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xF1,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xF3,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xF7,0x00,0x00,0x00},
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<52;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void any2() //从底下中间一个小正方体 慢慢向上走 到顶层扩散开 在下到底层
- {
- unsigned char code tabP0[8][8]={
- {0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60},
- {0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00},
- {0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00},
- {0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00},
- {0x9F,0x00,0x00,0x00,0x9F,0x00,0x00,0x00},
- {0x00,0x9F,0x00,0x00,0x00,0x9F,0x00,0x00},
- {0x00,0x00,0x9F,0x00,0x00,0x00,0x9F,0x00},
- {0x00,0x00,0x00,0x9F,0x00,0x00,0x00,0x9F},
- };
- int j,k,i;
- for(j=0;j<8;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(10);
- }
- }
- }
- }
- void any3() //从顶层转到斜面 可以接旋转
- {
- unsigned char code tabP0[46][8]={
- {0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x11,0x00,0x00,0x00,0x10,0x00,0x00,0x00},
- {0x10,0x00,0x00,0x00,0x11,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x8C,0x00,0x00,0x00},
- {0x80,0x00,0x00,0x00,0x88,0x00,0x00,0x00},
- {0x88,0x00,0x00,0x00,0x80,0x00,0x00,0x00},
- {0x88,0x04,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x08,0x06,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x13,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x11,0x00,0x00,0x00,0x10,0x00,0x00},
- {0x00,0x10,0x00,0x00,0x00,0x11,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x11,0x02,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x8C,0x00},
- {0x00,0x00,0x80,0x00,0x00,0x00,0x88,0x00},
- {0x00,0x00,0x88,0x00,0x00,0x00,0x80,0x00},
- {0x00,0x00,0x8C,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x03,0x10,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x01,0x10,0x00,0x00,0x00,0x10},
- {0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x11},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8C},
- {0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x88},
- {0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x80},
- {0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x20},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x01,0x21},
- {0x00,0x00,0x00,0x48,0x00,0x01,0x21,0x21},
- {0x00,0x00,0x40,0x48,0x01,0x21,0x21,0x21},
- {0x00,0x40,0x48,0x48,0x21,0x21,0x21,0x21},
- {0x40,0x48,0x48,0x48,0x21,0x21,0x21,0x21},
- {0x48,0x48,0x48,0x48,0x21,0x21,0x21,0x21},
- };
- int j,k,i;
- for(j=0;j<46;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void any4() //右上一个小正方体 绕绕绕到左上
- {
- unsigned char code tabP0[21][8]={
- {0x00,0x00,0x00,0x00,0x8C,0x88,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0x8C,0x00,0x00},
- {0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x66,0x66,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x01,0x33,0x32,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x21,0x33,0x12},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x36},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66},
- {0x00,0x00,0x00,0x00,0x00,0x00,0xCE,0x64},
- {0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC},
- {0x00,0x00,0xC0,0xC0,0x00,0x00,0xC0,0xC0},
- {0x00,0x00,0xCC,0xCC,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x6C,0xC6,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x66,0x66,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x66,0x33,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x33,0x33,0x00,0x00,0x00,0x00},
- {0x00,0x21,0x32,0x13,0x00,0x00,0x00,0x00},
- {0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<21;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
-
- }
- void any5() //从地下旋转起来 接旋转
- {
- unsigned char code tabP0[36][8]={
- {0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xF7},
- {0x00,0x00,0x00,0xEE,0x00,0x00,0x00,0x77},
- {0x00,0x00,0x00,0xEC,0x00,0x00,0x00,0x63},
- {0x00,0x00,0x00,0xCC,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x00,0x4C,0x00,0x00,0x00,0x23},
- {0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x44},
- {0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x48},
- {0x00,0x00,0x00,0x31,0x00,0x00,0x00,0xC8},
- {0x00,0x00,0x00,0xD0,0x00,0x00,0x00,0xB0},
- {0x00,0x00,0x00,0xC8,0x00,0x00,0x00,0x31},
- {0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x21},
- {0x00,0x00,0x48,0x00,0x00,0x00,0x21,0x00},
- {0x00,0x00,0x44,0x00,0x00,0x00,0x22,0x00},
- {0x00,0x00,0x22,0x00,0x00,0x00,0x44,0x00},
- {0x00,0x00,0x21,0x00,0x00,0x00,0x48,0x00},
- {0x00,0x00,0x31,0x00,0x00,0x00,0xC8,0x00},
- {0x00,0x00,0xD0,0x00,0x00,0x00,0xB0,0x00},
- {0x00,0x00,0x48,0x00,0x00,0x00,0x21,0x00},
- {0x00,0x4C,0x00,0x00,0x00,0x23,0x00,0x00},
- {0x00,0x22,0x00,0x00,0x00,0x44,0x00,0x00},
- {0x00,0x21,0x00,0x00,0x00,0x48,0x00,0x00},
- {0x00,0x31,0x00,0x00,0x00,0xC8,0x00,0x00},
- {0x00,0xD0,0x00,0x00,0x00,0xB0,0x00,0x00},
- {0x00,0x48,0x00,0x00,0x00,0x21,0x00,0x00},
- {0x44,0x00,0x00,0x00,0x21,0x00,0x00,0x00},
- {0x26,0x00,0x00,0x00,0x46,0x00,0x00,0x00},
- {0x21,0x00,0x00,0x00,0x48,0x00,0x00,0x00},
- {0x31,0x00,0x00,0x00,0xC8,0x00,0x00,0x00},
- {0xD0,0x00,0x00,0x00,0xB0,0x00,0x00,0x00},
- {0xC8,0x00,0x00,0x00,0x31,0x00,0x00,0x00},
- {0x48,0x00,0x00,0x00,0x21,0x00,0x00,0x00},
- {0x48,0x48,0x00,0x00,0x21,0x21,0x00,0x00},
- {0x48,0x48,0x48,0x00,0x21,0x21,0x21,0x00},
- {0x48,0x48,0x48,0x48,0x21,0x21,0x21,0x21},
- };
- int j,k,i;
- for(j=0;j<36;j++)
- {
- for(k=0;k<10;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(8);
- }
- }
- }
- }
- void any6() //从下随机升起 一直上去 最后灭 快速过场
- {
- unsigned char code tabP0[9][8]={
- {0x00,0x00,0x00,0x52,0x00,0x00,0x00,0xC2},
- {0x00,0x00,0xA0,0x52,0x00,0x00,0x64,0xC2},
- {0x00,0x40,0xA4,0x52,0x00,0xA0,0x64,0xC2},
- {0x00,0x42,0xA4,0x52,0x00,0xAA,0x64,0xC2},
- {0x62,0x42,0xA4,0x52,0x26,0xAA,0x64,0xC2},
- {0x62,0x42,0xA4,0x00,0x26,0xAA,0x64,0x00},
- {0x62,0x42,0x00,0x00,0x26,0xAA,0x00,0x00},
- {0x62,0x00,0x00,0x00,0x26,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<9;j++)
- {
- for(k=0;k<9;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(5);
- }
- }
- }
-
-
- }
- void any7() //音频显示 从底层亮完开始,最后全灭
- {
- unsigned char code tabP0[20][8]={
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF},
- {0x00,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF},
- {0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF},
- {0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF},
- {0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF},
- {0x00,0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF},
- {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
- {0x00,0x00,0x0F,0xFF,0x00,0x00,0x00,0xFF},
- {0x00,0x0F,0xFF,0xFF,0x00,0x00,0x0F,0xFF},
- {0x0F,0x0F,0x0F,0xFF,0x00,0x0F,0xFF,0xFF},
- {0x00,0x0F,0xFF,0xFF,0x0F,0x0F,0x0F,0xFF},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x33,0x33,0x00,0x00,0x00,0x00},
- {0x00,0x33,0x33,0x33,0x00,0x00,0x00,0x00},
- {0x33,0x33,0x33,0x33,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30},
- {0x00,0x00,0x30,0x30,0x00,0x00,0x30,0x30},
- {0x00,0x30,0x30,0x30,0x00,0x30,0x30,0x30},
- {0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30}
- };
- int j,k,i;
- for(j=0;j<20;j++)
- {
- for(k=0;k<22;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(6);
- }
- }
- }
- }
- void any8() //由全灭 到右下第一个起来成一竖列 然后竖列逐个走 最后到左上一个亮
- {
- unsigned char code tabP0[25][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01},
- {0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01},
- {0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01},
- {0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x01},
- {0x00,0x00,0x00,0x00,0x04,0x02,0x01,0x01},
- {0x00,0x00,0x00,0x00,0x08,0x04,0x02,0x01},
- {0x00,0x00,0x00,0x00,0x08,0x08,0x04,0x02},
- {0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x04},
- {0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x08},
- {0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80},
- {0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40},
- {0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20},
- {0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10},
- {0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00},
- {0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00},
- {0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x00},
- {0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00},
- {0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00},
- {0x04,0x08,0x08,0x08,0x00,0x00,0x00,0x00},
- {0x02,0x04,0x08,0x08,0x00,0x00,0x00,0x00},
- {0x01,0x02,0x04,0x08,0x00,0x00,0x00,0x00},
- {0x01,0x02,0x04,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
- };
- int j,k,i;
- for(j=0;j<25;j++)
- {
- for(k=0;k<22;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(6);
- }
- }
- }
- }
- void any9() //由上面一排全亮 转到左上小正方形
- {
- unsigned char code tabP0[30][8]={
- {0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFE,0x01,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFE,0x00,0x01,0x00,0xFF,0x00,0x00,0x00},
- {0xFE,0x00,0x00,0x01,0xFF,0x00,0x00,0x00},
- {0xFC,0x02,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xFC,0x00,0x02,0x00,0xFF,0x00,0x00,0x00},
- {0xFC,0x00,0x00,0x02,0xFF,0x00,0x00,0x00},
- {0xF8,0x04,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xF8,0x00,0x04,0x00,0xFF,0x00,0x00,0x00},
- {0xF8,0x00,0x00,0x04,0xFF,0x00,0x00,0x00},
- {0xF0,0x08,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xF0,0x00,0x08,0x00,0xFF,0x00,0x00,0x00},
- {0xF0,0x00,0x00,0x08,0xFF,0x00,0x00,0x00},
- {0xE0,0x10,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xE0,0x00,0x10,0x00,0xFF,0x00,0x00,0x00},
- {0xE0,0x00,0x00,0x10,0xFF,0x00,0x00,0x00},
- {0xC0,0x20,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0xC0,0x00,0x20,0x00,0xFF,0x00,0x00,0x00},
- {0xC0,0x00,0x00,0x20,0xFF,0x00,0x00,0x00},
- {0x80,0x40,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0x80,0x00,0x40,0x00,0xFF,0x00,0x00,0x00},
- {0x80,0x00,0x00,0x40,0xFF,0x00,0x00,0x00},
- {0x00,0x80,0x00,0x00,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x80,0x00,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x80,0xFF,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x77,0x22,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00},
- {0x30,0x00,0x00,0x00,0x30,0x33,0x00,0x00},
- {0x30,0x30,0x00,0x00,0x30,0x30,0x00,0x00},
- {0x33,0x33,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- int j,k,i;
- for(j=0;j<30;j++)
- {
- for(k=0;k<12;k++)
- {
- for(i=0;i<8;i++)
- {
- P0=0;
- P2=tabP2[i];
- P0=tabP0[j][i];
- ys(7);
- }
- }
- }
- }
- void begin() //全灭 呼吸亮
- {
- int i;
- for(i=0;i<140;i++)
- {
- light2(i);
- }
- P0=0x00;
- P2=0x00;
- }
- void end() //全亮 呼吸灭
- {
- int i;
- P0=0xff;
- P2=0x00;
- delay(100);
- for(i=0;i<140;i++)
- {
- light1(i);
- }
- P0=0x00;
- }
- /********************************************************************
- * 名称 : Main()
- * 功能 : 主函数
- * 输入 : 无
- * 输出 : 无
- ***********************************************************************/
- void main()
- {
- while(1)
- {
- begin(); //全灭 呼吸亮
- allfalloff(); //由全亮到下落关闭只剩一排
- turnR(); //由下面一排转到右面
- righttoleft(); //右面平移到左面
- lefttoright(); //左面平移到右面
- righttoleft(); //右面平移到左面
- lefttoright(); //左面平移到右面
- turnD(); //从右面到下面
- followingtotop(); //下面平移到上面
- toptofollowing(); //上面平移到下面
- followingtotop(); //下面平移到上面
- toptofollowing(); //上面平移到下面
- any1(); //3个点 贪吃蛇样 到最上面一层全亮 可以接上面到后面在接旋转
- followtotop(); //从上面到后面
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- Thenthelast(); //接旋转下来到第一排
- thelast(); //接下来一排斜的 后4点转到左上1
- randomlight(); //随机亮起
- drip(); //接上面全亮的,滴水 ,最后最下面的一排亮
- alllighttooff(); //闪动4下最后关闭
- alllighttooff();
- /*******************************************************************************/
- any6(); //从下随机升起 一直上去 最后灭 快速过场
- any6();
- around2(); //从左下第一点贪吃蛇样 转到左上第一点
- spread(); //从左上1扩散全部一次 最后回到右上1
- framework(); //从右上第一点延伸框架
- ys(2000);
- nextkj1(); //第一种接框架后 4个小正方形转动最后全亮
- allfalloff(); //由全亮到下落关闭只剩一排
- turnR(); //由下面一排转到右面
- righttoleft(); //右面平移到左面
- lefttoright(); //左面平移到右面
- turnD(); //从右面到下面
- followingtotop(); //下面平移到上面
- drip(); //接上面全亮的,滴水 ,最后最下面的一排亮
- followingtofront(); //从最下面全亮到最前面一列
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- aroundnext(); //接Around 第一面转到左边第一列
- lefttoright(); //左面平移到右面
- toptofollowing(); //上面平移到下面
- followingtotop(); //下面平移到上面
- rain(); //全关 水滴到全关
- any1(); //3个点 贪吃蛇样 到最上面一层全亮 可以接上面到后面在接旋转
- followtotop(); //从上面到后面
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- Thenthelast(); //接旋转下来到第一排
- any5(); //从地下旋转起来 接旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- Thenthelast(); //接旋转下来到第一排
- thelast(); //接下来一排斜的 后4点赚转到上面1
- rain(); //全关 水滴到全关
- any6(); //从下随机升起 一直上去 最后灭 快速过场
- around2(); //从左下第一点贪吃蛇样 转到左上第一点
- nextfourspread(); //由右上四个小正方体扩散一次 在扩散一次 回到中间四个
- fourspread(); //从四个小灯亮扩散到外面四个亮
- ys(1000);
- any2(); //从底下中间一个小正方体 慢慢向上走 到顶层扩散开 在下到底层
- any2(); //从底下中间一个小正方体 慢慢向上走 到顶层扩散开 在下到底层
- followingtotop(); //下面平移到上面
- followtotop(); //从上面到后面
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- Thenthelast(); //接旋转下来到第一排
- thelast(); //接下来一排斜的 后4点转到左上1
- twoidea(); //左上1开始 三个走 最后 底层亮完
- any7(); //音频显示 从底层亮完开始,最后全灭
- randomlight(); //随机亮完
- randomoff(); //随机灭完
- any8(); //由全灭 到右下第一个起来成一竖列 然后竖列逐个走 最后到左上一个亮
- nextfourspread(); //由右上四个小正方体扩散一次 在扩散一次 回到中间四个
- fourspread(); //从中间四个小灯亮扩散到外面四个亮
- framework(); //从右上第一点延伸框架
- nextkj2(); //第二种接框架后 最后上面一排亮
- any9(); //由上面一排全亮 转到左上小正方形
- nextkj1(); //第一种接框架后 4个小正方形转动最后全亮
- alllighttooff(); //闪动4下最后关闭
- rain(); //全关 水滴到全关
- any1(); //3个点 贪吃蛇样 到最上面一层全亮 可以接上面到后面在接旋转
- followtotop(); //从上面到后面
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- spin(); //旋转
- Thenthelast(); //接旋转下来到第一排
- thelast(); //接下来一排斜的 后4点赚转到上面1
- twoidea(); //左上1开始 三个走 最后 底层亮完
- followingtotop(); //下面平移到上面
- drip(); //接上面全亮的,滴水 ,最后最下面的一排亮
- followingtofront(); //从最下面全亮到最前面一列
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- around(); //最前面一面全亮开始 围着光立方转 最后回到第一面
- P0=0; //关闭全部
- ys(200);
- randomlight(); //随机亮完
- end(); //全亮 呼吸灭
- }
- // int i,j,k;
- // while(1)
- // {
- // for(j=0;j<38;j++)
- // {
- // for(k=0;k<10;k++)
- // {
- // for(i=0;i<8;i++)
- // {
- // P0=0;
- // P2=tabP2[i];
- // P0=tabP0[j][i];
- // ys(10);
- //
- // }
- // }
- // }
- // }
- }
复制代码 |