pca8565a NXP Semiconductors, pca8565a Datasheet - Page 8

no-image

pca8565a

Manufacturer Part Number
pca8565a
Description
Real-time Clock/calendar
Manufacturer
NXP Semiconductors
Datasheet
NXP Semiconductors
PCA8565A_2
Product data sheet
Fig 3.
COUNTDOWN COUNTER
When bits TIE and AIE are disabled, pin INT will remain high-impedance.
Interrupt scheme
8.3.2.1 Interrupt output
TE
Bits TF and AF:
countdown, TF is set logic 1. These bits maintain their value until overwritten using the
interface. If both timer and alarm interrupts are required in the application, the source of
the interrupt can be determined by reading these bits.
To prevent one flag being overwritten while clearing another, logic AND is performed
during a write access. A flag is cleared by writing logic 0 whilst a flag is not cleared by
writing logic 1. Writing logic 1 will result in the flag value remaining unchanged.
The following two tables are showing an example for clearing bit AF, but leaving bit TF
unaffected. The flag is cleared by a write command, therefore bits 7 to 4 and 1 to 0 must
be written with their previous values. Repeatedly re-writing these bits has no influence on
the functional behavior.
Table 7.
Table 8
unaffected.
Table 8.
Bits TIE and AIE:
TF or AF is asserted, respectively. The interrupt is the logical OR of these two conditions
when both AIE and TIE are set.
Register
Control_status_2
Register
Control_status_2
from interface:
from interface:
set alarm
clear AF
clear TF
flag AF
shows what instruction must be sent to clear bit AF. In this example, bit TF is
AF and TF flag location in register Control_status_2
Example to clear only AF (bit 3) in register Control_status_2
SET
SET
When an alarm occurs, AF is set logic 1. Similarly, at the end of a timer
These bits activate or deactivate the generation of an interrupt when
AF: ALARM
TF: TIMER
CLEAR
CLEAR
Rev. 02 — 4 December 2009
FLAG
Bit
7
-
Bit
7
-
6
-
6
-
TRIGGER
GENERATOR 2
PULSE
CLEAR
to interface:
read TF
to interface:
read AF
5
-
5
-
TI_TP
4
-
4
-
0
1
3
AF
3
0
AIE
TIE
Real-time clock/calendar
2
TF
2
1
PCA8565A
013aaa087
© NXP B.V. 2009. All rights reserved.
1
-
1
-
e.g. AIE
INT
0
1
0
-
0
-
8 of 38

Related parts for pca8565a