Skip to main content

Class Pcf8523

Represents a PCF8523 real-time clock

Assembly: Pcf8523.dll​
View Source​
Declaration
public class Pcf8523 : II2cPeripheral, IRealTimeClock, IBatteryBackedPeripheral

Implements:
Meadow.Hardware.II2cPeripheral, Meadow.Hardware.IRealTimeClock, Meadow.IBatteryBackedPeripheral

Properties​

DefaultI2cAddress​

The default I2C address for the peripheral

View Source​
Declaration
public byte DefaultI2cAddress { get; }

IsRunning​

Stops or starts the clock oscillator

View Source​
Declaration
public bool IsRunning { get; set; }

IsAlarmInterruptEnabled​

Gets or sets whether the alarm interrupt is enabled.

View Source​
Declaration
public bool IsAlarmInterruptEnabled { get; set; }

HasTimerAInterruptTriggered​

Gets whether timer A is set (indicating a timer event occurred)

View Source​
Declaration
public bool HasTimerAInterruptTriggered { get; }

HasTimerBInterruptTriggered​

Gets or sets whether timer B is set (indicating a timer event occurred)

View Source​
Declaration
public bool HasTimerBInterruptTriggered { get; }

IsAlarmInterruptGenerated​

Gets or sets whether the alarm flag is set (indicating an alarm occurred)

View Source​
Declaration
public bool IsAlarmInterruptGenerated { get; }

IsTimerAInterruptEnabled​

Gets or sets whether the delay timer interrupt is enabled.

View Source​
Declaration
public bool IsTimerAInterruptEnabled { get; set; }

IsTimerBInterruptEnabled​

Gets or sets whether the delay timer interrupt is enabled.

View Source​
Declaration
public bool IsTimerBInterruptEnabled { get; set; }

Methods​

IsBatteryLow()​

Reads the battery low indicator register bit

View Source​
Declaration
public bool IsBatteryLow()
Returns​

System.Boolean

GetTime()​

Reads the RTC time

View Source​
Declaration
public DateTimeOffset GetTime()
Returns​

System.DateTimeOffset

SetTime(DateTimeOffset)​

Sets the RTC time

View Source​
Declaration
public void SetTime(DateTimeOffset time)
Parameters​
TypeName
System.DateTimeOffsettime

SetAlarm(DateTimeOffset)​

Sets the alarm time.

View Source​
Declaration
public void SetAlarm(DateTimeOffset alarmTime)
Parameters​
TypeNameDescription
System.DateTimeOffsetalarmTimeThe DateTimeOffset to trigger the alarm.

SetTimerA(byte, DelayTimeUnit)​

Configures the delay interrupt timer A and enables interrupt

View Source​
Declaration
public void SetTimerA(byte value, DelayTimeUnit unit)
Parameters​
TypeNameDescription
System.BytevalueThe delay duration in seconds or minutes (1 - 255)
Meadow.Foundation.RTCs.DelayTimeUnitunitThe time unit for the delay.

SetTimerB(byte, DelayTimeUnit)​

Configures the delay interrupt timer B enables interrupt

View Source​
Declaration
public void SetTimerB(byte value, DelayTimeUnit unit)
Parameters​
TypeNameDescription
System.BytevalueThe delay duration in seconds or minutes (1 - 255)
Meadow.Foundation.RTCs.DelayTimeUnitunitThe time unit for the delay.

ClearFlags()​

Clears the alarm and delay interrupt flags

View Source​
Declaration
public void ClearFlags()

Implements​

  • Meadow.Hardware.II2cPeripheral
  • Meadow.Hardware.IRealTimeClock
  • Meadow.IBatteryBackedPeripheral