Datasheet

Section 13 Timer RC
Rev. 1.50 Sep. 18, 2007 Page 238 of 584
REJ09B0240-0150
FTIOD pin
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)
0
1
1 0 1XX Timer mode (input capture function)
Setting
values
Other than above General I/O port
[Legend]
X: Don't care.
13.4.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 13.2 shows an example of
free-running counting.
TRCCNT
H'FFFF
H'0000
CTS bit
OVF
Time
Flag cleared
by software
Figure 13.2 Free-Running Counter Operation