EM78P156N
OTP ROM
vector following
Only one of Cases 2 and 3 can be enabled before entering the 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 EM78P156N can be awakened only by Case 1 or 3.
[b]if WDT is enabled before SLEP, Port 6 Input Status Change Interrupt must be disabled. Hence, the EM78P156N can be awakened only by Case 1 or 2. Refer to the section on Interrupt.
If Port 6 Input Status Change Interrupt is used to
MOV A, @xx000110b | ; Select internal TCC clock |
CONTW |
|
CLR R1 | ; Clear TCC and prescaler |
MOV A, @xxxx1110b | ; Select WDT prescaler |
CONTW |
|
WDTC | ; Clear WDT and prescaler |
MOV A, @0xxxxxxxb | ; Disable WDT |
IOW RE |
|
MOV R6, R6 | ; Read Port 6 |
MOV A, @00000x1xb | ; Enable Port 6 input change interrupt |
IOW RF |
|
ENI (or DISI) | ; Enable (or disable) global interrupt |
SLEP | ; Sleep |
NOP |
|
One problem user should be aware of, is that after waking up from the sleep mode, WDT would enable automatically. The WDT operation (being enabled or disabled) should be handled appropriately by software after waking up from the sleep mode.
This specification is subject to change without prior notice. 21 | 07.29.2004 (V1.2) |