![](http://datasheet.mmic.net.cn/30000/M30280M6-XXXHP_datasheet_2358793/M30280M6-XXXHP_158.png)
M16C/28 Group
Under development Preliminary specification
Specifications in this manual are tentative and subject to change.
13. Timer S (Input Capture / Output Compare)
Rev.0.60 2004.02.01
page 140 of N
REJ09B0047-0060Z
13.4 Time Measurement Function
Synchronizing with an external trigger input, the value of the base timer is stored into the G1TMj register
(j=0 to 7). Table 13.4.1 shows specifications of the time measurement function. Table 13.4.2 shows regis-
ter settings associated with the time measurement function. Figures 13.4.1 and 13.4.2 display operational
timing of the time measurement function. Figure 13.4.3 shows operational timing of the prescaler function
and the gate function.
Table 13.4.1. Time Measurement Function Specifications
Item
Specification
Measurement channel
Channels 0 to 7
Selecting trigger input polarity
Rising edge, falling edge, both edges of the INPC1j pin(Note 1)
Measurement start condition
The IFEj bit in the G1FE register should be set to "1" (channels 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 should be set to "0" (channel j function disabled)
Time measurement timing
No prescaler
:every input is a trigger
Prescaler (for channel 6 and channel 7):
every [G1TPRk (k=6,7) +1]th input is a trigger
Interrupt request generation timing
The G1IRi bit (i=0 to 7) in the interrupt request register (See Figure 13.10) is
set to "1" at time measurement timing
INPC1j pin function(Note 1)
Trigger input pin
Selectable function
Digital filter function
The digital filter samples a trigger input level every f1, f2 or fBT1 to pass
pulses matching a trigger input level three times
Prescaler function (for channel 6 and channel 7)
Trigger inputs are counted to perform time measurement whenever value
of the G1TPRk(k=6,7) register + 1 trigger is input
Gate function (for channel 6 and channel 7)
When a trigger input is inhibited with setting the GOC bit in the G1TMCRk
(k=6,7) register to "1" (gate cleared by matching the G1POp register (p=4
when k=6, p=5 when k=7)) after time measurement by first trigger input, a
trigger input is enabled to receive again by matching the base timer with the
G1POp register
Digital Debounce function (for channel7)
See section 13.6.2 and 17.6 for details
Note1: The INPC10 to INPC17 pins