#include<REGX52.H>
#include<INTRINS.H>
voidDelay500ms()
{
unsigned chari,j,k;
nop();
i=4;
j=129;
k=119;
do
{
do
{
while(--k);
}while(--j);
}while (- i);
}
voidmain ()
{
P1=0XFE;
Delay500ms();
P1=0XFD;
Delay500ms();
P1=0XFB;
Delay500ms();
P1=0XF7;
Delay500ms ();
P1=0XEF;
Delay500ms();
P1=OXDF;
Delay500ms();
P1=0XBE;
Delay500ms();
P1=0X7F;
Delay500ms();
}
#include<REGX52.H>
#include<INTRINS.H>
voidDelay500ms()
{
unsigned chari,j,k;
nop();
i=4;
j=129;
k=119;
do
{
do
{
while(--k);
}while(--j);
}while (- i);
}
void main ()
{
char i= 2;
while(i--){
P1=0XFE;
Delay500ms();
P1=0XFD;
Delay500ms();
P1=0XFB;
Delay500ms();
P1=0XF7;
Delay500ms ();
P1=0XEF;
Delay500ms();
P1=OXDF;
Delay500ms();
P1=0XBE;
Delay500ms();
P1=0X7F;
Delay500ms();
}
while(1){}
}