New tutorial - Arduino and the NXP PCF8563 real time clock IC

A few people asked me for a tutorial on how to use the NXP PCF8563 real time clock IC. So here you go:

which explains the time, date, oscillator outputs, alarm function and error-checking.

I like this, karma awarded. :slight_smile:

oh, does your e-book have color photos?

Thanks. The print and electronic versions are in grey-scale.

Sorry for bring this from the grave but I'm having some problems with the RTC.

Well, I don't know if this is really a RTC clock problem or if it's an arduino problem. I'm using an Arduino Leonardo (maybe the fault is here) with a PCF8563 and a 32.768 kHZ crystal.

I'd tried to use the arduino "official" library for the PCF8563 and now I'm trying with your code and the results are the same:

 45/25/20165 - 45:85:85

Is there anything I need to change in some library to make it work with Leonardo?

I have 10 RTC chips (all the same model) and all of them show the same result...

Hope you can help a noobie here :blush:

canibalimao:
Sorry for bring this from the grave but I'm having some problems with the RTC.

Well, I don't know if this is really a RTC clock problem or if it's an arduino problem. I'm using an Arduino Leonardo (maybe the fault is here) with a PCF8563 and a 32.768 kHZ crystal.

I'd tried to use the arduino "official" library for the PCF8563 and now I'm trying with your code and the results are the same:

 45/25/20165 - 45:85:85

Is there anything I need to change in some library to make it work with Leonardo?

I have 10 RTC chips (all the same model) and all of them show the same result...

Hope you can help a noobie here :blush:

Leonardo - OK, the pins are different. I2C SDA is 2 and SCL is 3. Double-check your wiring and then try my example 54.1 sketch again.
Out of curiosity, where did you get the PCF8563s from?

tronixstuff:

canibalimao:
Sorry for bring this from the grave but I'm having some problems with the RTC.

Well, I don't know if this is really a RTC clock problem or if it's an arduino problem. I'm using an Arduino Leonardo (maybe the fault is here) with a PCF8563 and a 32.768 kHZ crystal.

I'd tried to use the arduino "official" library for the PCF8563 and now I'm trying with your code and the results are the same:

 45/25/20165 - 45:85:85

Is there anything I need to change in some library to make it work with Leonardo?

I have 10 RTC chips (all the same model) and all of them show the same result...

Hope you can help a noobie here :blush:

Leonardo - OK, the pins are different. I2C SDA is 2 and SCL is 3. Double-check your wiring and then try my example 54.1 sketch again.
Out of curiosity, where did you get the PCF8563s from?

Thank you very much. I just need to change the wiring, or need to change other thing else on the code?
On eBay, from a chinese guy :grin:

canibalimao:

tronixstuff:

canibalimao:
Sorry for bring this from the grave but I'm having some problems with the RTC.

Well, I don't know if this is really a RTC clock problem or if it's an arduino problem. I'm using an Arduino Leonardo (maybe the fault is here) with a PCF8563 and a 32.768 kHZ crystal.

I'd tried to use the arduino "official" library for the PCF8563 and now I'm trying with your code and the results are the same:

 45/25/20165 - 45:85:85

Is there anything I need to change in some library to make it work with Leonardo?

I have 10 RTC chips (all the same model) and all of them show the same result...

Hope you can help a noobie here :blush:

Leonardo - OK, the pins are different. I2C SDA is 2 and SCL is 3. Double-check your wiring and then try my example 54.1 sketch again.
Out of curiosity, where did you get the PCF8563s from?

Thank you very much. I just need to change the wiring, or need to change other thing else on the code?
On eBay, from a chinese guy :grin:

Code should be fine. Are you in Australia by any chance?

tronixstuff:

canibalimao:

tronixstuff:

canibalimao:
Sorry for bring this from the grave but I'm having some problems with the RTC.

Well, I don't know if this is really a RTC clock problem or if it's an arduino problem. I'm using an Arduino Leonardo (maybe the fault is here) with a PCF8563 and a 32.768 kHZ crystal.

I'd tried to use the arduino "official" library for the PCF8563 and now I'm trying with your code and the results are the same:

 45/25/20165 - 45:85:85

Is there anything I need to change in some library to make it work with Leonardo?

I have 10 RTC chips (all the same model) and all of them show the same result...

Hope you can help a noobie here :blush:

Leonardo - OK, the pins are different. I2C SDA is 2 and SCL is 3. Double-check your wiring and then try my example 54.1 sketch again.
Out of curiosity, where did you get the PCF8563s from?

Thank you very much. I just need to change the wiring, or need to change other thing else on the code?
On eBay, from a chinese guy :grin:

Code should be fine. Are you in Australia by any chance?

Thank you very much. Latter on I'll try that and give here some feedback.
No, I'm from Portugal.

And by the way, what a great website you have with all the tutorials :smiley:

PS: I saw now that the leonardo board has an SCL and an SCA separate pin header. Should I use this instead the A3 and A2?

EDIT: It's working finally! :smiley:
Thank you very much tronix! It's working using the SCL and SDA dedicated ports on the board (the 2 one on the left of Digital side).
Now let's play :smiley:

Good news, thanks for letting me know. Have fun!