S3C80A5B
RESET
and POWER-DOWN
8-7
F
PROGRAMMING TIP — To Divide STOP Mode Releasing and POR.
This example shows how to enter the stop mode and how to know it is stop mode releasing or power on RESET.
ORG
0100H
; Reset address
START
DI
;
LD
BTCON,#03h
; enable basic timer counter.
LD
SPL,#0FFH
; Initialize the system register
CLR
SYM
CLR
PP
CLR
EMT
CLR
IPR
•
•
LD
P0CONH,#00H
; Initialize the control register
LD
P0CONL,#00H
LD
P0PUR,#0FFH
•
•
•
CHECK_RAM:
;
Check the RAM data whether it is stop mode releasing
;
or Power On RESET
LD
R0,#0BFH
; If Power On Reset , go to POR_RESET
CHK_R
CP
R0,@R0
;
JR
NE,POR_RESET
DEC
R0
CP
R0,#0B0H
JR
UGE, CHK_R
STOP_RESET:
; STOP mode releasing.
JR
MAIN
;
POR_RESET LD
R0,#0FFH
; Power On Reset
; CHECK RAM data are failed so clear all RAM data.
RAM_CLR
CLR
@R0
DJNJ
R0,RAMCLR
LD
R0,#0BFH
; Initialize the CHECK RAM data as default value .