#include #include #define uint unsigned int #define uchar unsigned char void Stopwatch(); //声明秒表函数 void Clock(); //声明闹钟函数 void Output(); //声明输出函数 void important(); //声明重要函数(相当于mian()函数) void TLimit(); //声明调节温度上下限函数 sbit DS1302_CLK = P1^7; //实时时钟时钟线引脚 sbit DS1302_IO = P1^6; //实时时钟数据线引脚 sbit DS1302_RST = P1^5; //实时时钟复位线引脚 sbit wireless_1 = P3^0; //温度过上限标志 sbit wireless_2 = P3^1; //温度适中标志 sbit wireless_3 = P3^2; //温度过下限标志 sbit fan = P3^4; //开风扇标志 sbit clock=P3^5; //开关闹钟 sbit setclock = P3^6; //闹钟开启控制 sbit stopwatch = P3^7; //秒表开启控制 sbit ACC0 = ACC^0; sbit ACC7 = ACC^7; char hide_sec,hide_min,hide_hour,hide_day,hide_week,hide_month,hide_year; //秒,分,时到日,月,年位闪的计数 sbit Set = P2^0; //模式切换键 sbit Up = P2^1; //加法按钮 sbit Down = P2^2; //减法按钮 sbit out = P2^3; //立刻跳出调整模式按钮 sbit DQ = P1^0; //温度传送数据 IO 口 c