Write a program to glow alternate LEDs simultaneously and it should be repeated infinitely.


#include<8051.h>
void delay(unsigned int i)
{
while(i!=0)
{
i–;
}
}
void main()
{
while(1)
{
P0=0xaa;
delay(50000);
P0=0xff;
delay(50000);
}
}

Add Comment