Cypress CY14B101P manual Accessing the Real Time Clock through SPI

Page 17

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 #: 001-44109 Rev. *B

Page 17 of 32

[+] Feedback

Image 17
Contents Logic Block Diagram FeaturesOverview Sram ArrayHold PinoutsPin Definitions Pin Name Type Description Sram Write Device OperationSram Read Store OperationSerial Peripheral Interface SPI Master Commonly used terms used in SPI protocol are given belowSPI Modes System Configuration Using SPI nvSRAMSPI Functional Description SPI Operating FeaturesWrite Status Register Wrsr Instruction Status RegisterRead Status Register Rdsr Instruction Write Disable Wrdi Instruction Write Enable Wren InstructionWrite Protection and Block Protection Block ProtectionRead Sequence Read Memory AccessWrite Sequence Write Wpen WENRead RTC Rdrtc Instruction Burst Mode Read Instruction TimingNvSRAM Special Instructions AutoStore DisableWrite RTC Wrtc Instruction Software Store StoreAutoStore Enable Asenb AutoStore Disable AsdisbSoftware Recall Recall Hold Pin OperationReal Time Clock Operation Calibrating the Clock AlarmWatchdog Timer Interrupt Register Power MonitorInterrupts Flags RegisterRTC Recommended Component Configuration Accessing the Real Time Clock through SPIWDF Oscf RTC Register Map1 BCD Format Data Function/RangeOscen Alarm Hours Alarm DayAlarm Minutes Register Map DetailTime Keeping Centuries Register Map Detail Alarm SecondsFlags 0x00 WDF Oscf CALMaximum Ratings DC Electrical CharacteristicsOperating Range Parameter Description Test Conditions Min Max UnitCapacitance Data Retention and EnduranceThermal Resistance AC Test ConditionsAC Switching Characteristics ~ ~ ~ ~ Parameters Description CY14B101P Unit Min Max AutoStore or Power Up RecallSwitching Waveforms CY14B101P Hardware Store Cycle To Output Active Time when write latch not setParameter Description Hardware Store Pulse WidthOrdering Information Ordering Code Package Diagram Package Type Operating RangePart Numbering Nomenclature CY 14 B 101 P SF X C TPin 300 mil Soic Package Package DiagramsSubmission Orig. Description of Change Date Document HistoryREV ECN no USB Sales, Solutions, and Legal InformationWorldwide Sales and Design Support Products PSoC Solutions