_ds1302(0x8E,0x80);//禁止写入DS1302 while(KeyFour==KEYDOWN);//等待键放去} }?}?switch(StartChange)?{?caseKEYINIT: show_Data(); Show_Time(); break;?caseKEYYEAR: Set_Year(); break;?caseKEYMONTH: SetMonth(); break;?caseKEYDAY: SetDay(); break;?caseKEYWEEK: SetWeek(); break;?caseKEYHOUR: SetHour(); break;?caseKEYMINUTE: SetMinute(); break; caseKEYSECOND: SetSecond(); break;?caseKEYALARH: SetAlarH(); break;?caseKEYALARM: SetAlarM(); break;?default:break;?}}voidtimer0()interrupt1{?TH0=0x3c;//定时器T0的高四位=0?TL0=0xb0;//定时器T0的低四位=0tmpchangeA();//温度转换?TempVal=gettmpA();//读取温度寄存器转换数据?read_rtc();//?GetTime();//提取时钟芯片时间信息//?show_Data();//Show_Time();}/*定时器0中断程序(闹钟)*/voidtimet1(void)interrupt3?{?TH1=0X15;?//重置时间(60MS)?TL1=0XA0;?Beep=!Beep;//蜂鸣器响}/*主函数*/voidmain(void){?HandInit();?while(1)?{?Process();?buz();?}}附录二--