![Samsung S3C9454B User Manual Download Page 164](http://html1.mh-extra.com/html/samsung/s3c9454b/s3c9454b_user-manual_4006826164.webp)
S3C9454B/F9454B
8-BIT PWM
11-7
F
PROGRAMMING TIP — Programming the PWM Module to Sample Specifications
;--------------<< Interrupt Vector Address >>
ORG
0000H
VECTOR
00H,INT_9454
; S3C9454/F9454 has only one interrupt vector
;--------------<< Smart Option >>
ORG
003CH
DB
00H
;
003CH, must be initialized to 0.
DB
00H
;
003DH, must be initialized to 0.
DB
0E7H
;
003EH, enable LVR (2.3 V)
DB
03H
;
003FH, internal RC (3.2 MHz in V
DD
= 5 V)
;--------------<< Initialize System and Peripherals >>
ORG
0100H
RESET:
DI
; disable interrupt
LD
BTCON,#10100011B
; Watchdog disable
•
•
LD
P0CONH,#10011010B
; Configure P0.6 PWM output
LD
PWMCON,#00000110B
; f
OSC
/64, counter/interrupt enable
LD
PWMDATA,#80H
;
•
•
EI
; Enable interrupt
;--------------<< Main loop >>
MAIN:
;
•
;
•
;
•
;
•
;
JR
t,MAIN
;
;--------------<< Interrupt Service Routines >>
INT_9454:
•
; Interrupt enable bit and pending bit check
TM
PWMCON,#00000010B
; Interrupt enable check
JR
Z,NEXT_CHK1
;
TM
PWMCON,#00000001B
; Interrupt pending bit check
JP
NZ,INT_PWM
; PWMCON's pending bit set --> PWM interrupt
NEXT_CHK1:
•
•
•
IRET
;
Summary of Contents for S3C9454B
Page 1: ...S3C9454B F9454B 8 BIT CMOS MICROCONTROLLER USER S MANUAL Revision 1 ...
Page 25: ...PRODUCT OVERVIEW S3C9454B F9454B 1 10 NOTES ...
Page 35: ...ADDRESS SPACES S3C9454B F9454B 2 10 NOTES ...
Page 65: ...CONTROL REGISTERS S3C9454B F9454B 4 18 NOTES ...
Page 123: ...CLOCK CIRCUIT S3C9454B F9454B 7 4 NOTES ...
Page 133: ...RESET and POWER DOWN S39454B F9454B 8 10 NOTES ...
Page 145: ...I O PORTS S3C9454B F9454B 9 12 NOTES ...
Page 173: ...A D CONVERTER S3C9454B F9454B 12 8 NOTES ...
Page 183: ...ELECTRICAL DATA S3C9454B F9454B 13 10 NOTES ...