KE0108 keyes PCF8563时钟模块(焊盘孔) 红色 环保

KE0108 PCF8563时钟模块  (1)

1、概述

PCF8563时钟模块主要用到了PCF8563T芯片。它是PHILIPS 公司推出的一款工业级内含I2C 总线接口功能的具有极低功耗的多功能时钟/日历芯片。PCF8563 的多种报警功能、定时器功能、时钟输出功能以及中断输出功能能完成各种复杂的定时服务,甚至可为单片机提供看门狗功能。是一款性价比极高的时钟芯片,它已被广泛用于电表、水表、气表、电话、传真机、便携式仪器以及电池供电的仪器仪表等产品领域。模块自带2个定位孔,方便你将模块固定在其他设备。

2、规格参数

工作电压:3.3-5V(DC)

通信方式:I2C通信

电池型号:BS-1220 3V

3、连接图

KE0108

4、测试代码

#include <Wire.h>

#include <Rtc_Pcf8563.h>

/* get a real time clock object */

Rtc_Pcf8563 rtc;

void setup()

{

Serial.begin(9600);

rtc.initClock();

/* set a time to start with.

* day, weekday, month, century, year */

rtc.setDate(2, 1, 4, 0, 18);

/* hr, min, sec */

rtc.setTime(8, 29, 55);

}

void loop()

{

/* each sec update the display */

Serial.print(rtc.formatTime());

Serial.print(” “);

Serial.println(rtc.formatDate());

delay(1000);

}

5、测试结果

按照上图接好线,烧录好代码,上电后,模块上的D3灯亮起,打开串口监视器,设置波特率为9600,显示代码中所设初始时间,日期,如下图。

6、库文件链接

https://pan.baidu.com/s/1asGKehi5Vtj46wDlJDwBHg

提取码:f623