#include<reg52.h>
#include<intrins.h>
#include<stdio.h>
unsigned char shift,j=0;
unsigned char code table[]={0x40,0x40,0x40,0x40,0x73,0x77,0x6d,0x6d,0x40,0x77,0x38,0x38,0x40,0x40,0x40,0x40}; // --PASS-ALL--
void delay(unsigned int del)
{
unsigned int x,y;
for(x=del;x>0;x--)
for(y=119;y>0;y--)
;
}
void display(void);
void main()
{
char k;
P0=0xFF;
P2=0xFF;
while(1)
{
for(j=0;j<9;j++)
{
for(k=0;k<125;k++)
display();
}
delay(1000);
P0=0xFF;
P2=0xFF;
}
}
void display(void)
{
char i;
//shift=0xfe;
shift=7;
for(i=7; i>=0; i--)
{
P0=table[i+j];
P2=shift;
//shift=(shift<<1)|0x01;
if(shift>0) shift--;
else shift=7;
delay(1);
}
P2=0xff ;
}