满意答案
手机07
推荐于 2017.12.16
采纳率:57% 等级:8
已帮助:513人
# include
# define uint unsigned int
# define uchar unsigned char
code uchar shu[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
4102 /* 0 1 2 3 4 56 7*/
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; //数码管段1653选
/* 8 9a b c def*/
code uchar wen[] = {0xfe,0xfd,0xfb,0xf7,0xef,0xdf};//数码管位选
uchar huancun[] = {0x00,0x00,0x00,0x00,0x00,0x00};//数码管段选缓存
sbit duan = P2^6;//段选
sbit wei = P2^7;//位选
void delay(u