Samsung S3C84I8 User Manual page 261

Table of Contents

Advertisement

S3C84I8/F84I8/84I9/F84I9
PROGRAMMING TIP — To generate 38 kHz, 1/3duty signal through P2.0
This example sets Timer B to the repeat mode, sets the oscillation frequency as the Timer B clock source, and
TBDATAH and TBDATAL to make a 38 kHz, 1/3 Duty carrier frequency. The program parameters are:
— Timer B is used in repeat mode
— Oscillation frequency is 16 MHz (0.0625 µs), fx=fxx/4=4MHz (0.25 µs)
— TBDATAH = 8.795 µs/0.25 µs = 35.18, TBDATAL = 17.59 µs/0.25 µs = 70.36
— Set P2.0 to TBPWM mode.
ORG
START
DI
LD
LD
LD
LD
8.795 µ s
17.59 µ s
37.9 kHz 1/3 Duty
0100H
TBDATAL,#(35-1)
TBDATAH,#(70-1)
TBCON,#00100111B
P2CONL,#03H
; Reset address
; Set 17.5 µs
; Set 8.75 µs
; Clock Source ← fxx/4
; Disable Timer B interrupt.
; Select repeat mode for Timer B.
; Start Timer B operation.
; Set Timer B Output flip-flop (T-FF) high.
;
; Set P2.0 to TBPWM mode.
; This command generates 38 kHz, 1/3 duty pulse signal
through P2.0.
8-BIT TIMER A/B
11-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c84i9S3f84i8S3f84i9

Table of Contents