Samsung S3C9454B User Manual page 164

Table of Contents

Advertisement

S3C9454B/F9454B
F
PROGRAMMING TIP — Programming the PWM Module to Sample Specifications
;--------------<< Interrupt Vector Address >>
ORG
0000H
VECTOR
;--------------<< Smart Option >>
ORG
003CH
DB
DB
DB
DB
;--------------<< Initialize System and Peripherals >>
ORG
RESET:
DI
LD
LD
LD
LD
EI
;--------------<< Main loop >>
MAIN:
JR
;--------------<< Interrupt Service Routines >>
INT_9454:
TM
JR
TM
JP
NEXT_CHK1:
IRET
00H,INT_9454
00H
00H
0E7H
03H
0100H
BTCON,#10100011B
P0CONH,#10011010B
PWMCON,#00000110B
PWMDATA,#80H
t,MAIN
PWMCON,#00000010B
Z,NEXT_CHK1
PWMCON,#00000001B
NZ,INT_PWM
; S3C9454/F9454 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
; Watchdog disable
; Configure P0.6 PWM output
; f
/64, counter/interrupt enable
OSC
;
; Enable interrupt
;
;
;
;
;
;
; Interrupt enable bit and pending bit check
; Interrupt enable check
;
; Interrupt pending bit check
; PWMCON's pending bit set --> PWM interrupt
;
8-BIT PWM
= 5 V)
DD
11-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

F9454b

Table of Contents