
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 0 AND 1
User’s Manual U15905EJ2V1UD
233
(3) One-shot pulse output
By setting the TMCn0 and TMCn1 registers as shown in Figure 7-13, the 16-bit timer/event counter can output
a one-shot pulse from the TOn pin by using the valid edge of the TCLRn pin as an external trigger.
The valid edge of the TCLRn pin is selected according to the CESn0 and CESn1 bits of the SESn register. The
rising edge, falling edge, or both rising and falling edges can be selected as the valid edge of both pins.
The TMn register is cleared and started by setting a valid edge to the TCLRn pin. TOn output becomes active
at the count value set in advance to the CCn0 register. After that, the TOn output becomes inactive at the
count value set in advance to CCn1 register. The active level of the TOn output can be set by the ALVn bit of
the TMCn1 register. When the setting value of the CCn0 register and the setting value of the CCn1 register
are the same, the TOn output remains inactive and does not change.
The active level of the TOn output can be set by the ALVn bit of the TMCn1 register.
Remark
n = 0, 1
Figure 7-13. Contents of Register Settings
When 16-Bit Timer/Event Counter Is Used for One-Shot Pulse Output
Supply input clocks to internal units
Enable count operation
1
0/1
0
1
OSTn ENTOn ALVn
ETIn CCLRn ECLRn CMSn1 CMSn0
0/1
0
1
OVFn
TMCn0
TMCn1
CSn2 CSn1 CSn0
TMCEn TMCAEn
Use CCn0 register as compare register
Use CCn1 register as compare register
Disable clearing of TMn reigster due to
match with CCn0 register
Enable external pulse output (TOn)
Enable clearing of TMn register by TCLRn
input
Timer holds 0000H and stops counting after
TMn register overflows
Remarks 1. 0/1: Set to 0 or 1 as necessary
2. n = 0, 1