#include "reg52.h"
#include "intrins.h"
typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned long ulong;
sfr T2H = 0xd6; //定时器2高8位
sfr T2L = 0xd7; //定时器2低8位
sfr AUXR = 0x8e; //辅助寄存器
sfr ADC_CONTR = 0xBC; //ADC控制寄存器
sfr ADC_RES = 0xBD; //ADC高8位结果
sfr ADC_RESL = 0xBE; //ADC低2位结果
sfr P1ASF = 0x9D; //P1口第2功能控制寄存器
sfr CLK_DIV = 0x97;
sbit LSA=P3^2;
sbit LSB=P3^3;
sbit LSC=P3^4;
uchar code smgduan[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//显示0~F的值
uchar DisplayData[8];
void Delay_ms(unsigned int ms)//ms级延时
{
unsigned int a,b;
for(a=ms;a>0;)
{
for(b=1000;b>0;)
{