204
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
8.5.4 Pulse width measurement operations
It is possible to measure the pulse width of the signals input to the TI00/P00 pin and TI01/P01 pin using the bit
timer register (TM0).
There are two measurement methods: measuring with TM0 used in free-running mode, and measuring by restarting
the timer in synchronization with the edge of the signal input to the TI00/P00 pin.
(1) Pulse width measurement with free-running counter and one capture register
When the 16-bit timer register (TM0) is operated in free-running mode (see register settings in Figure 8-
17), and the edge specified by external interrupt mode register 0 (INTM0) is input to the TI00/P00 pin, the
value of TM0 is taken into 16-bit capture/compare register 01 (CR01) and an external interrupt request signal
(INTP0) is set.
Any of three edge specifications can be selected-rising, falling, or both edges-by means of bits 2 and 3 (EX10
and ES11) of INTM0.
For valid edge detection, sampling is performed at the interval selected by means of the sampling clock
selection register (SCS), and a capture operation is only performed when a valid level is detected twice,
thus eliminating noise with a short pulse width.
Figure 8-17. Control Register Settings for Pulse Width Measurement with
Free-Running Counter and One Capture Register
(a) 16-bit timer mode control register (TMC0)
(b) Capture/compare control register 0 (CRC0)
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.
TMC0
0
0/1
1
0
0
0
0
0
OVF0
TMC01
TMC02
TMC03
Free-Running Mode
CRC0
0
0/1
1
0
0
0
0
0
CRC00
CRC01
CRC02
CR00 set as compare register
CR01 set as capture register
Summary of Contents for PD78076
Page 2: ...2 MEMO ...
Page 12: ...12 MEMO ...
Page 48: ...48 MEMO ...
Page 64: ...64 MEMO ...
Page 82: ...82 MEMO ...
Page 100: ...100 MEMO ...
Page 130: ...130 MEMO ...
Page 180: ...180 MEMO ...
Page 222: ...222 MEMO ...
Page 248: ...248 MEMO ...
Page 288: ...288 MEMO ...
Page 308: ...308 MEMO ...
Page 364: ...364 MEMO ...
Page 494: ...494 MEMO ...
Page 526: ...526 MEMO ...
Page 544: ...544 MEMO ...
Page 558: ...558 MEMO ...
Page 580: ...580 MEMO ...
Page 596: ...596 MEMO ...
Page 598: ...598 MEMO ...
Page 626: ...626 MEMO ...