Toshiba H1 Series User Manual

Page 314

Advertising
background image

TMP92CZ26A

92CZ26A-311

(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.

Figure 3.13.12 One-shot Pulse Output (with delay)

Timer output pin TB0OUT0

c

+ d + p

c

+ d

c

Disable inversion

caused by loading into

TB0CP0H/L

Inversion

enable

(p)

(d)

Pulse width

Delay time

Inversion

enable

INTTB01 occured

Load to capture registesr 0 (TB0CP0H/L)

INT6 occured

Count clock

(Prescaler output clock)

Set the counter in free-running mode.

TB0IN0 pin input

(External trigger pulse)

Match with TB0RG0H/L

Match with TB0RG1H/L

Advertising
This manual is related to the following products: