CHAPTER 8 STANDBY FUNCTION
224 Users Manual U10676EJ3V0UM
<Program example>
(INT0 servicing program, MBE = 0)
VSUB0: SKT PORT6.1 ; P61 = 1?
BR PDOWN ; Power down
SET1 BTM.3 ;Power on
WAIT: SKT IRQBT ; Waits for 21.8 ms
BR WAIT
SKT PORT6.1 ; Checks chattering
BR PDOWN
MOV A, #0011B
MOV PCC, A ; Sets high-speed mode
MOV XA.#××H ; Sets port mode register
MOV PMGm, XA
EI IEBT
EI IET0
RETI
PDOWN: MOV A, #0 ; Lowest-speed mode
MOV PCC, A
MOV XA, #00H
MOV PMGA, XA ; I/O port in high-impedance state
DI IEBT ; Disables INTBT and INTT0
DI IET0
MOV A, #1011B
MOV BTM, A ; Wait time = 21.8 ms
NOP
STOP ; Sets STOP mode
NOP
RETI
..