CS5460A
DS284PP4
33
4.4 Interrupt and Watchdog Timer
4.4.1 Interrupt
The INT pin is used to indicate that an event has
taken place in the CS5460A that (may) need atten-
tion. These events inform the meter system about
operation conditions and internal error conditions.
The INT signal is created by combining the Status
Register with the Mask Register. Whenever a bit in
the Status Register becomes active, and the corre-
sponding bit in the Mask Register is a logic 1, the
INT signal becomes active.
4.4.1.1 Clearing the Status Register
Unlike the other registers, the bits in the Status
Register can only be cleared (set to logic 0). When
a word is written to the Status Register, any 1s in
the word will cause the corresponding bits in the
Status Register to be cleared. The other bits of the
Status Register remain unchanged. This allows the
clearing of particular bits in the register without
having to know the state of the other bits. This
mechanism is designed to facilitate handshaking
and to minimize the risk of losing events that ha-
ven’t been processed yet.
4.4.1.2 Typical use of the INT pin
The steps below show how interrupts can be han-
dled by the on-board MCU.
•
Initialization:
Step I0 - All Status bits are cleared by writing
FFFFFF (Hex) into the Status Register.
Step I1 - The conditional bits which will be
used to generate interrupts are then written to
logic 1 in the Mask Register.
Step I3 - Enable interrupts.
•
Interrupt Handler Routine:
Step H0 - Read the Status Register.
Step H1 - Disable all interrupts.
Step H2 - Branch to the proper interrupt service
routine.
N
L
L O A D
AG N D
T 2
AGND
T 1
IIN -
IIN +
V IN -
V IN +
+5 V
+5V
V A +
VD +
CS5460A
A G N D
V A -
D G N D
R E FO U T
R E FIN
0
0
0
0 0
TOTALIZER
D G N D
S P I
E O U T
E D I R
E
2
PROM
Mode
RESET
INT
10k
30uF
D G N D
BAT85
PFMON
AGND
XIN
XOUT
CRYSTAL
4.096 MHz
C
BOOT
47 uF
47 uF
D G N D
+
+
+
Figure 15. CS5460A Auto-Boot Configuration: Automatic Restart After Power Failure
This resistor-capacitor- diode
configuration helps to ensure a
smooth power-down, as well as
a proper power-up/reset during
and after a power black-out or
brown-out event.
Summary of Contents for CS5460A
Page 63: ... Notes ...
Page 64: ......