User`s manual
OP710026
Hardware
ADM691 Supervisor Chip
A voltage divider consisting of R29 and R30 across the DC input provides
a PFI signal to the ADM691 watchdog supervisor. The ADM691 chip
performs the following services.
• Watchdog timer resets the microprocessor if software “hangs.”
• Power-failure shutdown and reset.
• Generates an “early warning” power-failure interrupt (PFI) that lets the
system know when power is about to fail.
• Memory protection feature prevents writes to RAM when power is low.
• Supports battery backup.
Handling Power Fluctuations
During a normal power-down, an interrupt service routine is used in
response to a power-failure interrupt to save vital state information for the
application for when power recovers. The amount of code that the interrupt
service routine can execute depends on how fast the voltage decreases.
Theoretically, a power failure would cause a single power-failure interrupt.
Then, the interrupt service routine would restore data from the previous
state when the voltage recovers.
However, fluctuations in the DC input line could cause the ADM691 to see
multiple crossings of the 1.3 V input power-reset threshold. These multiple
negative-edge transitions would, in turn, cause the Z180 to see multiple
power-failure interrupts.
The ADM691 generates a power-failure interrupt, INT1. After reset, INT1
must be enabled by a write into the ITC register as well as execution of the
EI instruction followed by a RETI instruction. The Z180 will restore saved
state information when it executes the RETI instruction.
Ideally, the Z180 should be able to pop the stack and return to the location
where the program was first interrupted. Also, depending on the number of
fluctuations of the DC input (and hence, the number of stacked power-
failure interrupts), the processor’s stack can overflow, possibly into your
program’s code or data.
The following sample program shows how to handle a power-failure
interrupt.