WATCH TIMER S3C84E5/C84E9/P84E9
14-4
F PROGRAMMING TIP — Using the Watch Timer
ORG 0000h
VECTOR 0CCh,WT_INT
ORG 0100h
INITIAL:
LD SYM,#00h ; Disable Global/Fast interrupt
LD IMR,#00010000b ; Enable IRQ3 interrupt
LD SPH,#00000000b ; Set stack area
LD SPL,#0FFh
LD BTCON,#10100011b ; Disable Watch-dog
LD WTCON,#11001110b ; 0.5 kHz buzzer, 1.955 ms duration interrupt
; Interrupt enable, (fxt: 32, 768Hz)
EI
MAIN:
•
•
•
MAIN ROUTINE
•
•
•
JR T,MIAN
WT_INT:
•
•
•
AND WTCON,#11111110b ; pending clear
IRET
.END