I am sorry I don't have that RTC here so I can test code for you yet.

There are some things in your code that are inconsistent with the datasheet so you should start with fixing this.

Please look at http://www.datasheetcatalog.org/data...s/PCF8563P.pdf Table 5. As you see the Seconds register is only 7 bits wide and not 8, the 8th bit is VL. So start by making sure that bit is not included in you conversion and setting of the RTC.

Are you sure you chip is healty? Have you tested this on more than one RTC?
Please forgive me for asking, but is this related to this previous 2007 posting?http://www.picbasic.co.uk/forum/arch...hp/t-7567.html
In that case I can only say you have had this problem for some time and then it is really time to solve this.

I will swing by the market some day and pick up a chip so I can help you better.