CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U16315EJ1V0UD
147
(3) Pulse width measurement with free-running counter and two capture registers
When 16-bit timer counter 00 (TM00) is operated in free-running mode (see
Figure 6-19
), it is possible to
measure the pulse width of the signal input to the TI000 pin.
When the edge specified by bits 4 and 5 (ES000 and ES001) of prescaler mode register 00 (PRM00) is input to
the TI000 pin, the value of TM00 is taken into 16-bit timer capture/compare register 010 (CR010) and an interrupt
request signal (INTTM010) is set.
Also, when the inverse edge to that of the capture operation is input into CR010, the value of TM00 is taken into
16-bit timer capture/compare register 000 (CR000).
Either of two edges
rising or falling
can be selected as the valid edge of the TI000 pin specified using bits 4
and 5 (ES000 and ES001) of prescaler mode register 00 (PRM00).
For TI000 pin valid edge detection, sampling is performed at the interval selected by prescaler mode register 00
(PRM00), and a capture operation is only performed when a valid level is detected twice, thus eliminating noise
with a short pulse width.
Figure 6-19. Control Register Settings for Pulse Width Measurement with Free-Running Counter and
Two Capture Registers
(a) 16-bit timer mode control register 00 (TMC00)
0
0
0
0
TMC003
0
TMC002
1
TMC001
0/1
OVF00
0
TMC00
Free-running mode
(b) Capture/compare control register 00 (CRC00)
0
0
0
0
0
CRC002
1
CRC001
1
CRC000
1
CRC00
CR000 used as capture register
Captures to CR000 at inverse edge
to valid edge of TI000.
CR010 used as capture register
Remark
0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.
See the description of the respective control registers for details.
Содержание 78K0/KD1 Series
Страница 2: ...Preliminary User s Manual U16315EJ1V0UD 2 MEMO ...
Страница 444: ...Preliminary User s Manual U16315EJ1V0UD 444 MEMO ...