Datasheet

Section 15 Timer RC
REJ09B0465-0300 Rev. 3.00 Page 465 of 982
Sep 17, 2010
H8S/20103, H8S/20203, H8S/20223, H8S/20115, H8S/20215, H8S/20235 Group
Table 15.6 FTIOD Pin Functions
Register
Name TRCOER TRCMR TRCIOR1
Bit Name ED PWM2 PWMD
IOD2 to
IOD0 Function
0 1 1 XXX PWM mode waveform output
0 1 0 001, 01X Timer mode waveform output (output
compare function)
X 1 0 1XX Timer mode (input capture function)
X 1 0 000 General input port (when PCR = 0 on
the corresponding pin)
Setting
values
Other than above Setting prohibited
[Legend]
X: Don't care.
15.3.1 Timer Mode Operation
TRCCNT performs free-running or periodic counting operations. After a reset, TRCCNT is set as
a free-running counter. When the CTS bit in TRCMR is set to 1, TRCCNT starts counting. When
the TRCCNT value overflows from H'FFFF to H'0000, the OVF flag in TRCSR is set to 1. If the
OVIE in TRCIER is set to 1, an interrupt request is generated. Figure 15.2 shows an example of
free-running counting.
TRCCNT
H'FFFF
H'0000
CTS bit
OVF
Time
Flag cleared
by software
Figure 15.2 Free-Running Counter Operation