cancel
Showing results for 
Search instead for 
Did you mean: 

My question relates to the M41T81 Real Time Clock. Wasn't sure which topic to post in so picked this one since the RTC interfaces to an 8 bit micro. My problem is that the RTC doesn't always recover from power-down correctly.

GDick.1
Associate

The data sheet for this part says that after power loss the HT bit is set, and any reads of the clock will return the time of the last read. Then after the HT bit is cleared one should be able to read the current time since the clock is battery backed (a super cap in this case). This works "sometimes", but often the time of the read just before power loss is obtained when the current time should be obtained. Usually there is help on the net, but I have been unable to find a solution. I'm pretty sure there is some trick I'm missing. Since I am unable to find any code examples on the net that try to recover from a power down, maybe you can help with an app note or a code example? AN1572 didn't give much more than the data sheet.

I have included a code snippet which may be helpful.

0 REPLIES 0