106
CHAPTER 7 16-BIT TIMER 0 TM0
7.5 16-Bit Timer 0 Operations
7.5.1 Pulse width measurement operations
It is possible to measure the pulse width of the signals input to the TI00/P40 to TI02/P42 pins using the
16-bit timer register (TM0). TM0 is used in free-running mode.
(1) Pulse width measurement with free-running counter and one capture register (TI00)
When the edge specified by prescaler mode register (PRM0) is input to the TI00/P40 pin, the value of TM0 is
taken into 16-bit capture register 00 (CR00) and an external interrupt request signal (INTTM00) is set.
Any of three edge specifications can be selected—rising, falling, or both edges—by means of bits 2 and 3 (ES00
and ES01) of PRM0.
For valid edge detection, sampling is performed at the count clock selected by PRM0, and a capture operation
is only performed when a valid level is detected twice, thus eliminating noise with a short pulse width.
Figure 7-5. Configuration Diagram for Pulse Width Measurement by Free-Running Counter
f
X
/2
3
f
X
/2
4
f
X
/2
5
f
X
/2
6
TI00
16-bit timer register (TM0)
INTOVF
16-bit capture register 00 (CR00)
Internal bus
INTTM00
Selector
Figure 7-6.
Timing of Pulse Width Measurement Operation by Free-Running Counter
and One Capture Register (with Both Edges Specified)
t
Count clock
TM0 count
value
Value loaded
to CR00
INTOVF
0000H 0001H
D0
D1
FFFFH 0000H
D2
D3
D3
D2
D1
D0
(D1 – D0)
×
t
(10000H – D1 + D2)
×
t
(D3 – D2)
×
t
TI00 pin
input
INTTM00
Содержание mPD780973 Series
Страница 2: ...2 MEMO ...
Страница 66: ...66 MEMO ...
Страница 98: ...98 MEMO ...
Страница 138: ...138 MEMO ...
Страница 164: ...164 MEMO ...
Страница 182: ...182 MEMO ...
Страница 204: ...204 MEMO ...
Страница 244: ...244 MEMO ...
Страница 262: ...262 MEMO ...
Страница 278: ...278 MEMO ...
Страница 290: ...290 MEMO ...