![](http://datasheet.mmic.net.cn/370000/UPD70F3214HGC-8EU_datasheet_16743828/UPD70F3214HGC-8EU_332.png)
CHAPTER 8 16-BIT TIMER/EVENT COUNTER 0
User’s Manual U16890EJ1V0UD
332
8.4.6 One-shot pulse output operation
The one-shot pulse output is valid only for 16-bit timer/event counters 00 and 01.
16-bit timer/event counter 0n can output a one-shot pulse in synchronization with a software trigger. In the
V850ES/KG1, the one-shot pulse cannot be output by inputting an external trigger.
Setting procedure
The basic operation setting procedure is as follows.
<1> Set the count clock using the PRM0m register.
<2> Set the CRC0m register (refer to
Figure 8-23
for the setting value).
<3> Set the TOC0m register (refer to
Figure 8-23
for the setting value).
<4> Set any value to the CR0m0 and CR0m1 registers.
<5> Set the TMC0m register: Start operation (refer to
Figure 8-23
for the setting value).
Remarks 1.
For the alternate-function pin (TO0m) settings, refer to
Table 4-16 Settings When Port Pins Are
Used for Alternate Functions
.
2.
For INTTM0m0 interrupt enable, refer to
CHAPTER 20 INTERRUPT/EXCEPTION PROCESSING
FUNCTION
.
A one-shot pulse can be output from the TO0m pin by setting the TMC0m, CRC0m, and TOC0m registers as
shown in Figure 8-23, and by setting the TOC0m.OSPT0m bit to 1 by software.
By setting the OSPT0m bit to 1, 16-bit timer/event counter 0m is cleared and started, and its output becomes active
at the count value (N) set in advance to the CR0m1 register. After that, the output becomes inactive at the count
value (M) set in advance to the CR0m0 register
Even after the one-shot pulse has been output, 16-bit timer/event counter 0m continues its operation. To stop 16-
bit timer/event counter 0m, the TMC0m.TMC0m3 and TMC0m.TMC0m2 bits must be cleared to 00.
Note
The case where N < M is described here. When N > M, the output becomes active with the CR0m0 register
and inactive with the CR0m1 register.
Cautions 1. Do not set the OSPT0m bit while the one-shot pulse is being output. To output the one-shot
pulse again, wait until the current one-shot pulse output is completed.
2. The value of the CR0m0 and CR0m1 registers cannot be changed during timer count
operation.
Remark
m = 0, 1
Note
.