#include<reg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp;
void delay(uint z);
void main()
{
temp=0xfe;
P1=temp;
while(1)
{
delay(1000);
temp=_crol_(temp,1);
P1=temp;
}
}
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}最后一行改為
for(y=110;y>0;y--);
錯(cuò)誤的原因是 ;這個(gè)符號(hào)要用英文狀態(tài)下的才行.你的程序是用的中文的
| 歡迎光臨 (http://www.raoushi.com/bbs/) | Powered by Discuz! X3.1 |