main()
{ unsigned char i;
BEEP=0;
Init_Timer0();
Ds1302_Init();
Init_DS18B20();
Init_ST7920(); //初始化
IRcvStr(0xae,80,Alarm,4); //从24c02读出数据
LCD_PutGraphic(pic0);
for(i=0;i<10;i++)
DelayMs(200);
CGRAM(0);
Interface=MainInterface;//默认界面=主界面
while(1)
{
KeyValue=KeyScan();
if(KeyValue!=0)//如果有键按下
{ BEEP=1;
Keyprocessing(KeyValue); //键值处理
LCD_PutGraphic(pic0);
ClrScreen();
DelayMs(50);
BEEP=0;
}
Ds1302_Read_Time(); //读取时钟
ClockAlarm(); //时钟报警
temper=ReadTemperature();
temperature=(float)temper*0.0625;//读取温度
interface_display(Interface);//显示界面
}
} |