Toshiba H1 Series Data Book page 314

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

(4) Application examples of capture function
Used capture 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
1.
One-shot pulse output from external trigger pulse
Set the up counter UC10 in free-running mode with the internal input clock,
input the external trigger pulse from TB0IN0 pin, and load the value of up
counter into capture register TB0CP0H/L at the rising edge of the TB0IN0 pin.
When the interrupt INT6 is generated at the rising edge of TB0IN0 input, set
the TB0CP0H/L value (c) plus a delay time (d) to TB0RG0H/L (=c+d), and set the
above set value (c+d) plus a one-shot pulse width (p) to TB0RG1H/L (=c+d+p).
The TB0FFCR<TB0E1T1, TB0E0T1> register should be set "11" and that the
TB0FF0 inversion is enabled only when the up counter value matches
TB0RG0H/L or TB0RG1H/L. When interrupt INTTB01 occurs, this inversion will
be disabled after one-shot pulse is output.
The (c), (d) and (p) correspond to c, d, and p in the Figure 3.13.12.
Count clock
(Prescaler output clock)
TB0IN0 pin input
(External trigger pulse)
Match with TB0RG0H/L
Match with TB0RG1H/L
Timer output pin TB0OUT0
Figure 3.13.12 One-shot Pulse Output (with delay)
Set the counter in free-running mode.
c + d
c
Load to capture registesr 0 (TB0CP0H/L)
INT6 occured
Inversion
enable
Disable inversion
Inversion
caused by loading into
enable
TB0CP0H/L
Delay time
(d)
92CZ26A-311
c + d + p
INTTB01 occured
Pulse width
(p)
TMP92CZ26A

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents