51任务17:定时器控制数码管从00-59,1秒增一
#include "reg52.h"
//数据类型声明
typedef unsigned int u16;
typedef unsigned char u8;
sbit LSA=P2^2;
sbit LSB=P2^3;
sbit LSC=P2^4;
//数码表
u8 code smgduan[17]={
0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
u8 DisplayData[8];
u8 s,ms;//秒 毫秒
//延时函数 i=1 延时10us
void