#include <reg52.h>
unsigned char code Number[]=
{0x3f,0x06,0x5b,0x4f,
0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
sbit wei1=P2^4;
sbit wei2=P2^5;
sbit wei3=P2^6;
sbit wei4=P2^7;
void main(){
wei1=0;
wei2=0;
wei3=0;
wei4=0;
while(1){
wei1=1;
P0=Number[12];
wei1=0;
wei2=1;
P0=Number[5];
wei2=0;
wei3=1;
P0=Number[1];
wei3=0;
wei4=1;
P0=Number[6];
wei4=0;
}
}
为什么我只开一个数码管的时候,显示很清晰。开两个以上就不清晰了,而且也不对,总有不该显的段显示出来了,要是加延时,干脆就不显了
此帖出自
小平头技术问答
一周热门 更多>