百度网盘下载地址(974):点击下载
#include <at89x51.h>
#define uchar unsigned char
#define uint unsigned int
#define M 10
char s;
uchar num = 0;
char time = 30; /* 抢答时间 */
char datitime = 30; /* 答题限时时间 */
uint tt, t1; /* T0,T1定时器定一秒时 */
bit flag, s_flag = 1, b_flag, fall_flag; /* 标志位 */
bit K_startcountflag, K_timecountflag; /* 时间调整标志位 */
sbit K0 = P3 ^ 0;
sbit beep = P3 ^ 7; /* 蜂鸣器 */
sbit rled = P3 ^ 1; /* 指示灯 */
sbit K1 = P1 ^ 0;
sbit K2 = P1 ^ 1;
sbit K3 = P1 ^ 2;
sbit K4 = P1 ^ 3;
sbit K5 = P1 ^ 4;
sbit K6 = P1 ^ 5;
sbit K7 = P1 ^ 6;
sbit K8 = P1 ^ 7;
sbit scl = P0 ^ 0;
sbit sda = P0 ^ 1;
sbit K_Time = P3 ^ 2; /*复位键 */
sbit K_startcount = P3 ^ 3; /* 开始抢答时间调整键 */
sbit add = P3 ^ 4; /* 答题计时时间调整键 */
sbit sub = P3 ^ 5; /* 答题计时时间调整键 */