2.9 Standby function
APPLICATION
2–183
3820 GROUP USER’S MANUAL
I
Restoration by an interrupt request
In the wait mode, the occurrence of an interrupt request releases the wait mode and the supplying the
internal clock
φ
to the CPU is started. At the same time, the interrupt request used for restoration is
accepted, so the interrupt processing routine is executed.
However, to use an interrupt for restoration from the wait mode, after setting the following, execute
the
WIT
instruction in order to enable the interrupt to be used.
[Necessary register setting]
Interrupt disable flag I = “0” (interrupts enabled)
Interrupt request bit of the interrupt source to be used for restoration = “0” (no interrupt request
issued)
Interrupt enable bit of the interrupt source to be used for restoration = “1” (interrupts enabled)
For interrupts, refer to
“2.2 Interrupts.”
(3) Notes on the wait mode
I
Restoration by INT
0
to INT
3
interrupt requests
Each INT pin (INT
0
, INT
1
, INT
2
, INT
3
) is also used as ports P4
2
, P4
3
, P5
7
or P6
0
and each key input
pin is also used as port P2. To use INT
0
to INT
3
interrupts, set the corresponding bits of the following
direction registers to “0” for setting the input mode. And then, execute the
WIT
instruction.
Port P2 direction register (address 0005
16
)
Port P4 direction register (address 0009
16
)
Port P5 direction register (address 000B
16
)
Port P6 direction register (address 000D
16
)
I
Restoration by key input interrupt request
The pins for a key input interrupt is also used as port P2. To use a key input interrupt, set the
corresponding bits of the port P2 direction register (address 0005
16
) to “0” for setting the input mode.
And then, execute the
WIT
instruction.
I
Register setting
To use the above interrupt requests for restoration from the stop mode, after setting the following,
execute the
WIT
instruction in order to enable the interrupt request to be used.
[Necessary register setting]
Interrupt disable flag I = “0” (interrupts enabled)
Interrupt request bit of the interrupt source to be used for restoration = “0” (no interrupts request
issued)
Interrupt enable bit of the interrupt source to be used for restoration = “1” (interrupts enabled)
I
Operation of the watchdog timer
The watchdog timer continues to count down in the wait mode. The CPU stops in the wait mode,
however, the watchdog timer cannot be written by software.
As a result, an internal reset occurs at an underflow of the watchdog timer, the wait mode is released
automatically.