⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1302.h

📁 使用台湾普诚pt6961驱动数码管和按键,显示ds1302的源码,详细的6961驱动代码
💻 H
字号:

#include "my_type.h"



#ifndef __1302_C__
#define __1302_C__

#define		DS1302_WP    			0x8E
#define		DS1302_RESET   			RST=LOW;SCL=LOW;RST=HIGH
#define		DS1302_WP_ENABLE  		Write_1302(DS1302_WP,0X00)
#define		DS1302_WP_DISENABLE  	Write_1302(DS1302_WP,0x80)

sbit	SCL = P4^2; // DS1302时钟信号  7脚
sbit	SDA = P1^0; // DS1302数据信号  6脚
sbit	RST = P1^1; // DS1302片选   5脚

void Write_1302_byte(uint8 temp); 
void Write_1302( uint8 address,uint8 dat );
uint8 Read_1302 ( uint8 address );

void Read_RTC(void);//read RTC 
void Set_RTC(void);//set RTC 

void Init_1302(void);//system initize function


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -