Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions adafruit_pcf8523.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ class PCF8523:
battery_low = i2c_bit.ROBit(0x02, 2)
"""True if the battery is low and should be replaced."""

high_capacitance = i2c_bit.RWBit(0x00, 7)
"""True for high oscillator capacitance (12.5pF), otherwise lower (7pF)"""

calibration_schedule_per_minute = i2c_bit.RWBit(0x0E, 7)
"""False to apply the calibration offset every 2 hours (1 LSB = 4.340ppm);
True to offset every minute (1 LSB = 4.069ppm). The default, False,
consumes less power. See datasheet figures 28-31 for details."""

calibration = i2c_bits.RWBits(7, 0xE, 0, signed=True)
"""Calibration offset to apply, from -64 to +63. See the PCF8523 datasheet
figure 18 for the offset calibration calculation workflow."""

def __init__(self, i2c_bus):
self.i2c_device = I2CDevice(i2c_bus, 0x68)

Expand Down