
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Preliminary User’s Manual U16228EJ1V0UD
177
Figure 6-32. Square-Wave Output Operation Timing
Count clock
TM0n count value
CR00n
INTTM00n
TO0n pin output
0000H 0001H 0002H
N – 1N
0000H 0001H 0002H
N – 1N
0000H
N
Remark
n = 0:
PD780131, 780132
n = 0, 1:
PD780133, 780134, 78F0134, 780136, 780138, 78F0138
6.4.6 One-shot pulse output operation
16-bit timer/event counter 0n can output a one-shot pulse in synchronization with a software trigger or an external
trigger (TI00n pin input).
(1) One-shot pulse output with software trigger
A one-shot pulse can be output from the TO0n pin by setting 16-bit timer mode control register 0n (TMC0n),
capture/compare control register 0n (CRC0n), and 16-bit timer output control register 0n (TOC0n) as shown in
Figure 6-33, and by setting bit 6 (OSPT0n) of the TOC0n register to 1 by software.
By setting the OSPT0n bit to 1, 16-bit timer/event counter 0n is cleared and started, and its output becomes
active at the count value (N) set in advance to 16-bit timer capture/compare register 01n (CR01n). After that, the
output becomes inactive at the count value (M) set in advance to 16-bit timer capture/compare register 00n
(CR00n)
Note.
Even after the one-shot pulse has been output, the TM0n register continues its operation. To stop the TM0n
register, the TMC0n3 and TMC0n2 bits of the TMC0n register must be set to 00.
Note The case where N < M is described here. When N > M, the output becomes active with the CR00n register
and inactive with the CR01n register.
Cautions 1. Do not set the OSPT0n 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. When using the one-shot pulse output of 16-bit timer/event counter 0n with a software
trigger, do not change the level of the TI00n pin or its alternate-function port pin.
Because the external trigger is valid even in this case, the timer is cleared and started even
at the level of the TI00n pin or its alternate-function port pin, resulting in the output of a
pulse at an undesired timing.
Remark
n = 0:
PD780131, 780132
n = 0, 1:
PD780133, 780134, 78F0134, 780136, 780138, 78F0138