LED
Published Tuesday, 4 October 2011 by gk in#include<reg51.h>
void delay(unsigned int a);
void main()
{
P2=0XFF;
while(1)
{
P2=0xAA;
delay(10);
P2=0x55;
delay(10);
}
}
void delay(unsigned int a)
{
int i,j;
for(i=0;i=a;i++)
for(j=0;j=125;j++);
}
void delay(unsigned int a);
void main()
{
P2=0XFF;
while(1)
{
P2=0xAA;
delay(10);
P2=0x55;
delay(10);
}
}
void delay(unsigned int a)
{
int i,j;
for(i=0;i=a;i++)
for(j=0;j=125;j++);
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment