從低位到高位流動(dòng)的閃爍燈
作者:huqin 來(lái)源:本站原創(chuàng) 點(diǎn)擊數(shù):
… 更新時(shí)間:2014年04月26日 【字體:
大 中 小】
#include<reg51.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned
char
void delay(uint x )
{
uint i,j;
for(i=x;i>0;i--)
for(j=110;j>0;j--);
}
void main()
{
P0=0xfe;
while(1)
{
P0=_crol_(P0,1);
delay(100);
}
}