10.7 Applications using the Capture Function
The capture function can be used to develop many applications, including those described below:
1. One-shot pulse output triggered by an external pulse
2. Frequency measurement
3. Pulse width measurement
10.7.1 One-shot pulse output triggered by an external pulse
One-shot pulse output triggered by an external pulse is carried out as follows:
The 16-bit up-counter is made to count up by putting it in a free-running state using the prescaler output
clock. An external pulse is input through the TBxIN pin. A trigger is generated at the rising of the external
pulse by using the capture function and the value of the up-counter is taken into the capture registers (TBxCP0).
The CPU must be programmed so that an interrupt INTCAPx0 is generated at the rising of an external trig-
ger pulse. This interrupt is used to set the timer registers (TBxRG0) to the sum of the TBxCP0 value (c) and
the delay time (d), (c + d), and set the timer registers (TBxRG1) to the sum of the TBxRG0 values and the
pulse width (p) of one-shot pulse, (c + d + p). TBxRG1 change must be completed before the next match.
In addition, the timer flip-flop control registers(TBxFFCR<TBE1T1, TBE0T1>) must be set to "11". This en-
ables triggering the timer flip-flop (TBxFF0) to reverse when UC matches TBxRG0 and TBxRG1. This trig-
ger is disabled by the INTTBx interrupt after a one-shot pulse is output.
Symbols (c), (d) and (p) used in the text correspond to symbols c, d and p in "Figure 10-6 One-shot Pulse Out-
Count clock
(Internal clock)
Timer output TBxOUT pin
TBxIN pin input
(External trigger pulse)
Match with TBxRG0
Match with TBxRG1
c
(p)
c + d
c + d + p
Enable reverse
Enable reverse
Put the counter in a free-running state.
Taking data into capture register (TBxCP0)
INTCAPx0
generation
INTTBx1
generation
Disable reverse
when data is taken
into TBxCP0
Pulse width
(d)
Delay time
INTTBx0
generation
Figure 10-6 One-shot Pulse Output (With Delay)
TMPM3V6/M3V4
10. 16-bit Timer / Event Counters (TMRB)
10.7 Applications using the Capture Function
Page 180
2019-02-06
Содержание TMPM3V4
Страница 1: ...32 Bit RISC Microcontroller TX03 Series TMPM3V6 M3V4 ...
Страница 2: ... 2019 Toshiba Electronic Devices Storage Corporation ...
Страница 7: ...Revision History Date Revision Comment 2019 02 06 1 First Release ...
Страница 8: ......
Страница 22: ...xiv ...
Страница 52: ...TMPM3V6 M3V4 3 Processor Core 3 6 Exclusive access Page 30 2019 02 06 ...
Страница 148: ...TMPM3V6 M3V4 7 Exceptions 7 6 Exception Interrupt Related Registers Page 126 2019 02 06 ...
Страница 178: ...TMPM3V6 M3V4 9 Input Output port 9 2 Block Diagrams of Ports Page 156 2019 02 06 ...
Страница 206: ...TMPM3V6 M3V4 10 16 bit Timer Event Counters TMRB 10 7 Applications using the Capture Function Page 184 2019 02 06 ...
Страница 232: ...TMPM3V6 M3V4 11 Universal Asynchronous Receiver Transmitter Circuit UART 11 4 Operation Description Page 210 2019 02 06 ...
Страница 354: ...TMPM3V6 M3V4 14 Synchronous Serial Port SSP 14 6 Frame Format Page 332 2019 02 06 ...
Страница 419: ...TMPM3V6 M3V4 Page 397 2019 02 06 ...
Страница 420: ...TMPM3V6 M3V4 16 Analog Digital Converter ADC 16 6 Timing chart of AD conversion Page 398 2019 02 06 ...
Страница 462: ...TMPM3V6 M3V4 21 Watchdog Timer WDT 21 5 Control register Page 440 2019 02 06 ...
Страница 510: ...TMPM3V6 M3V4 22 Flash Memory Operation 22 4 Programming in the User Boot Mode Page 488 2019 02 06 ...
Страница 538: ...TMPM3V6 M3V4 25 Electrical Characteristics 25 7 Recommended Oscillation Circuit Page 516 2019 02 06 ...
Страница 541: ...26 3 TMPM3V4FWUG TMPM3V4FSUG Type LQFP64 P 1010 0 50E LPHQVLRQV TMPM3V6 M3V4 Page 519 2019 02 06 ...
Страница 544: ......