User`s manual

PK2200 Power Management s 83
The watchdog timer should be enabled. However, if the watchdog is not
enabled, you can force the processor to restart execution at 0x0000.
Substitute this section for the one labeled timeout above.
Program C-2. Alternate Power Fail Code
If the DC input voltage continues to decrease, the controller powers
down. The routine calls hitwd to make sure that watchdog does not
timeout and thereby reset the processor. The controller can continue to
run, after a fashion, at low voltage and might not be able to detect the low
voltage condition, because the Z180s /NMI input needs to see a high-to-
low transition edge.
A situation similar to a brownout occurs if the power supply is over-
loaded. For example, when an LED turns on, the raw voltage supplied to
the PK2200 may dip below 7.9 V. The interrupt routine does a shutdown,
which turns off the LED, clearing the problem. However, if the cause of
the overload persists, the system oscillates, alternately experiencing an
overload and then resetting. To correct this situation, use a power supply
which can provide the needed current and voltage.
A few milliseconds of computing time remain when the regulated +5 V
supply falls below 4.75 V, even if power cuts off abruptly. The amount
of time depends on the size of the capacitors in the power supply. The
standard wall power supply provides about 10 ms. If you remove the
power cable abruptly from the PK2200 side, only the capacitors on the
board are available, reducing computing time to a few hundred microsec-
onds. These times can vary considerably depending on systems configu-
ration and loads on the 5 V or 9 V supplies.
The interval between the power failure detection and entry to the power-
failure interrupt routine is approximately 100 µs or less if Dynamic C
NMI communication is not in use.
restart:
ld a,0xe2
; make sure 0x0000
; points to start of
; EPROM BIOS
out0 (CBAR),a
; set the CBAR
jp 0000h
; jump to logical
; (physical) address
; 0x0000
#endasm