PDA

View Full Version : Low battery signal from an RTC



ardhuru
- 19th March 2008, 09:01
I am using a Philips RTC PCF8563 in a design. The RTC chip is being powered by a separate supply, a CR2032 coin cell.

The basic functions seem to be working fine, as per expectation. Now here is the problem:

The PCF8563 has a low battery detector, which is a bit in a register that is '0' if the battery is within acceptable limit, or '1' if its lower.

The issue is, when there is no battery connected, or if the battery is too low to operate the RTC, this bit is of course read as a '0' by the PIC; so, how does one differentiate between a 'battery good' and a 'no battery' condition?

Is there a way to detect a lack of I2C activity?

Regards,

Anand

Jerson
- 19th March 2008, 16:45
Write some data to a RAM location in the RTC(I haven't checked if this RTC has RAM). If you find the same data when the bit says battery good, the battery is good and present. But, if the data has changed, it means that the battery was not present.

ardhuru
- 19th March 2008, 17:13
Hey, that sounds good! Thanks, Jerson.

This RTC does not have a RAM, but I guess I could use some of the calendar registers for that purpose, as I am not using the calendar.

Regards,

Anand