RL78/G10 CHAPTER 6 TIMER ARRAY UNIT
R01UH0384EJ0311 Rev. 3.11 135
Dec 22, 2016
6.3.14 Registers controlling port functions of pins to be used for timer I/O
Using the timer array unit functions requires setting of the registers that control the port functions multiplexed on the
target channels (port mode register (PMxx), port register (Pxx), and port mode control register (PMCxx)). For details, see
4.3.1 Port mode registers 0, 4 (PM0, PM4), 4.3.2 Port registers 0, 4, 12, 13 (P0, P4, P12, P13), and 4.3.5 Port mode
control register 0 (PMC0).
For the setting examples when the port is used as timer I/O, see 4.5.3 Example of register settings for port and
alternate functions used.
When using the ports that share the pin with the timer output (such as P04/ANI3/TI01/TO01/KR5) for timer output, set
the bit in the port mode register (PMxx), the port register (Pxx), and the port mode control register (PMCxx) corresponding
to each port to 0.
Example: When using P04/ANI3/TI01/TO01/KR5 for timer output
Set the PMC04 bit of port mode control register 0 to 0.
Set the PM4 bit of port mode register 0 to 0.
Set the P04 bit of port register 0 to 0.
When using the ports (such as P04/ANI3/TI01/TO01/KR5) to be shared with the timer output pin for timer input, set the
bit in the port mode register (PMxx) corresponding to each port to 1. Also set the bit in the port mode control register
(PMCxx) corresponding to each port to 0. At this time, the bit in the port register (Pxx) may be 0 or 1.
Example: When using P04/ANI3/TI01/TO01/KR5 for timer input
Clear the PMC04 bit of port mode control register 0 to 0.
Set the PM04 bit of port mode register 0 to 1.