#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--); }
是你用的移位函數(shù)有問題,_crol_ 這一句t=_lror_(t,1);換成t=_crol_ (t,1); 應(yīng)該可以了
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |