Setting DC3231 RTC alarm via I2C?

Hi,

I have been trying figure out how to set the alarm of the DS3231 RTC and failing so far. The data sheet is here: pdfserv.maxim-ic.com/en/ds/DS3231.pdf

I would like to set Alarm2 to cause an interupt every minute at 00 seconds and then make that alarm active. To do this I have been sending 0x40 to 0x0B as well as plenty of other combos but I think this is the closest? Can anyone see what my mistake is?

Thanks for any thoughts

126 posts and you still can post a link properly? What a shame. 3rd icon on the second row.

Hi Paul, sorry to offend - some forums automatically link the URLs - now corrected :-)

And your code?

The code totals quite a large chunck and is spread across files so probably not too useful. I guess my question boils down to how one works out the register of bits to send as a byte from the data sheet info?

The code totals quite a large chunck and is spread across files so probably not too useful.

At least show what libraries you are using, and the code to set/get the time.