Samsung S3F84B8 User Manual page 235

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
This example shows how to configure the basic timer to sample specification.
ORG
;--------------<< Smart Option >>
ORG
DB
DB
DB
DB
;--------------<< Initialize System and Peripherals >>
ORG
RESET:
DI
LD
LD
LD
EI
;--------------<< Main loop >>
MAIN:
LD
JR
Example 10-1
0000H
003CH
0FFH
0FFH
0FFH
0FFH
0100H
CLKCON, #00011000B ; Selects non-divided CPU clock
SPL, #0FFH
BTCON, #02H
BTCON, #02H
T, MAIN
Configuring the Basic Timer
; 003CH, must be initialized to 0FF
; 003DH, must be initialized to 0FF
; 003EH, must be initialized to 0FF
; 003FH, enables LVR, enables nRESET pin
; Disables interrupt
; Stack pointer must be set
; Enables watchdog function
; Basic timer clock: f
OSC
; Clears basic counter (BTCNT)
; Enable interrupt
; Enables watchdog function
; Clears basic counter (BTCNT)
;
10-6
/4096
10 BASIC TIMER

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents