Open michalowskil opened 1 year ago
Needs further investigation. I don't have one of these modules handy for the next few weeks.
Expected behaviour:
ds.halt()
- return the current value (self._halt), without reading the register
ds.halt(True)
- read the DATETIME_REG register, set bit 7 = 1, write back to the register
ds.halt(False)
- read the DATETIME_REG register, set bit 7 = 0, write back to the register
If the default halt bit 7 value in the register is True, I should update the constructor to set self._halt = True
, or perhaps just make the halt()
method always read the register and not try to cache it.
Not sure is it a bug or not. When I disconnect and then connect battery DS1307 is resetting to (2000, 1, 1, 0, 0, 0, 0, 0) which is fine, but it is not ticking. When I run ds.halt() it returns FALSE. Clock start ticking when I manually set FALSE like this: ds.halt(False).
Shouldn't ds.halt() return TRUE when clock is halted?
I'm not using a module. I just connect DS1307 with oscillator and resistors like this: