![](http://datasheet.mmic.net.cn/30000/M30855FHTGP_datasheet_2359399/M30855FHTGP_308.png)
Page 285
4
9
4
f
o
5
0
2
,
1
0
.
l
u
J
3
0
.
1
.
v
e
R
3
0
1
0
-
7
3
0
B
9
0
J
E
R
22. Intelligent I/O (Time Measurement Function)
)
T
5
8
/
C
2
3
M
,
5
8
/
C
2
3
M
(
p
u
o
r
G
5
8
/
C
2
3
M
22.2 Time Measurement Function
When external trigger is applied, the value of the base timer is stored into the G1TMj register (j=0 to 7).
Table 22.4 shows specifications of the time measurement function. Tables 22.5 and 22.6 list pin settings of
the time measurement function. Figures 22.13 and 22.14 show operation examples of the time measure-
ment function. Figure 22.15 shows an operation example of the prescaler function and gate function.
Table 22.4 Time Measurement Function Specifications
Item
Specification
Measurement Channel
Channels 0 to 7
Trigger Input Polarity
Rising edge, falling edge and both edges of the INPC1j pin
Measurement Start Condition
The IFEj bit in the G1FE register is set to "1" (channel j function enabled)
when the FSCj bit (j=0 to 7) in the G1FS register is set to "1" (time
measurement function selected)
Measurement Stop Condition
The IFEj bit is set to "0" (channel j function disabled)
Time Measurement Timing
No prescaler: every time a trigger signal is applied
Prescaler (for channel 6 and channel 7):
every
G1TPRk register (k=6,7) value +1 times a trigger signal is applied
Interrupt Request Generating Timing
The TM1jR bit in the interrupt request register (See Figure 11.14) is set to
"1" (interrupt requested) at time measurement timing
INPC1j Pin Function
Trigger input pin
Selectable Function
Digital filter function
The digital filter samples a trigger input signal level every f1 or fBT1
cycles and passes pulse signals, matching trigger input signal level,
three times
Prescaler function (for channel 6 and channel 7)
Time measurement is executed every
G1TPRk register value +1 times a
trigger signal is applied
Gate function (for channel 6 and channel 7)
After time measurement by the first trigger input, trigger input cannot be
accepted. However, while the GOC bit in the G1TMCRk register is set to
"1" (gate cleared by matching the base timer with the G1POp register (p=4
when k=6, p=5 when k=7), trigger input can be accepted again by matching
the base timer value with the G1POp register setting or by setting the GSC
bit in the G1TMCRk register is set to "1"