MOV
I:ICS01,#00010001B ;IN0 pin selection, External trigger,
MOV
ILM,#07H
OR
CCR,#40H
LOOP:
:
User processing
:
BRA
LOOP
;---------Interrupt program---------------------------------------------
WARI0:
CLRB
I:ICP0
:
User processing
:
MOV
A,0
MOV
OV_CNT,A
RETI
WARI1:
CLRB
I:IVF0
INC
OV_CNT
:
User processing
:
RETI
CODE
ENDS
;---------Vector setting------------------------------------------------
VECT
CSEG
ABS=0FFH
ORG
00FF78H
DSL
WARI0
ORG
00FF84H
DSL
WARI1
ORG
00FFDCH
DSL
START
DB
00H
VECT
ENDS
END
START
CHAPTER 13 16-Bit I/O TIMER
;IPCP0 rising edge
;Without IPCP1 edge detection
;Clear each valid edge detection flag
;Input capture interrupt request enable
;Set ILM in PS to level 7
;Interrupt enable
;Clear valid edge detection flag
;Save OV-CNT and input capture value
;Clear overflow count counter
;for next cycle measurement
;Recover from interrupt
;Clear timer overflow generation flag
;Increment overflow counter
;Recover from interrupt
;Setting vector to interrupt number #33(21
;(Input capture)
;Setting vector to interrupt number #30(1E
;(Overflow)
;Reset vector setting
;Setting to single-chip mode
)
H
)
H
235
Need help?
Do you have a question about the F2MCTM-16LX and is the answer not in the manual?
Questions and answers