adafruit_pcf8523
- PCF8523 Real Time Clock module¶
This library supports the use of the PCF8523-based RTC in CircuitPython. It contains a base RTC class used by all Adafruit RTC libraries. This base class is inherited by the chip-specific subclasses.
Functions are included for reading and writing registers and manipulating datetime objects.
Author(s): Philip R. Moyer and Radomir Dopieralski for Adafruit Industries. Date: November 2016 Affiliation: Adafruit Industries
Implementation Notes¶
Hardware:
- Adafruit Adalogger FeatherWing - RTC + SD Add-on (Product ID: 2922)
- Adafruit PCF8523 RTC breakout (Product ID: 3295)
Software and Dependencies:
- Adafruit CircuitPython firmware: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Notes:
- Milliseconds are not supported by this RTC.
- Datasheet: http://cache.nxp.com/documents/data_sheet/PCF8523.pdf
-
class
adafruit_pcf8523.
PCF8523
(i2c_bus)¶ Interface to the PCF8523 RTC.
-
alarm
¶ Alarm time for the first alarm.
-
alarm_interrupt
¶ True if the interrupt pin will output when alarm is alarming.
-
alarm_status
¶ True if alarm is alarming. Set to False to reset.
-
battery_low
¶ True if the battery is low and should be replaced.
-
datetime
¶ Gets the current date and time or sets the current date and time then starts the clock.
-
datetime_register
¶ Current date and time.
-
lost_power
¶ True if the device has lost power since the time was set.
-
power_management
¶ Power management state that dictates battery switchover, power sources and low battery detection. Defaults to BATTERY_SWITCHOVER_OFF (0b000).
-