#include<reg52.h>
sbit led=P0^0;
void delay(unsigned int x)
{
unsigned int y,z;
for(y=0;y<30000;y++)
for(z=x;z<0;z--);
}
void delay1()
{
unsigned int y;
for(y=0;y<3;y++);
}
void main()
{
while(1)
{
led=0;
delay1();
led=1;
delay(10000);
delay(10000);
delay(10000);
}
}
|