Shop OBEX P1 Docs P2 Docs Learn Events
Spin Driver for PCF8563 rtc chip? — Parallax Forums

Spin Driver for PCF8563 rtc chip?

I've seen a few discussions about using these chips, but can't seem to get it running myself.
I tried to modify Kyle Crane's PCF8583 driver but it doesn't run correctly.
Does anyone have a ready made object for this chip?

Comments

  • Why another object? From a register point of view there is not much difference, especially with default values but the slave address is at $A2 vs $A0 for the 8583. Your code may use the 7-bit notation for addresses as %1010000 and if so just change that to %1010001. You might have to make sure that register 0 & 1 have a 0 written to them and mask off the relevant bits when reading the time and date. Since you can't seem to get it running I assume you have read the datasheet? (RTM) Once you have and seen the register bits then the modifications to Spin code are trivial.
  • Thank you Peter, you helped me alot.
    so far I have found two differences between the chips.
    The 8583 is a 4 year counter while the 8563 is 0 to 99.
    That also puts the year bytes in a different register.
    In the 8583 register $05h holds the date and the year
    while the 8563 holds only the year in register $08h
    Kyle Crane's PCF8583 driver gets the the date and year
    from the same register, so when I run this on the 8563
    all I get for the date and year are random junk.
    I am still trying to figure it out. how do I split up
    the registers in his driver? I'm new to this and thanks
    again for your help.

  • O.K. I got it now....
    Everything I needed to know I got from William Henning's
    MorphDiag.spin code.
Sign In or Register to comment.