Forums

RTC PCF8563: Does not count

Started by Thomas Entner March 29, 2007
Hello,

I am using the PCF8563 as RTC on my board. It should be plain simple to 
access via I�C. Other people seem to use it without problems, therefore 
following problem is driving me nuts:

I can read and write the registers in the part via I�C. The clock is running 
at its 32.768kHz. I can set a date and read it back. However: The RTC does 
not count correctly?!? I observed following: When I write e.g. $12 into the 
seconds-register, I get the seconds $00, $10, $02, $12, but no other values. 
It seems like it is counting internally correctly, and then masks the value 
with $12 before it sends it. When I write $ff, it counts correctly (at least 
for the seconds). About the same is with hours and  minutes (but much harder 
to test because very slow)...

The other register should also be set correctly.

Has someone an idea what the problem could be?

Thanks,

Thomas

P.S.: I know that the registers are in BCD-format. 



"Thomas Entner" <aon.912710880@aon.at> schrieb im Newsbeitrag 
news:460b6928$0$25626$91cee783@newsreader02.highway.telekom.at...
> Hello, > > I am using the PCF8563 as RTC on my board. It should be plain simple to > access via I&#2013266098;C. Other people seem to use it without problems, therefore > following problem is driving me nuts: > > I can read and write the registers in the part via I&#2013266098;C. The clock is > running at its 32.768kHz. I can set a date and read it back. However: The > RTC does not count correctly?!? I observed following: When I write e.g. > $12 into the seconds-register, I get the seconds $00, $10, $02, $12, but > no other values. It seems like it is counting internally correctly, and > then masks the value with $12 before it sends it. When I write $ff, it > counts correctly (at least for the seconds). About the same is with hours > and minutes (but much harder to test because very slow)... > > The other register should also be set correctly. > > Has someone an idea what the problem could be? > > Thanks, > > Thomas > > P.S.: I know that the registers are in BCD-format. >
>do you have an other chip on the I2C bus ? >Such as an EEPROM which may have the same I2C address as the PCF8563 : I >had the same problem (seconds not counting appart from 2 or 3 values) >which was caused by a wrong EEPROM reference mounted on the board. > >Eric
Hi Eric, thank you, you are totally right. The EEPROM has ID $50 (RTC has $51), but it uses the LSBs of its ID as address-extension. So I will use a 24C02 instead of the 24C16, this should work then... Thanks a lot & have a nice day, Thomas