![](http://datasheet.mmic.net.cn/30000/MN101CF54DBF_datasheet_2374941/MN101CF54DBF_314.png)
Chapter 7
16-bit Timers
VII - 62
16-bit Timer Capture
7-12
16-bit Timer Capture
7-12-1
Operation
The value of binary counter is read out at the timing of the external interrupt input signal, or at the timing
of the writing operation with an any value to the capture register.
nCapture Operation with External Interrupt Signal as a Trigger (Timer 7, Timer 8)
Input capture trigger is generated at the external interrupt signal that passed through the external inter-
rupt interface block. The capture trigger is selected by the timer n mode register 2 (TMnMD2) and the
external interrupt control register (IRQ0ICR, IRQ1ICR, IRQ2ICR, IRQ3ICR).
Selectable capture triggers and the interrupt flag setup are shown below.
Table 7-12-1
Capture Trigger
Capture trigger source
Timer 7 mode
register 2
External interrupt n control
register (IRQnICR)
Both edges interrupt
control register (EDGDT)
Interrupt starting edge
of external interrupt n
T7ICT1-0 T7ICEDG
REDGn (bp5)
EDGSEL3
EDGSEL2
IRQ0 falling edge
00(IRQ0)
1
0
-
IRQ0 falling edge
IRQ0 rising edge
00(IRQ0)
1
-
IRQ0 rising edge
IRQ0 both edge
00(IRQ0)
0
-
IRQ0 falling edge
1
-
IRQ0 rising edge
IRQ1 falling edge
01(IRQ1)
1
0
-
IRQ1 falling edge
IRQ1 rising edge
01(IRQ1)
1
-
IRQ1 rising edge
IRQ1 both edge
01(IRQ1)
0
-
IRQ1 falling edge
1
-
IRQ1 rising edge
IRQ2 falling edge
10(IRQ2)
1
0
-
0
IRQ2 falling edge
IRQ2 rising edge
10(IRQ2)
1
-
0
IRQ2 rising edge
IRQ2 both edge(*)
10(IRQ2)
0
-
0
IRQ2 falling edge
1
-
0
IRQ2 rising edge
IRQ3 falling edge
11(IRQ3)
1
0
-
IRQ3 falling edge
IRQ3 rising edge
11(IRQ3)
1
0
-
IRQ3 rising edge
IRQ3 both edge(*)
11(IRQ3)
0
-
IRQ3 falling edge
1
0
-
IRQ3 rising edge
Input capture signals of the 16-bit timers 7 and 8 are generated by fosc or fs. (When the
timer’s clock source is fosc, they are generated by fosc. Other than that, they are generated
by fs.) Therefore, when external event frequency (TMnIO input) is counted with event fre-
quency higher than fs, the count number may not mactch the caunt value.
So be careful when fs is used as a system clock by dividing oscillation clock fosc, using clock
switching function.
The external interrupt 2, 3 (IRQ2, IRQ3) have the function of both edges interrupt. However,
input capture can not be used together with both edges interrupt. [table 7-12-1 (*)]