MOV
TCR2,#00000010B
MOV
TCR0,#10101011B
SETI
:
;------------------------Interrupt program----------------------------------------------------------------------------
WARI CLRB
TIF0
PUSHW
A
XCHW
A,T
PUSHW
A
:
User processing
POPW
A
XCHW
A,T
POPW
A
RETI
ENDS
; --------------------------------------------------------------------------------------------------------------------
END
CHAPTER 8 8/16-BIT CAPTURE TIMER/COUNTER
; Outputs a square wave (TO) from the P34 pin.
; Allows timer 0 interrupt request output, clears the
counter, and starts the timer.
; Enables the CPU interrupt.
; Clears the interrupt request flag.
201