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