210
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
(4) Pulse width measurement by means of restart
When input of a valid edge to the TI00/P00 pin is detected, the count value of the 16-bit timer register (TM0)
is taken into 16-bit capture/compare register 01 (CR01), and then the pulse width of the signal input to the
TI00/P00 pin is measured by clearing TM0 and restarting the count (see register settings in Figure 8-24).
The edge specification can be selected from two types, rising and falling edges, by bits 2 and 3 (ES10 and
ES11) of the external interrupt mode register 0 (INTM0).
In a valid edge detection, the sampling is performed by a cycle selected by the sampling clock selection
register (SCS), and a capture operation is not performed before detecting valid levels twice allowing short
pulse width noise to be eliminated.
Caution If the valid edge of TI00/P00 is specified to be both rising and falling edge, capture/compare
register 00 (CR00) cannot perform the capture operation.
Figure 8-24. Control Register Settings for Pulse Width Measurement by Means of Restart
(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.
Figure 8-25. Timing of Pulse Width Measurement Operation by
Means of Restart (with Rising Edge Specified)
TMC0
0
0/1
0
1
0
0
0
0
OVF0
TMC01
TMC02
TMC03
Clear & start with valid edge of TI00/P00 pin
CRC0
1
1
1
0
0
0
0
0
CRC00
CRC01
CRC02
CR00 set as capture register
Captured in CR00 on invalid
edge of TI00/P00 Pin
CR01 set as capture register
Count
Clock
TM0 Count
Value
TI00 Pin Input
CR01 Capture
Value
CR00 Capture
Value
INTP0
t
0000
0001
D0
0000
0001
D1
0001
0000
D2
D0
D2
D1
D1 x t
D2 x t
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 ...