CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U16315EJ1V0UD
143
6.4.3 Pulse width measurement operations
It is possible to measure the pulse width of the signals input to the TI000 pin and TI010 pin using 16-bit timer
counter 00 (TM00).
There are two measurement methods: measuring with TM00 used in free-running mode, and measuring by
restarting the timer in synchronization with the edge of the signal input to the TI000 pin.
(1) Pulse width measurement with free-running counter and one capture register
When 16-bit timer counter 00 (TM00) is operated in free-running mode (see register settings in
Figure 6-13
), and
the edge specified by 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 external interrupt request signal (INTTM010) is
set.
Any of three edges
rising, falling, or both edges
can be selected using bits 4 and 5 (ES000 and ES001) of
PRM00.
For valid edge detection, sampling is performed using the count clock selected by 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-13. Control Register Settings for Pulse Width Measurement with Free-Running Counter
and One Capture Register
(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
0/1
CRC000
0
CRC00
CR000 used as compare register
CR010 used as capture register
Remark
0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.
For details, see
Figures 6-2
and
6-3
.
Содержание 78K0/KD1 Series
Страница 2: ...Preliminary User s Manual U16315EJ1V0UD 2 MEMO ...
Страница 444: ...Preliminary User s Manual U16315EJ1V0UD 444 MEMO ...