第一次代码优化,增加温度显示功能。

This commit is contained in:
Andy0613
2026-07-07 09:09:27 +08:00
parent 90b9918dc2
commit 971abf1cd8
13 changed files with 4412 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef __DS1302_H_
#define __DS1302_H_
//---����ͷ�ļ�---//
#include<reg51.h>
#include<intrins.h>
//---�ض���ؼ���---//
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef uint
#define uint unsigned int
#endif
//---����ds1302ʹ�õ�IO��---//
sbit DSIO=P1^1;
sbit RST=P1^2;
sbit SCLK=P1^0;
//---����ȫ�ֺ���---//
void Ds1302Write(uchar addr, uchar dat);
uchar Ds1302Read(uchar addr);
void Ds1302Init();
void Ds1302ReadTime();
void Ds1302WriteTime();
//---����ȫ�ֱ���--//
extern uchar TIME[7]; //����ȫ�ֱ���
#endif