为什么程序输出P1口不能按程序输出电平
#include <REGX51.H> void delay () { unsigned char i,j; for (i=0;i<255;i++) for(j=0;j<255;j++); } void main() { unsigned char j=0XFE;
while(1) { j=(j<<1)|0X01; if(j==0xff) j=0XFE; P1=j; delay(); j=0X55; P1=j; delay(); j=~j; P1=j; delay(); j=0X33; P1=j; delay(); j=~j; P1=j; delay(); j=0X11; P1=j; delay(); j=~j; P1=j; delay(); j=0X04; P1=j; delay(); j=~j; P1=j; delay(); } }
|