单片机时钟程序(5)ds1302.h
来源:互联网 发布:什么是网络课件设计师 编辑:程序博客网 时间:2024/05/01 04:41
#ifndef __DS1302_H
#define __DS1302_H
#include <reg52.h>
sbit DS1302_CE = P2^0;
sbit DS1302_CK = P2^2;
sbit DS1302_IO = P2^1;
struct sTime { //日期时间结构体定义
unsigned int year; //年
unsigned char mon; //月
unsigned char day; //日
unsigned char hour; //时
unsigned char min; //分
unsigned char sec; //秒
unsigned char week; //星期
};
void InitDS1302(void);
void SetRealTime(struct sTime *time);
void GetRealTime(struct sTime *time);
#endif
#define __DS1302_H
#include <reg52.h>
sbit DS1302_CE = P2^0;
sbit DS1302_CK = P2^2;
sbit DS1302_IO = P2^1;
struct sTime { //日期时间结构体定义
unsigned int year; //年
unsigned char mon; //月
unsigned char day; //日
unsigned char hour; //时
unsigned char min; //分
unsigned char sec; //秒
unsigned char week; //星期
};
void InitDS1302(void);
void SetRealTime(struct sTime *time);
void GetRealTime(struct sTime *time);
#endif
阅读全文
0 0
- 单片机时钟程序(5)ds1302.h
- 单片机时钟程序(5)ds1302.h
- 单片机时钟程序(4)ds1302.c
- 单片机时钟程序(4)ds1302.c
- 51单片机(AT89C52)DS1302时钟芯片程序
- AVR单片机(ATMEGA16)DS1302时钟芯片程序
- 51单片机DS1302时钟芯片简单程序
- 单片机时钟程序(3)control.h
- 单片机时钟程序(7)key.h
- 单片机时钟程序(3)control.h
- 单片机时钟程序(9)lcd1602.h
- 单片机时钟程序(11)timing.h
- 单片机时钟程序(7)key.h
- 单片机时钟程序(9)lcd1602.h
- 单片机时钟程序(11)timing.h
- 单片机复习程序例举005 -- DS1302时钟芯片
- ds1302时钟C程序
- LCD1602-DS1302时钟程序
- [python] 安装numpy+scipy+matlotlib+scikit-learn及问题解决
- 在docker中使用crontab
- Git常用命令
- Android进程管理详解
- 内网环境Ant Design使用离线Icon图标资源[以更新,亲测可用]
- 单片机时钟程序(5)ds1302.h
- Hibernate SQL查询 addScalar()或addEntity()
- ecilpse安装Hibernate插件
- MySql数据库的历史 | 黄乔国PHP
- 【步兵 cocos2dx】自动化测试
- Android进阶之开发问题笔记
- C语言 百钱百鸡 鸡兔同笼
- 使用JSTL标签
- 常用工具推荐