#include
#include
#define LED P0
#define WHICH P2
#define CON 50000
#define TH_0 ((65536-CON)/256)
#define TL_0 ((65536-CON)%256)
sbit K1 = P1^7;
sbit K2 = P1^6;
sbit K3 = P1^5;
sbit K4 = P1^4;
//sbit K5 = P2^3;
sbit K6 = P1^2;
sbit K7 = P1^1;
sbit K8 = P1^0;
sbit light = P3^7;
unsigned char code NUM[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};
unsigned char sec=0,min=0,hour=12,n=0;
unsigned char disp[8]={0x00,0x00,0X0A,0x00,0x00,0X0A,0X00,0x00};
unsigned char scan=0xfe,i=0;
//函数声明
void delay(unsigned char);
void sca();
void black(unsigned char);
//主函数
void main()
{
LED = 0X00;
P2 = 0X00;
WHICH &