#include
unsigned int num=12345;
unsigned char shuma[10]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
unsigned char weima[8]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void delay()
{
unsigned int i=500;
while(i--);
}
void main()
[
p2=0xff;p0=0x40;p2=weima[0];delay();
p2=0xff;p0=0x40;p2=weima[1];delay();
p2=0xff;p0=0x40;p2=weima[2];delay();
p2=0xff;p0=shuma[num/10000];p2=weima[3];delay();
p2=0xff;p0=shuma[num%10000/1000];p2=weima[4];delay();
p2=0xff;p0=shuma[num%1000/100];p2=weima[5];delay();
p2=0xff;p0=shuma[num%100/10];p2=weima[6];delay();
p2=0xff;p0=shuma[num%10];p2=weima[7];delay();
}
52单片机调试程序
- 格式:txt
- 大小:0.64 KB
- 文档页数:1