Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  6   TIMER  ARRAY  UNIT 
R01UH0305EJ0200  Rev.2.00 
 
 
279  
Jul 04, 2013 
Figure 6-72.  Example of Set Contents of Registers When PWM Function (Master Channel) Is Used 
 
(a)  Timer mode register mn (TMRmn)  
 
15 
14 
13 
12 
11 
10
9 8 7 6 5 4 3 2 1 0   
TMRmn 
CKSmn1
 
1/0 
CKSmn0
 
 
CCSmn
 
MAS 
TERmn
 
1
Note
 
STSmn2
STSmn1
STSmn0
CISmn1
CISmn0
 
 
MDmn3
 
MDmn2
 
MDmn1
 
MDmn0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Operation mode of channel n 
000B: Interval timer 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Setting of operation when counting is started
1:  Generates INTTMmn when counting is 
started. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Selection of TImn pin input edge 
00B: Sets 00B because these are not used. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Start trigger selection 
000B: Selects only software start. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Setting of the MASTERmn bit (channels 2, 4, 6) 
1: Master channel. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Count clock selection 
0: Selects operation clock (f
MCK
). 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Operation clock (f
MCK
) selection 
00B: Selects CKm0 as operation clock of channel n. 
10B: Selects CKm1 as operation clock of channel n. 
 
(b)  Timer output register m (TOm) 
 
Bit n 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
TOm 
TOmn 
0
 
 
0: Outputs 0 from TOmn.
 
 
(c)  Timer output enable register m (TOEm) 
 
Bit n 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
TOEm 
TOEmn
 
 
0: Stops the TOmn output operation by counting operation. 
 
(d)  Timer output level register m (TOLm) 
 
Bit n 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
TOLm 
TOLmn 
0
 
 
0: Cleared to 0 when TOMmn = 0 (master channel output mode).
 
 
(e)  Timer output mode register m (TOMm) 
 
Bit n 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
TOMm 
TOMmn 
0
 
 
0: Sets master channel output mode.
 
 
Note  TMRm2, TMRm4, TMRm6: MASTERmn = 1 
 
TMRm0 :Fixed to 0 
 
Remark  m: Unit number (m = 0), n: Channel number (n = 0, 2, 4, 6) 
 
<R> 
<R>