Samsung S3C9454B User Manual page 151

Table of Contents

Advertisement

BASIC TIMER and TIMER 0
F
PROGRAMMING TIP — Configuring the Basic Timer
This example shows how to configure the basic timer to sample specification.
ORG
VECTOR
;--------------<< Smart Option >>
ORG
DB
DB
DB
DB
;--------------<< Initialize System and Peripherals >>
ORG
RESET:
DI
LD
LD
LD
EI
;--------------<< Main loop >>
MAIN:
LD
JR
;--------------<< Interrupt Service Routines >>
INT_9454:
IRET
END
10-6
0000H
00H,INT_9454
003CH
00H
00H
0E7H
03H
0100H
CLKCON,#00011000B
SP,#0C0H
BTCON,#02H
BTCON,#02H
T,MAIN
; S3C9454B/F9454B has only one interrupt vector
; 003CH, must be initialized to 0
; 003DH, must be initialized to 0
; 003EH, enable LVR (2.3 V)
; 003FH, internal RC (3.2 MHz in V
; Disable interrupt
; Select non-divided CPU clock
; Stack pointer must be set
; Enable watchdog function
; Basic timer clock: f
OSC
; Basic counter (BTCNT) clear
; Enable interrupt
; Enable watchdog function
; Basic counter (BTCNT) clear
;
; Interrupt enable bit and pending bit check
;
; Pending bit clear
;
;
S3C9454B/F9454B
= 5 V)
DD
/4096

Advertisement

Table of Contents
loading

This manual is also suitable for:

F9454b

Table of Contents