精选优质文档-倾情为你奉上#include #define uchar unsigned char#define uint unsigned int#define ulong unsigned longunsigned char code duan = 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f; /段码控制unsigned char code wei=0xfe,0xfd,0xfb,0xf7,0xef,0xdF; /位选控制 查表的方法控制/0xfe,0xfd,0xfb,0xf7,0xef,0xdFvoid display(uchar,uchar,uchar,uchar,uchar,uchar);void delay(uint);uchar flag,n,a,b,c,d,e,f;ulong m;uint num;void main()TMOD=0x25; /设置定时器t1方式2,计数器t0方式0TH