Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  6   TIMER  ARRAY  UNIT 
R01UH0305EJ0200  Rev.2.00 
 
 
218  
Jul 04, 2013 
6.3.15  Registers controlling port functions of pins to be used for timer I/O 
Using port pins for the timer array unit functions requires setting of the registers that control the port functions 
multiplexed on the target pins (port mode register (PMxx), port register (Pxx), and port mode control register (PMCxx)). For 
details, see 4.3.1  Port mode registers (PMxx)4.3.2 Port registers (Pxx), and 4.3.6  Port mode control registers 
(PMCxx)
The port mode register (PMxx), port register (Pxx), and port mode control register (PMCxx) to be set depend on the 
product. For details, see 4.5.3  Register setting examples for used port and alternate functions
 
When using the ports (such as P31/TI03/TO03) to be shared with the timer output pin for timer output, set the port 
mode control register (PMCxx) bit, port mode register (PMxx) bit and port register (Pxx) bit corresponding to each port to 0. 
 
Example: When using P31/TI03/TO03 for timer output 
Set the PMC31 bit of port mode control register 3 to 0. 
Set the PM31 bit of port mode register 3 to 0. 
Set the P31 bit of port register 3 to 0. 
 
When using the ports (such as P31/TI03/TO03) to be shared with the timer input pin for timer input, set the port mode 
register (PMxx) bit corresponding to each port to 1.  And set the port mode control register (PMCxx) bit corresponding to 
each port to 0.  At this time, the port register (Pxx) bit may be 0 or 1. 
 
Example: When using P31/TI03/TO03 for timer input 
Set the PMC31 bit of port mode control register 3 to 0. 
Set the PM31 bit of port mode register 3 to 1. 
Set the P31 bit of port register 3 to 0 or 1. 
 
<R>