#include <reg51.h>
sbit Led0=P1^0;
void delay(unsigned int i)
{
unsigned int j,k;
for(j=0;j<=i;j++)
{
for(k=0;k<256;k++);
}
}
void main(void)
{
P1 = 0xff;
while(1)
{
Led0 = 0;
delay(5);
Led0 = 1;
delay(5);
}
}
sbit Led0=P1^0;
void delay(unsigned int i)
{
unsigned int j,k;
for(j=0;j<=i;j++)
{
for(k=0;k<256;k++);
}
}
void main(void)
{
P1 = 0xff;
while(1)
{
Led0 = 0;
delay(5);
Led0 = 1;
delay(5);
}
}
Comments
Post a Comment