NXP Semiconductors PCF85x3, PCF2123, PCA8565, PCA2125 user manual Alarm function

Page 28

NXP Semiconductors

 

 

 

 

 

UM10301

 

 

 

 

 

User Manual PCF85x3, PCA8565 and PCF2123, PCA2125

 

 

 

 

 

 

 

Binary (BCD)

HEX

Register

 

Comments

 

 

 

 

 

Address

 

 

 

 

 

 

 

 

 

 

0 0 0 0

1 0 0 1

09

 

 

word address 9 for minute alarm

 

 

 

 

 

 

 

0 0 0 1

0 1 0 1

15

09

 

minute alarm enabled and set to 15 minutes

 

 

 

 

 

 

 

1 0 0 0

0 0 0 0

80

0A

 

hour alarm is disabled

 

 

 

 

 

 

 

1 0 0 0

0 0 0 0

80

0B

 

day alarm is disabled

 

 

 

 

 

 

 

1 0 0 0

0 0 0 0

80

0C

 

weekday alarm is disabled

 

 

 

 

 

 

 

generate I2C start condition (repeated start)

 

 

 

 

 

 

 

 

 

 

 

 

 

I2C slave address, write

1 0 1 0

0 0 1 0

A2

 

 

 

 

 

 

 

 

 

0 0 0 0

0 0 0 1

01

 

 

word address 1, next bytes are data

 

 

 

 

 

 

 

0 0 0 0

0 0 1 0

02

01

 

Control/status 2, clear alarm flag and enable alarm

 

 

 

 

 

 

 

interrupt

generate I2C stop condition

Remark: The interrupt is only set at the counter transition from 14 to 15. This is indicated by the dashed line in Fig 11. The interrupt has to be reset by software.

Fig 11. Alarm function

UM10301_1

 

© NXP B.V. 2008. All rights reserved.

User manual

Rev. 01 — 23 December 2008

28 of 52

Image 28
Contents Document information Info Content KeywordsAbstract Contact information NXP SemiconductorsRevision history Rev Date DescriptionIntroduction Features Register overview PCF8563 Address Register name BitEvent counter mode ComparisonFeatures Comparison of six real time clocksPower-on reset Power-on reset PORVoltage-low detector Voltage-low detection OscillatorOscillator-stop detection Pierce Oscillator equivalent diagram Overview of internal and external oscillator capacitorsOscillator frequency determining components UM10301 + C Typical values for crystal and surrounding capacitors Parameter Value Unit SourceUsing an external oscillator Oscillation allowanceCrystal and crystal selection Effect of temperature Modes which don’t work− f nom Capacitors and capacitor selection Accuracy Influences on time accuracy Oscillator tuning Oscillator tuning 10.1 PCF2123 Offset register Century and leap year, Daylight Saving Time Century trackingYear and leap year tracking Daylight Saving Time DSTInitialization of the RTC and setting the time Initialization and setting of alarm and timerBlock Diagram PCF8563 Alarm Setting the alarmBinary BCD Register Comments AddressAlarm function Setting the timer Setting the timerRegister Backup power supply Lithium Primary cellsBackup circuit using primary lithium cell Backup circuit using secondary cell NiCd or NiMH NiCd and NiMH secondary batteries13.3 Capacitors Charging the backup capacitor Diode selection Some suggestions for diode D11N4148 BAS716 BAS116 BAV170PCB layout guidelines PCB layout proposal for PCF8563 using leaded components Partial circuit switch down Hints to keep power consumption low Protection diodes0007 8473 ⋅ C b Rpmax as a function of bus capacitanceApplication diagram 1, I2C-bus interface Application diagram 2, SPI interfaceFirst period inaccuracy when using the timer Timer delaysTimer Source clock frequency Delay for n = General countdown timer behaviourFirst period delay for timer counter value n Timer source clock Minimum timer period Maximum timer periodTiming requirements for I2C read and write Block diagram I2C interface and Time counters I2C interfaceSequence of events example Read Troubleshooting Oscillator startup time Checking for oscillationNo communication via I2C-bus References Wrong time and date, wrong clock speedLegal information DefinitionsDisclaimers TrademarksContents