|
#include<reg51.h>
void delay(unsigned int x)
{
unsigned char j;
while(x--)
{
for(j=0;j<125;j++)
{;}
}
}
void main()
{
while(1)
{
P0=0xfe;
delay(500);
P0=0xfd;
delay(500);
P0=0xfb;
delay(500);
P0=0xf7;
delay(500);
P0=0xef;
delay(500);
P0=0xdf;
delay(500);
P0=0xbf;
delay(500);
P0=0x7f;
delay(500);
}
}
附仿真图isis professional
|
|