#include <reg51.h>
void delay(void)
{
unsigned char i ,j;
for(i=0;i<200;i++)
for(j=0;j<200;j++);
}
void main(void)
{
while(1)
{
P0=0xfe;P2=0x7f;
delay();
P0=0xfd;P2=0xbf;
delay();
P0=0xfb;P2=0xdf;
delay();
P0=0xf7;P2=0xef;
delay();
P0=0xef;P2=0xf7;
delay();
P0=0xdf;P2=0xfb;
delay();
P0=0xbf;P2=0xfd;
delay();
P0=0x7f;P2=0xfe;
delay();
}
}
|