#include
#include "LCD1602.h"
#include "DS1302.h"
void Delay1ms(unsigned int count)
{
unsigned int i,j;
for(i=0;i
}
main()
{
SYSTEMTIME CurrentTime;
LCD_Initial();
Initial_DS1302();
GotoXY(0,0);
Print("Date: ");
GotoXY(0,1);
Print("Time: ");
while(1)
{
DS1302_GetTime(&CurrentTime);
DateToStr(&CurrentTime);
TimeToStr(&CurrentTime);
GotoXY(6,0);
Print(CurrentTime.DateString);
GotoXY(6,1);
Print(CurrentTime.TimeString);
Delay1ms(300);
}
}
全部资料51hei下载地址:
实时时钟DS1302测试.rar (42.95 KB, 下载次数: 22)
2017-11-5 20:29 上传
点击文件名下载附件
仿真图+完整程序