Skip to content

PCF8523: Add additional registers #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 20, 2020
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