I am using Arduino Uno and with DS1307 RTC. I have to set quite large number of alarms(around 100). I have read in an old post(2010) in this forum that, the library supports 6 alarms(can be changed from the header file), and requires 12 bytes of memory each. Can anyone suggest, changing the header, at most how many alarms can be set on Arduino UNO(or may be Mega) without hitting the memory limit.
Ds1307 has 56 byte of battery backed SRAM. How much data are you storing for each alarm?
The TimeAlarms.h file implies that the max is 255:
#define dtNBR_ALARMS 6 // max is 255
You could probably change these declarations to increase that limit:
typedef uint8_t AlarmID_t;
#define dtINVALID_ALARM_ID 255
So it appears the alarm data is not kept in the battery backed SRAM of the DS1307. Maybe it's kept in the EEPROM of the uc so it's not lost if power is lost.
If seconds. minutes, hours, month, day, are stored for each alarm, that's 5 bytes of data for each, 1024 bytes of EEPROM, that'd be 204 alarms, unless the stored data is compressed some:
6 bits for seconds
6 bits for minutes
5 bits for hours
4 bits for month
5 bits for day
26 total, so 4 bytes needed, with 6 bits spare.
1024/4 = 256 alarms