bool setToCompilerTime(); — Set’s the RTC to the time on the compiler.
bool setTime(uint8_t hund, uint8_t sec, uint8_t min, uint8_t hour, uint8_t date, uint8_t month, uin
— Set’s the time registers of the RTC to a chosen time using individual variables.
bool setTime(uint8_t * time, uint8_t len) — Set’s the time registers of the RTC to a chosen time
using an array of times in the following order
{Hundredths, Seconds, Minutes, Hours, Date, Month, Year, Day} . Please note uint8_t len must be 7,
the length of the time array, for this function to set the time properly.
bool setHundredths(uint8_t value); — Sets the hundredths register to value .
bool setSeconds(uint8_t value); — Sets the seconds register to value .
bool setMinutes(uint8_t value); — Sets the minutes register to value .
bool setHours(uint8_t value); — Sets the hours register to value .
bool setWeekday(uint8_t value); — Sets the weekday register to value .
bool setDate(uint8_t value); — Sets the date register to value .
bool setMonth(uint8_t value); — Sets the month register to value .
bool setYear(uint8_t value); — Sets the year register to value .
void set12Hour(); — Sets the RTC to 12 hour mode.
void set24Hour(); — Sets the RTC to 24 hour mode.
void enableTrickleCharge(uint8_t diode = DIODE_0_3V, uint8_t rOut = ROUT_3K); — Connects an
internal diode and resistor to enable the trickle charging circuit to charge the supercapacitor. The default
values are the fastest for charging the capacitor, although other globally scoped variables (listed below) can
be passed to change the value of the diode and resistor using in the charging circuit.
DIODE_0_3V — 0.3V Diode
DIODE_0_6V — 0.6V Diode
DIODE_DISABLE — Disconnects diode, disables trickle charging circuit
ROUT_3K — 3 kΩ Resistor
ROUT_6K — 6 kΩ Resistor
ROUT_11K — 11 kΩ Resistor
ROUT_DISABLE — Disconnects resistor, disables the trickle charging circuit.
void disableTrickleCharge(); — Disables the trickle charging circuit.
void enableLowPower(); — Enables switching to the low power RC oscillator when the RTC is powered by
the supercapacitor or battery.
Interrupt Functionality
void enableInterrupt(uint8_t source); — Enables a given interrupt based on the value of source ,
which can be any of the following.
INTERRUPT_EIE — External Interrupt
INTERRUPT_AIE — Alarm Interrupt
INTERRUPT_TIE — Timer Interrupt
INTERRUPT_BLIE — Battery Interrupt
void disableInterrupt(uint8_t source); — Disables a given interrupt based on the value of source ,
see above for possible values of source .
void clearInterrupts(); — Clears all interrupt sources.
bool setAlarm(uint8_t sec, uint8_t min, uint8_t hour, uint8_t date, uint8_t month); — Sets the
alarm to a chosen time using individual variables.
bool setAlarm(uint8_t * time, uint8_t len); — Sets the alarm to a chosen time using an array of
times. uint8_t len must be 7, the length of the time array, for this function to set the alarm properly.
enableAlarmInterrupt(); — Attaches the interrupt pin to the alarm function.