221
CHAPTER 7 STANDBY FUNCTION
INT4
INT4
31.3 ms 31.3 ms
Wait Low-speed
operation
STOP modeOperating mode
STOP instruction
V
DD
0 V
P00/INT4
CPU operation
Voltage on V
DD
High-speed
operation
<Timing chart>
<Sample program>
(INT4 service program, MBE = 0)
VSUB4: SKT PORT0.0 ; P00 = 1?
BR PDOWN ; Power-down
SET1 BTM.3 ; Power-on
WAIT: SKT IRQBT ; Wait for 31.3 ms.
BR WAIT
SKT PORT0.0 ; Chattering check
BR PDOWN
MOV A,#0011B
MOV PCC,A ; Set high-speed mode.
MOV XA.#xxH ; Set port mode register.
MOV PMGm,XA
EI IE0
EI IET0
RETI
PDOWN: MOV A,#0 ; Lowest-speed mode
MOV PCC,A
MOV XA,#00H
MOV PMGA,XA ; I/O port high impedance
MOV PMGB,XA
DI IE0 ; Disable INT0 and INTT0
DI IET0
MOV A,#1011B
MOV BTM,A ; Wait time
= ..
31.3 ms
STOP ; Set STOP mode.
NOP
RETI