PCF85063A Arduino Library 1.0.0
Soldered Library for the PCF85063A.
Loading...
Searching...
No Matches
PCF85063A Class Reference

#include <PCF85063A-SOLDERED.h>

Public Types

enum  CountdownSrcClock { TIMER_CLOCK_4096HZ = 0 , TIMER_CLOCK_64HZ = 1 , TIMER_CLOCK_1HZ = 2 , TIMER_CLOCK_1PER60HZ = 3 }
 

Public Member Functions

 PCF85063A ()
 Main constructor.
 
void begin ()
 Initialize communication.
 
void setTime (uint8_t hour, uint8_t minute, uint8_t sec)
 Method to set time.
 
void setDate (uint8_t weekday, uint8_t day, uint8_t month, uint16_t yr)
 Method to set the date.
 
void readTime ()
 Reads time and date from the RTC.
 
void enableAlarm ()
 Enables the alarm of the RTC.
 
void setAlarm (uint8_t alarm_second, uint8_t alarm_minute, uint8_t alarm_hour, uint8_t alarm_day, uint8_t alarm_weekday)
 Sets the alarm to all the params.
 
void readAlarm ()
 Reads the alarm of the RTC.
 
bool changeTimeFormat ()
 
void timerSet (CountdownSrcClock source_clock, uint8_t value, bool int_enable, bool int_pulse)
 Sets the timer countdown.
 
bool checkTimerFlag ()
 Returns is the timer flag on.
 
void reset ()
 Resets the timer.
 
uint8_t getSecond ()
 Small user method.
 
uint8_t getMinute ()
 Small user method.
 
uint8_t getHour ()
 Small user method.
 
uint8_t getDay ()
 Small user method.
 
uint8_t getWeekday ()
 Small user method.
 
uint8_t getMonth ()
 Small user method.
 
uint16_t getYear ()
 Small user method.
 
uint8_t getAlarmSecond ()
 Small user method.
 
uint8_t getAlarmMinute ()
 Small user method.
 
uint8_t getAlarmHour ()
 Small user method.
 
uint8_t getAlarmDay ()
 Small user method.
 
uint8_t getAlarmWeekday ()
 Small user method.
 

Private Member Functions

uint8_t decToBcd (uint8_t val)
 Converts decimal to BCD.
 
uint8_t bcdToDec (uint8_t val)
 Converts BCD to decimal.
 

Private Attributes

uint8_t hour
 
uint8_t minute
 
uint8_t second
 
uint8_t day
 
uint8_t weekday
 
uint8_t month
 
uint16_t year
 
uint8_t alarm_second
 
uint8_t alarm_minute
 
uint8_t alarm_hour
 
uint8_t alarm_day
 
uint8_t alarm_weekday
 
uint8_t control_2
 

Member Enumeration Documentation

◆ CountdownSrcClock

Enumerator
TIMER_CLOCK_4096HZ 
TIMER_CLOCK_64HZ 
TIMER_CLOCK_1HZ 
TIMER_CLOCK_1PER60HZ 

Constructor & Destructor Documentation

◆ PCF85063A()

PCF85063A::PCF85063A ( void )

Main constructor.

Member Function Documentation

◆ bcdToDec()

uint8_t PCF85063A::bcdToDec ( uint8_t val)
private

Converts BCD to decimal.

◆ begin()

void PCF85063A::begin ( )

Initialize communication.

◆ changeTimeFormat()

bool PCF85063A::changeTimeFormat ( )

◆ checkTimerFlag()

bool PCF85063A::checkTimerFlag ( )

Returns is the timer flag on.

Returns
bool Returns true if the timer flag is on

◆ decToBcd()

uint8_t PCF85063A::decToBcd ( uint8_t val)
private

Converts decimal to BCD.

◆ enableAlarm()

void PCF85063A::enableAlarm ( )

Enables the alarm of the RTC.

◆ getAlarmDay()

uint8_t PCF85063A::getAlarmDay ( )

Small user method.

Returns
uint8_t Returns the current alarm day

◆ getAlarmHour()

uint8_t PCF85063A::getAlarmHour ( )

Small user method.

Returns
uint8_t Returns the current alarm hours

◆ getAlarmMinute()

uint8_t PCF85063A::getAlarmMinute ( )

Small user method.

Returns
uint8_t Returns the current alarm minutes

◆ getAlarmSecond()

uint8_t PCF85063A::getAlarmSecond ( )

Small user method.

Returns
uint8_t Returns the current alarm seconds

◆ getAlarmWeekday()

uint8_t PCF85063A::getAlarmWeekday ( )

Small user method.

Returns
uint8_t Returns the current alarm weekday

◆ getDay()

uint8_t PCF85063A::getDay ( )

Small user method.

Returns
uint8_t Returns the current day

◆ getHour()

uint8_t PCF85063A::getHour ( )

Small user method.

Returns
uint8_t Returns the current hours

◆ getMinute()

uint8_t PCF85063A::getMinute ( )

Small user method.

Returns
uint8_t Returns the current minutes

◆ getMonth()

uint8_t PCF85063A::getMonth ( )

Small user method.

Returns
uint8_t Returns the current month

◆ getSecond()

uint8_t PCF85063A::getSecond ( )

Small user method.

Returns
uint8_t Returns the current seconds

◆ getWeekday()

uint8_t PCF85063A::getWeekday ( )

Small user method.

Returns
uint8_t Returns the current weekday

◆ getYear()

uint16_t PCF85063A::getYear ( )

Small user method.

Returns
uint8_t Returns the current year

◆ readAlarm()

void PCF85063A::readAlarm ( )

Reads the alarm of the RTC.

◆ readTime()

void PCF85063A::readTime ( )

Reads time and date from the RTC.

◆ reset()

void PCF85063A::reset ( )

Resets the timer.

◆ setAlarm()

void PCF85063A::setAlarm ( uint8_t alarm_second,
uint8_t alarm_minute,
uint8_t alarm_hour,
uint8_t alarm_day,
uint8_t alarm_weekday )

Sets the alarm to all the params.

Parameters
uint8_talarm_second Set the alarm seconds
uint8_talarm_minute Set the alarm minutes
uint8_talarm_hour Set the alarm hours
uint8_talarm_day Set the alarm day
uint8_talarm_weekday Set the alarm weekday

◆ setDate()

void PCF85063A::setDate ( uint8_t weekday,
uint8_t day,
uint8_t month,
uint16_t yr )

Method to set the date.

Parameters
uint8_tweekday Set the weekday
uint8_tday Set the day
uint8_tmonth Set the month
uint8_tyr Set the year

◆ setTime()

void PCF85063A::setTime ( uint8_t hour,
uint8_t minute,
uint8_t second )

Method to set time.

Parameters
uint8_thour Set the hour
uint8_tminute Set the minutes
uint8_tsecond Set the seconds

◆ timerSet()

void PCF85063A::timerSet ( CountdownSrcClock source_clock,
uint8_t value,
bool int_enable,
bool int_pulse )

Sets the timer countdown.

Member Data Documentation

◆ alarm_day

uint8_t PCF85063A::alarm_day
private

◆ alarm_hour

uint8_t PCF85063A::alarm_hour
private

◆ alarm_minute

uint8_t PCF85063A::alarm_minute
private

◆ alarm_second

uint8_t PCF85063A::alarm_second
private

◆ alarm_weekday

uint8_t PCF85063A::alarm_weekday
private

◆ control_2

uint8_t PCF85063A::control_2
private

◆ day

uint8_t PCF85063A::day
private

◆ hour

uint8_t PCF85063A::hour
private

◆ minute

uint8_t PCF85063A::minute
private

◆ month

uint8_t PCF85063A::month
private

◆ second

uint8_t PCF85063A::second
private

◆ weekday

uint8_t PCF85063A::weekday
private

◆ year

uint16_t PCF85063A::year
private

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