MCP7941 interface

Hello all

We are a group of students who have developed a data-logger for the arctic centre of our university. We have made our own board and the layout has been already designed, but now we are facing a problem with the RTC.
Our ATmega328p is powered by 3AAA batteries, and it must work for at least one year without replacing them. The data logger is supposed to take measurement every hour, and it is running for less than one second, if not, it is in sleep mode. The problem is that we are using the MCP7941 (http://www.farnell.com/datasheets/1738903.pdf) and it seems like the alarms are not a single shot, so when the minutes alarm (every hour) is triggered, if it is clear, it is triggered again until the condition is not satisfied again. The only way that we could run the code is waking up the ATmega when the interrupt is triggered, wait 61 seconds, and clear the flag. With this condition, our ATmega cannot work for more than 20 days...

Do you have any idea how we could solve this problem? We are running out of time and ideas...
Any suggestion would be really appreciated.

Thanks a lot

BR
Marcos

Are you setting the alarm minute, going to sleep, waking on the alarm minute match, logging data, going to sleep until next minute match in 60 minutes and then waking etc?

You could maybe use the full ALMxC match (111 in figure 7-1) that only last a second and after logging data set the alarm for an hour later and go back to sleep.
Another option would be to used the seconds match and increment an internal counter every minute and sleep until you reach 60 then log data.

Thanks for the reply.
This is the process:
We set the alarm--> sleep--> trigger the minute alarm, so during one second it is triggered. Wait 60seconds awake and clear the flag --> sleep.
The counter couldn't be a solution since it will be awake for 60 seconds, which means to much power consumption. We will try setting the alarm and sleep(1000) (should be less taking into account the processing time) and clear the flag. That should minimize the problem at least...