1、0x81,0xc3,0xe7,0xff;uchar code table6=0x7e,0x3c,0x18,0x00,0x18,0x3c,0x7e,0xff;void delay(uchar); void lsd1();void lsd2();void lsd3();void lsd4();void lsd5();void lsd6();void lsd7();void lsd8();void lsd9();void lsd10();void lsd11();void lsd12();main() while(1) lsd1(); lsd2(); lsd3(); lsd4(); lsd5();
2、lsd6(); lsd7(); lsd8(); lsd9(); lsd10(); lsd11(); lsd12(); void delay(uchar x) /延时函数 uint i,j; for(i=x;i0;i-) for(j=250;jj-);void lsd1() /lsd1 单个流水灯双程模式1 uchar a,i,j,k,l,l1,k1,j1,i1; a=0xfe; P0=a; delay(z); for(i=0;i7;i+) /仅单个灯亮从上往下流 a=_crol_(a,1); P0=a; delay(z); P0=0xff; P2=a; for(j=0;jj+) P2=a; P
3、2=0xff; P3=a; for(k=0;kk+) P3=a; P3=0xff; P1=a; for(l=0;ll+) P1=a; a=0xbf; for(l1=0;l16;l1+) /l1=6 仅单个灯亮从下往上流 a=_cror_(a,1); P1=0xff; a=0x7f; for(k1=0;k1k1+) for(j1=0;j1j1+) for(i1=0;i1i1+)void lsd2() /lsd2 两个灯流水双程模式1 a=al1+) a=0x3f; P0=0xfe; void lsd3() /lsd3 两个灯流水双程模式2i+) /_crol_与_cror_混合使用 P0=f; P2=f; P3=f; P1=f;l1+) /l1=6void lsd4() /lsd4i+) a=a P2=table3k; P3=table3k; P0=table1l; P1=table1l; while(1);