#include<reg52.h> #include<intrins.h> #define u unsigned int sbit D1=P1^4; void j(z); char t; void main() { D1=0; t=0x7f; P0=t; while(1) { t=_lror_(t,1); j(500); P0=t; } } void j(u z) { u x,y; for(x=z;x>0;x--) for(y=20;y>0;y--); }
是你用的移位函数有问题,_crol_ 这一句t=_lror_(t,1);换成t=_crol_ (t,1); 应该可以了
欢迎光临 (http://www.51hei.com/bbs/) | Powered by Discuz! X3.1 |