English
Language : 

3822_03 Datasheet, PDF (252/328 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.8 Standby function
(3) Notes on using the stop mode
sRelease sources
The release sources of the stop mode are shown below.
•Reset input
•INT0–INT3 interrupts
•Serial I/O transmit/receive interrupts using an external clock
•Timers X/Y interrupts using an external clock
•Key input interrupt (key-on wake up)
Each INT pin (INT0, INT1, INT2, INT3) is also used as ports P42, P43, P50 or P51. To use INT0 to INT3
interrupts, after setting the corresponding bits of the following direction registers to “0” to set them for
the input mode, execute the STP instruction.
•Port P4 direction register (address 000916)
•Port P5 direction register (address 000B16)
The pin 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 000516) to “0” for setting the input mode.
And then, execute the STP instruction.
sRegister setting
To use the above interrupt requests for restoration from the stop mode, after setting the following,
execute the STP instruction in order to enable the interrupt request to be used.
[Necessary register setting]
Œ Interrupt disable flag I = “0” (interrupts enabled)
 Both timers 1 and 2 interrupt enable bits = “0” (interrupts disabled)
Ž 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)
•At restoration from the stop mode, the values of the timers 1, 2 and 123 mode registers are auto-
matically rewritten. Accordingly, set each of them again.
•To prevent a DC voltage from being applied to the LCD, after setting the LCD enable bit (bit 3) of
the LCD mode register to “0,” execute the STP instruction.
sClock after restoration
After restoration from the stop mode by an interrupt request, the contents of the CPU mode register
previous to the STP instruction execution are held. Accordingly, when both XIN and XCIN were oscil-
lating before execution of the STP instruction, the oscillation of both XIN and XCIN is resumed at
restoration from the stop mode by an interrupt request.
In the above case, when the XIN side is set as a system clock, the oscillation stabilizing time for
approximately 8,000 cycles of the XIN input is reserved at restoration from the stop mode.
At this time, note that the oscillation on the XCIN side may not be stabilized even after the lapse of
the oscillation stabilizing time (of the XIN side).
2–186
3822 GROUP USER’S MANUAL