Pages: [1]   Go Down
Author Topic: New tutorial - Arduino and the NXP PCF8563 real time clock IC  (Read 7021 times)
0 Members and 1 Guest are viewing this topic.
Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 88
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A few people asked me for a tutorial on how to use the NXP PCF8563 real time clock IC. So here you go:
http://tronixstuff.com/2013/08/13/tutorial-arduino-and-pcf8563-real-time-clock-ic/
which explains the time, date, oscillator outputs, alarm function and error-checking.
« Last Edit: August 20, 2013, 08:17:21 am by tronixstuff » Logged

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my new Arduino book from http://www.arduinoworkshop.com

London-UK
Offline Offline
Full Member
***
Karma: 1
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I like this, karma awarded. smiley

oh, does your e-book have color photos?

« Last Edit: August 24, 2013, 12:31:38 pm by mark7w » Logged

Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 88
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my new Arduino book from http://www.arduinoworkshop.com

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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  smiley-red
« Last Edit: September 17, 2013, 11:16:38 am by canibalimao » Logged

Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 88
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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  smiley-red

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?
Logged

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my new Arduino book from http://www.arduinoworkshop.com

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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  smiley-red

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  smiley-mr-green
Logged

Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 88
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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  smiley-red

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  smiley-mr-green

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

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my new Arduino book from http://www.arduinoworkshop.com

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:
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  smiley-red

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  smiley-mr-green

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-grin

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-grin
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-grin
« Last Edit: September 18, 2013, 10:27:08 am by canibalimao » Logged

Melbourne, Australia
Offline Offline
Jr. Member
**
Karma: 6
Posts: 88
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my new Arduino book from http://www.arduinoworkshop.com

Pages: [1]   Go Up
Jump to: