Go Down

Topic: New tutorial - Arduino and the NXP PCF8563 real time clock IC (Read 9063 times) previous topic - next topic

tronixstuff

Aug 13, 2013, 04:23 am Last Edit: Aug 20, 2013, 03:17 pm by tronixstuff Reason: 1
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.
Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino

mark7w

#1
Aug 24, 2013, 07:21 pm Last Edit: Aug 24, 2013, 07:31 pm by mark7w Reason: 1
I like this, karma awarded. :)

oh, does your e-book have color photos?


tronixstuff

Thanks. The print and electronic versions are in grey-scale.
Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino

#3
Sep 17, 2013, 06:06 pm Last Edit: Sep 17, 2013, 06:16 pm by canibalimao Reason: 1
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: [Select]
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:

tronixstuff


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: [Select]
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?
Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino



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: [Select]
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:

tronixstuff




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: [Select]
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?
Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino

#7
Sep 18, 2013, 01:35 pm Last Edit: Sep 18, 2013, 05:27 pm by canibalimao Reason: 1




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: [Select]
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   :D

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! :D
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 :D

tronixstuff

Check out my Arduino tutorials at http://tronixstuff.com/tutorials - Order my  Arduino book from http://nostarch.com/arduino

Go Up