RTClib
Public Member Functions | List of all members
RTC_PCF8563 Class Reference

RTC based on the PCF8563 chip connected via I2C and the Wire library. More...

#include <RTClib.h>

Inheritance diagram for RTC_PCF8563:
RTC_I2C

Public Member Functions

bool begin (TwoWire *wireInstance=&Wire)
 Start I2C for the PCF8563 and test succesful connection. More...
 
bool lostPower (void)
 Check the status of the VL bit in the VL_SECONDS register. More...
 
void adjust (const DateTime &dt)
 Set the date and time. More...
 
DateTime now ()
 Get the current date/time. More...
 
void start (void)
 Resets the STOP bit in register Control_1.
 
void stop (void)
 Sets the STOP bit in register Control_1.
 
uint8_t isrunning ()
 Is the PCF8563 running? Check the STOP bit in register Control_1. More...
 
Pcf8563SqwPinMode readSqwPinMode ()
 Read the mode of the CLKOUT pin on the PCF8563. More...
 
void writeSqwPinMode (Pcf8563SqwPinMode mode)
 Set the CLKOUT pin mode on the PCF8563. More...
 

Detailed Description

RTC based on the PCF8563 chip connected via I2C and the Wire library.

Member Function Documentation

◆ begin()

bool RTC_PCF8563::begin ( TwoWire *  wireInstance = &Wire)

Start I2C for the PCF8563 and test succesful connection.

Parameters
wireInstancepointer to the I2C bus
Returns
True if Wire can find PCF8563 or false otherwise.

◆ lostPower()

bool RTC_PCF8563::lostPower ( void  )

Check the status of the VL bit in the VL_SECONDS register.

The PCF8563 has an on-chip voltage-low detector. When VDD drops below Vlow, bit VL in the VL_seconds register is set to indicate that the integrity of the clock information is no longer guaranteed.

Returns
True if the bit is set (VDD droped below Vlow) indicating that the clock integrity is not guaranteed and false only after the bit is cleared using adjust()

◆ adjust()

void RTC_PCF8563::adjust ( const DateTime dt)

Set the date and time.

Parameters
dtDateTime to set

◆ now()

DateTime RTC_PCF8563::now ( )

Get the current date/time.

Returns
DateTime object containing the current date/time

◆ isrunning()

uint8_t RTC_PCF8563::isrunning ( void  )

Is the PCF8563 running? Check the STOP bit in register Control_1.

Returns
1 if the RTC is running, 0 if not

◆ readSqwPinMode()

Pcf8563SqwPinMode RTC_PCF8563::readSqwPinMode ( )

Read the mode of the CLKOUT pin on the PCF8563.

Returns
CLKOUT pin mode as a Pcf8563SqwPinMode enum

◆ writeSqwPinMode()

void RTC_PCF8563::writeSqwPinMode ( Pcf8563SqwPinMode  mode)

Set the CLKOUT pin mode on the PCF8563.

Parameters
modeThe mode to set, see the Pcf8563SqwPinMode enum for options

The documentation for this class was generated from the following files: