Download USER`S MANUAL

Transcript
S3C8235B/F8235B
8-BIT TIMER A/B
F PROGRAMMING TIP — Using the Timer B
ORG
0000h
VECTOR
0E2h,TBUN_INT
ORG
0100h
LD
LD
LD
LD
LD
SYM,#00h
IMR,#00000010b
SPH,#00000000b
SPL,#00000000b
BTCON,#10100011b
; Disable Global interrupt
; Enable IRQ1 interrupt
; Set stack area
SB1
LD
SB0
P0CONH,#00000011b
; Enable TBPWM output
LD
LD
LD
TBDATAH,#80h
TBDATAL,#80h
TBCON,#11001110b
INITIAL:
; Disable Watch-dog
; Enable interrupt
; Duration 256 µs (8 MHz x’tal)
EI
MAIN:
•
•
•
MAIN ROUTINE
•
•
•
JR
T,MAIN
TBUN_INT:
•
•
•
Interrupt service routine
•
•
•
IRET
.END
11-9