基于STC89C52RC单片机的数字电子钟设计程序,要求:实现液晶显示,整点报时,遥控器可调节时间

希望会的联系 谢谢!!!

第1个回答  2013-12-29
#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);
}
}追问

这个程序不太全吧??

相似回答