文章目录 解释效果代码 解释 效果 代码 #include <REGX52.H> void Delay(unsigned int xms) //@11.0592MHz { unsigned char i, j; while(xms--){ i = 2; j = 239; do { while (--j); } while (--i); } } void main(){ //选中第5个数码管 //显示6 0111 1101 unsigned char num=0x7d; P2_2=0; P2_3=0; P2_4=1; Delay(1); while(1){ P0=num; } }