标题: 分享一个单片机+1602+DS1302时钟测试,需要的自取 [打印本页]

作者: COG电子    时间: 2020-4-6 11:39
标题: 分享一个单片机+1602+DS1302时钟测试,需要的自取
程序如下
#include <REGX52.H>
#include "LCD1602.h"
#include "DS1302.h"
void Delay1ms(unsigned int count)
{
unsigned int i,j;
for(i=0;i<count;i++)
for(j=0;j<120;j++);
}
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);
}
}

捕获.PNG (81.59 KB, 下载次数: 40)

捕获.PNG

ds1302时钟.zip

145.26 KB, 下载次数: 64, 下载积分: 黑币 -5


作者: 8imi8    时间: 2020-7-25 02:08
没1602 c文本
作者: 张张不会单片机    时间: 2020-8-10 10:47
请问这是完整的程序代码么





欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1