#include <REGX52.H>
void Delay500ms() //@12.000MHz
{
unsigned char i, j, k;
i = 4;
j = 205;
k = 187;
do
{
do
{
while (--k);
} while (--j);
} while (--i);
}
void main()
{
while(1)
{
P2=0xfe;
Delay500ms(); //1111 1110
P2=0xfd;
Delay500ms(); //1111 1101
P2=0xfb;
Delay500ms(); //1111 1011
P2=0xf7;
Delay500ms(); //1111 0111
P2=0xef;
Delay500ms(); //1110 1111
P2=0xdf;
Delay500ms(); //1101 1111
P2=0xbf;
Delay500ms(); //1011 1111
P2=0x7f;
Delay500ms(); //0111 1111
}
}