EM78P458/459
OTP ROM
IOW RF
ENI (or DISI) | ; Enable (or disable) global interrupt |
SLEP; Sleep
NOP
Similarly, if the Comparator High Interrupt is used to wake up the EM78P458/459 (as in Case [c] 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 A, @0B01xxxxxx | ; Enable comparator high interrupt |
IOW RF |
|
ENI (or DISI) | ; Enable (or disable) global interrupt |
SLEP | ; Sleep |
NOP |
|
One problem user must be aware of, is that after waking up from the sleep mode, the WDT function will enable automatically. The WDT operation (being enabled or disabled) should be handled appropriately by software after waking up from the sleep mode.
2. The Status of T, and P of STATUS Register
A RESET condition is initiated by one of the following events:
(1)A
(2)A
(3)Watchdog Timer
The values of T and P, as listed in Table 5 below, are used to check how the processor wakes up. Table 6 shows the events, which may affect the status of T and P.
This specification is subject to change without prior notice. | 28 | 07.01.2003 (V1.3) |