WATCH TIMER

S3C84E5/C84E9/P84E9

 

 

FPROGRAMMING 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

JRT,MIAN

WT_INT:

AND

WTCON,#11111110b

; pending clear

IRET

.END

14-4

Page 281
Image 281
Samsung S3C84E5 user manual Programming TIP Using the Watch Timer, 0CCh,WTINT, Main Main Routine JRT,MIAN Wtint, 14-4