Jump to content
43oh

[Tip] Nice realtime clock with the PCF8563


Recommended Posts

Hi everybody,

 

As a part of my long term project building wireless sensor nodes, I have been looking for a nice RTC chip. First I was drawn to the DS1307, but this part is 5V and only a clock without alarm functions. Googling to the internet I've found the PCF8563. This part is a "drop in" replacement for the DS1307, but offers a lower supply voltage (3.3V) and includes alarm functions. The chips can be sourced quite cheap from the internet and work like a charm with both 6pf and 12pf 32768kHz crystals.

 

A nice tutorial how to connect these things can be found using the following link: http://startingelectronics.com/beginners/start-electronics-now/tut16-arduino-clock/

 

It is written for the Arduino but can be adapted easily to the launchpad. Just change the LiquidCrystal pins to free pins on the Arduino and voila there you have a nice RTC that can be used for sprinkler projects or other projects. The alarm can be set on different days of the week (not a specific date), but with some program logic a calendared version should be possible.

 

I am thinking of writing a library out of the tutorial. Anyone interested?

 

Kind regards,

 

Eelco

Link to post
Share on other sites
The PCF2129A is a SOIC20 package. I've soldered it on a DIP14 support and I'm using it in I2C mode.
 
post-12238-0-45271500-1377675921_thumb.jpg post-12238-0-68225000-1377676394_thumb.png
 
For I2C
  • SCL(1) = I2C clock
  • SDA(4) = I2C data
  • IFS(5) connected to BBS(18) = output voltage to select I2C
  • SDI(2) connected to VSS(8) = ground
  • VDD(20) = +3.3V
  • VBAT(19) = optional battery 
  • VSS(8) = ground

For I2C, don't forget to use pull-ups resistors for SDA and SCL.

 

 

For SPI, not tested
  • SCL(1) = SPI clock
  • SDI(2) = SPI MOSI
  • SDO(3) = SPI MISO
  • CE(4) = SPI chip enable, active low
  • IFS(5) connected to VSS(8) = ground to select SPI
  • VDD(20) = +3.3V
  • VBAT(19) = optional battery 
  • VSS(8) = ground
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...