Skip to content

Conversation

@Chris-70
Copy link

  • Scope:
  • Class definitions of RTC_DS1307; RTC_DS3231; RTC_PCF8523; RTC_PF8563, added 'public' for the RTC_I2C base class. This gives the methods in 'protected' access in any inherited classes. This allows child classes access to RTC_I2C methods such as bcd2bin(); bin2bdc(); read_register(); and write_register().

In RTC_DS3231.cpp, removed the check for INTCN bit in the control register, as setting an alarm is not dependent on the INTCN bit being set. The bits A1F and A2F are set when the alarm is triggered, regardless of the INTCN bit state. This allows setting alarms without needing to enable the interrupt control bit as the user may be using the SQW signal on that pin (e.g. 1 Hz).

  • imitations: - None -

  • Tests:

  • Ran tests on RTC_DS3231 class against several DS3231 & DS3232 modules including a DS3231M. The changes do not impact the functionality and the alarms times were successfully set. Using the RTC_I2C::read_register() method, I was able to read the registers and extract the required information for the Binary Clock project.

Chris-70 added 3 commits July 17, 2025 16:55
… RTC_PF8563, added 'public' for the RTC_I2C base class. This gives the methods in 'protected' access in any inherited classes.

In RTC_DS3231.cpp, removed the check for INTCN bit in the control register, as setting an alarm is not dependant on the INTCN bit being set. The bits A1F and A2F are set when the alarm is triggered, regardless of the INTCN bit state. This allows setting alarms without needing to enable the interrupt control bit as the user may be using the SQW signal on that pin (e.g. 1 Hz).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant