#include <reg51.h>
void delay(unsigned int)
unsigned char dis[5][8]=
{
{0xfe,oxfd,oxfb,0xf7,0xef,0xdf,0xbf,0x7f}
,{0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe}
,{0x00,0xff,0x00,0xff,0x00,0ff,0x00,0xff}
,{ox7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}
,{0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f}
};
void main (void)
{unsigned char d;unsigned char h;
while(1)
{
p0=dis[0][0];
delay(10);
p0=dis[4][4];
delay(10);
}
}
void delay(unsigned int i)
{unsigned int j;
for(i;i!=0;i--)
for(j=3000;j!=0;j--);
} |