BASIC TIMER and TIMER 0
S3C80A5B
10-8
F
PROGRAMMING TIP — Configuring the Basic Timer
This example shows how to configure the basic timer to sample specifications:
ORG
0100H
RESET
DI
; Disable all interrupts
LD
BTCON,#03H
; Enable the watchdog timer
LD
CLKCON,#18H
; Non-divided clock
CLR
SYM
; Disable global and fast interrupts
CLR
SPL
; Stack pointer low byte
←
"0"
; Stack area starts at 0FFH
•
•
•
SRP
#0C0H
; Set register pointer
←
0C0H
EI
; Enable interrupts
•
•
•
MAIN
LD
BTCON,#02H
; Enable the watchdog timer
; Basic timer clock: f
OSC
/4096
; Clear basic timer counter
NOP
NOP
•
•
•
JP
T,MAIN
•
•
•