#include<reg52.h>
void Delay(int t)
{
while(t--);
}
void main()
{
unsigned char i;
while(1)
{
P1=0xfe;
for(i=1;i<=9;i++)
{
Delay(50000);
P1<<=1;
P1=P1|0x01;
}
}
}
#include<reg52.h>
void Delay(int t)
{
while(t--);
}
void main()
{
unsigned char i;
while(1)
{
P1=0xfe;
for(i=1;i<=9;i++)
{
Delay(50000);
P1<<=1;
P1=P1|0x01;
}
}
}
转载于:https://www.cnblogs.com/fengyepiaolei/archive/2011/11/18/2254549.html