PRELIMINARYCY14B101P
Accessing the Real Time Clock through SPI
CY14B101P uses 16 registers for Real Time Clock (RTC). These registers can be read out or written to by accessing all 16 registers in burst mode or accessing each register, one at a time. The RDRTC and WRTC instructions are used to access the RTC.
All the RTC registers can be read in burst mode by issuing the RDRTC instruction and and reading all 16 bytes without bringing the CS pin HIGH. The ‘R’ bit must be set while reading the RTC
timekeeping registers to ensure that transitional values of time are not read.
Writes to the RTC register are performed using the WRTC instruction. Writing RTC timekeeping registers and control registers, except for the flag register needs the ‘W’ bit of the flag register to be set to “1”. The internal counters are updated with the new date and time setting when the ‘W’ bit is cleared to ‘0’. All the RTC registers can also be written in burst mode using the WRTC instruction.
Figure 22. RTC Recommended Component Configuration
C1
C2
Y1
Xout Xin
Recommended Values
Y1 = 32.768KHz
C1 = 21pF
C2 = 21pF
Note: The recommended values for C1 and C2 include board trace capacitance.
Watchdog
Timer
Power
Monitor
VINT
Clock
Alarm
WDF
WIE
PF
PFE
AF
AIE
Figure 23. Interrupt Block Diagram
|
|
|
|
|
|
|
|
| WDF - Watchdog Timer Flag |
|
|
|
|
|
|
|
|
| WIE - Watchdog Interrupt |
|
|
| VCC |
|
| Enable | |||
| P/L |
|
| ||||||
|
|
|
|
|
|
|
|
| PF - Power Fail Flag |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
| PFE - Power Fail Enable |
|
|
|
|
|
|
|
|
| |
| Pin |
|
|
|
|
| INT | AF - Alarm Flag | |
| Driver |
|
|
|
|
| |||
|
|
|
|
|
|
|
|
| AIE - Alarm Interrupt Enable |
|
|
|
|
|
|
|
|
| P/L - Pulse Level |
|
|
|
|
|
|
|
|
| |
| H/L | VSS |
|
| H/L - High/Low | ||||
|
|
|
|
|
Document #: | Page 17 of 32 |
[+] Feedback