EM78P458/459
OTP ROM
(1) External reset input on /RESET pin.
(2) WDT time-out (if enabled).
(3) Port 6 input status change (if enabled).
(4) Comparator high.
The first two cases will cause the EM78P458/459 to reset. The T and P flags of R3 can be used to
determine the source of the reset (wake-up). Case 3 is considered the continuation of program
execution and the global interrupt ("ENI" or "DISI" being executed) decides whether or not the
controller branches to the interrupt vector following wake-up. If ENI is executed before SLEP, the
instruction will begin to execute from the address 0x8 after wake-up. If DISI is executed before SLEP,
the execution will restart from the instruction right next to SLEP after wake-up.
Only one of the Cases 2, to 4 can be enabled before entering into sleep mode. That is,
[a] if Port 6 Input Status Change Interrupt is enabled before SLEP , WDT must be disabled by
software. However, the WDT bit in the option register remains enabled. Hence, the
EM78P458/459 can be awakened only by Case 1 or 3.
[b] if WDT is enabled before SLEP, Port 6 Input Status Changed Interrupt must be disabled. Hence,
the EM78P458/459 can be awakened only by Case 1 or 2. Refer to the section on Interrupt for
further details.
[c] if Comparator High Interrupt is enabled before SLEP, WDT must be disabled by software.
However, the WDT bit in the option register remains enabled. Hence, the EM78P458/459 can
be awakened only by Case 1 or 4.
If Port 6 Input Status Change Interrupt is used to wake up the EM78P458/459 (as in Case [a] above),
the following instructions must be executed before SLEP:
MOV A, @0Bxx000110 ; Select internal TCC clock
CONTW
CLR R1 ; Clear TCC and prescaler
MOV A, @0Bxxxx1110 ; Select WDT prescaler
CONTW
WDTC ; Clear WDT and prescaler
MOV A, @0B0xxxxxxx ; Disable WDT
IOW RE
MOV R6, R6 ; Read Port 6
MOV A, @0B00000x1x ; Enable Port 6 input change interrupt
This specification is subject to change without prior notice. 07.01.2003 (V1.3)
27