标题: DS1302时钟+1602液晶,proteus电路图+程序 [打印本页]

作者: 843995188    时间: 2017-5-31 03:24
标题: DS1302时钟+1602液晶,proteus电路图+程序
仿真原理图如下(proteus仿真工程文件可到本帖附件中下载)

#include <REGX51.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);
                TimeToStr(&CurrentTime);
                GotoXY(6,1);
                Print(CurrentTime.TimeString);

                Delay1ms(400);
        }
}

全部资料下载地址:
DS1302时钟 1602液晶.rar (43.19 KB, 下载次数: 67)




作者: 哈哈里德君    时间: 2018-12-27 09:22
非常棒,想看看
作者: 小林笙    时间: 2019-6-5 09:05
楼主这个闹钟掉电会保存吗
作者: ysw26340    时间: 2019-10-17 09:58
调时间按键在哪里?
作者: gwm0620    时间: 2019-10-20 11:19
大佬~~~程序不全啊




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