/********************头文件****************/
#include <REGX52.H>
#include "lcd.h"
#include "DS1302.h"

/********************主函数****************/
main()
{
	SYSTEMTIME CurrentTime;
	lcdinitial();
	Initial_DS1302();	
	while(1)
	{
		write_charchuan(0x80,"ATI-51S");
		write_charchuan(0x80+0X40,"TIME:");
		DS1302_GetTime(&CurrentTime);
		TimeToStr(&CurrentTime);
		write_charchuan(0x80+0X40+0X06,CurrentTime.TimeString);
		delayms(400);   //延时时间必须小于1S
	}
}
