PCF2127 RTC example code with use of FRDM-KL25Z and OM13513 boards

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCF2127 RTC example code with use of FRDM-KL25Z and OM13513 boards

PCF2127 RTC example code with use of FRDM-KL25Z and OM13513 boards

******************************************************************************************************

* The PCF2127T is a CMOS Real Time Clock (RTC) and calendar with an integrated
* Temperature Compensated Crystal Oscillator and a 32.768 kHz quartz crystal
* optimized for very high accuracy and very low power consumption.

 

* This simple example code has been written for the FRDM-KL25Z + OM13513
* boards in MCUXpresso IDE v10.1.0 and demonstrates how to set and read

* the time/date on the PCF2127T using the SPI (do not forget to remove the

* JP1 jumper) interface. It also illustrates how to use a minute interrupt to

* generate an interrupt on the INT pin once per minute when the Minutes

* register increments.
*
* In this example the date/time to be set is Wednesday, January 17 2018, 2:45 PM.
*
* Connection:     FRDM-KL25Z        OM13513
* VDD               J9-4                         P2-2
* GND               J9-18                       P2-1
* MOSI              J2-8                         P2-5
* MISO              J2-10                       P2-6
* SCLK             J2-12                       P2-4
* CS                  J2-6                        P2-3
* INT                 J1-6                        P2-8

******************************************************************************************************

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1114468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPCF2127%20RTC%20example%20code%20with%20use%20of%20FRDM-KL25Z%20and%20OM13513%20boards%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1114468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E******************************************************************************************************%3C%2FP%3E%3CP%3E*%20The%20PCF2127T%20is%20a%20CMOS%20Real%20Time%20Clock%20(RTC)%20and%20calendar%20with%20an%20integrated%3CBR%20%2F%3E*%20Temperature%20Compensated%20Crystal%20Oscillator%20and%20a%2032.768%20kHz%20quartz%20crystal%3CBR%20%2F%3E*%20optimized%20for%20very%20high%20accuracy%20and%20very%20low%20power%20consumption.%3C%2FP%3E%3CP%20style%3D%22min-%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20This%20simple%20example%20code%20has%20been%20written%20for%20the%20FRDM-KL25Z%20%2B%20OM13513%3CBR%20%2F%3E*%20boards%20in%20MCUXpresso%20IDE%20v10.1.0%20and%20demonstrates%20how%20to%20set%20and%20read%3C%2FP%3E%3CP%3E*%20the%20time%2Fdate%20on%20the%20PCF2127T%20using%20the%20SPI%20(do%20not%20forget%20to%20remove%20the%3C%2FP%3E%3CP%3E*%20JP1%20jumper)%20interface.%20It%20also%20illustrates%20how%20to%20use%20a%20minute%20interrupt%20to%3C%2FP%3E%3CP%3E*%20generate%20an%20interrupt%20on%20the%20INT%20pin%20once%20per%20minute%20when%20the%20Minutes%3C%2FP%3E%3CP%3E*%20register%20increments.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20In%20this%20example%20the%20date%2Ftime%20to%20be%20set%20is%20Wednesday%2C%20January%2017%202018%2C%202%3A45%20PM.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20Connection%3A%20%26nbsp%3B%26nbsp%3B%20%26nbsp%3BFRDM-KL25Z%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3BOM13513%3CBR%20%2F%3E*%20VDD%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20J9-4%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20P2-2%3CBR%20%2F%3E*%20GND%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20J9-18%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20P2-1%3CBR%20%2F%3E*%20MOSI%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20J2-8%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20P2-5%3CBR%20%2F%3E*%20MISO%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20J2-10%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20P2-6%3CBR%20%2F%3E*%20SCLK%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20J2-12%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20P2-4%3CBR%20%2F%3E*%20CS%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20J2-6%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20P2-3%3CBR%20%2F%3E*%20INT%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20J1-6%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20P2-8%3C%2FP%3E%3CP%3E******************************************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎01-17-2018 05:38 AM
Updated by: