English
Language : 

TMP93CW46A Datasheet, PDF (140/242 Pages) Toshiba Semiconductor – CMOS 16-Bit Microcontroller
TMP93CW46A
(4) Application examples of capture function
The loading of up counter (UC4) values into the capture registers CAP1 and CAP2, the
timer flip-flop TFF4 inversion due to the match detection by comparators CP4 and CP5,
and the output of the TFF4 status to TO4 pin can be enabled or disabled. Combined with
interrupt function, they can be applied in many ways, for example:
1. One-shot pulse output from external trigger pulse
2. Frequency measurement
3. Pulse width measurement
4. Time difference measurement
1. One-shot pulse output from external trigger pulse
Set the up counter UC4 in free-running mode with the internal input clock, input the
external trigger pulse from TI4 pin, and load the value of up counter into capture register
CAP1 at the rising edge of the TI4 pin. Then set to T4MOD<CAP12M1:0> = 01.
When the interrupt INT4 is generated at the rising edge of TI4 input, set the CAP1 value
(c) plus a delay time (d) to TREG4 ( = c + d), and set the above set value (c + d) plus a
one-shot pulse width (p) to TREG5 ( = c + d + p). When the interrupt INT4 occurs the
T4FFCR<EQ5T4, EQ4T4> register should be set that the TFF4 inversion is enabled only
when the up counter value matches TREG4 or TREG5. When interrupt INTTR5 occurs,
this inversion will be disabled.
Count clock
(Internal clock)
TI4 pin input
(External trigger pulse)
Match with TREG4
Match with TREG5
Timer output pin TO4
Set the counter in free-running mode.
c
c+d
c+d+p
Load the up counter value into capture register 1 (CAP1).
INT4 occurred
Inversion
enable
Disables inversion
caused by loading
of the up counter
value into CAP1.
Delay time
(d)
INTTR5 occurred
Inversion
enable
Pulse width
(p)
Figure 3.9.15 One-shot Pulse Output (with delay)
93CW46A-138
2004-02-10