pradeep23
Member level 5
how can i give program for that can u please tell me in c language....
- - - Updated - - -
#include<reg51.h>
#include<stdio.h>
//sfr P2=0xa0;
void delay()
{
unsigned int i,j,k;
for(i=0;i<5;i++)
for(j=0;j<25;j++)
for(k=0;k<50;k++);
}
main()
{
while(1)
{
P0=0x03;
delay();
P0=0x01;
delay();
P0=0x00;
delay();
P0=0x02;
delay();
}
}
- - - Updated - - -
#include<reg51.h>
#include<stdio.h>
//sfr P2=0xa0;
void delay()
{
unsigned int i,j,k;
for(i=0;i<5;i++)
for(j=0;j<25;j++)
for(k=0;k<50;k++);
}
main()
{
while(1)
{
P0=0x03;
delay();
P0=0x01;
delay();
P0=0x00;
delay();
P0=0x02;
delay();
}
}