R01UH0823EJ0100 Rev.1.00 Page 521 of 1823
Jul 31, 2019
RX23W Group 23. Multi-Function Timer Pulse Unit 2 (MTU2a)
(2) Waveform Output by Compare Match
The MTU can output low or high or toggle output from the corresponding output pin using compare match.
(a) Example of Procedure for Setting Waveform Output by Compare Match
Figure 23.7 shows an example of the procedure for setting waveform output by compare match.
Figure 23.7 Example of Procedure for Setting Waveform Output by Compare Match
[1] Select the initial output value (low or high) and the
compare match output value (low, high, or toggle
output) by setting the TIOR register.
The set initial output value is output to the MTIOC pin
until the first compare match occurs.
[2] Set the timing for compare match generation in the
TGR register.
[3] Set the TSTR.CSTn bit to 1 to start the count
operation.
Waveform output
Select waveform output
mode
Output selection
Set output timing
Start count operation
[1]
[2]
[3]