Datasheet
Section 18 Timer RG
REJ09B0465-0300 Rev. 3.00 Page 645 of 982
Sep 17, 2010
H8S/20103, H8S/20203, H8S/20223, H8S/20115, H8S/20215, H8S/20235 Group
Select waveform output mode
Output selection
Set output timing
Start counting
<Waveform output>
[1]
[2]
[3]
[4]
[5]
[1] Select 0 output, 1 output, or toggle output for
compare match output by means of TRGIOR.
[2] Set the timing for compare match generation in
GRA/GRB.
[3] Write the same value output initially from the
compare match output pin (TGIOA or TGIOB) to
the PDR bit of the corresponding pin specified
by the PMC.
[4] When the PMR bit of the corresponding pin
specified by the PMC is set to 1, the port
functions as the compare match output pin.
[5] Set the STR bit in TRGMDR to 1 to start the
TRGCNT count operation.
Set PDR
Set PMR to 1
Figure 18.2 Example of Setting Procedure for Waveform Output by Compare Match
Table 18.3 Initial Output Values until the First Compare Match Occurs
Pin
0 is Output by Compare
Match
1 is Output by Compare
Match
Output is Toggled by
Compare Match
TGIOA 1 0 0*
TGIOB 1 0 0*
Note: * When the initial toggled output immediately after release from the reset state is
selected. In case where switching was from another output, the output value is that
which preceded the switch.