S3C80A5B
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
START
DI
LD
LD
CLR
CLR
CLR
CLR
•
•
LD
LD
LD
•
•
•
CHECK_RAM:
LD
CHK_R
CP
JR
DEC
CP
JR
STOP_RESET:
JR
POR_RESET LD
RAM_CLR
CLR
DJNJ
LD
0100H
BTCON,#03h
SPL,#0FFH
SYM
PP
EMT
IPR
P0CONH,#00H
P0CONL,#00H
P0PUR,#0FFH
R0,#0BFH
R0,@R0
NE,POR_RESET
R0
R0,#0B0H
UGE, CHK_R
MAIN
R0,#0FFH
@R0
R0,RAMCLR
R0,#0BFH
; Reset address
;
; enable basic timer counter.
; Initialize the system register
; Initialize the control register
; Check the RAM data whether it is stop mode releasing
; or Power On RESET
; If Power On Reset , go to POR_RESET
;
; STOP mode releasing.
;
; Power On Reset
; CHECK RAM data are failed so clear all RAM data.
; Initialize the CHECK RAM data as default value .
RESET
and POWER-DOWN
8-7