Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  6   TIMER  ARRAY  UNIT 
R01UH0305EJ0200  Rev.2.00 
 
 
221  
Jul 04, 2013 
6.4.2  Basic rules of 8-bit timer operation function (channels 1 and 3 only) 
The 8-bit timer operation function makes it possible to use a 16-bit timer channel in a configuration consisting of two 8-
bit timer channels. 
This function can only be used for channels 1 and 3, and there are several rules for using it. 
The basic rules for this function are as follows: 
 
(1)  The 8-bit timer operation function applies only to channels 1 and 3. 
(2)  When using 8-bit timers, set the SPLIT bit of timer mode register mn (TMRmn) to 1. 
(3)  The higher 8 bits can be operated as the interval timer function. 
(4)  At the start of operation, the higher 8 bits output INTTMm1H/INTTMm3H (an interrupt) (which is the same 
operation performed when MDmn0 is set to 1). 
(5)  The operation clock of the higher 8 bits is selected according to the CKSmn1 and CKSmn0 bits of the lower-bit 
TMRmn register. 
(6)  For the higher 8 bits, the TSHm1/TSHm3 bit is manipulated to start channel operation and the TTHm1/TTHm3 bit 
is manipulated to stop channel operation.  The channel status can be checked using the TEHm1/TEHm3 bit. 
(7)  The lower 8 bits operate according to the TMRmn register settings.  The following three functions support 
operation of the lower 8 bits: 
• Interval timer function 
• External event counter function 
• Delay count function 
 
(8)  For the lower 8 bits, the TSm1/TSm3 bit is manipulated to start channel operation and the TTm1/TTm3 bit is 
manipulated to stop channel operation.  The channel status can be checked using the TEm1/TEm3 bit. 
(9)  During 16-bit operation, manipulating the TSHm1, TSHm3, TTHm1, and TTHm3 bits is invalid.  The TSm1, TSm3, 
TTm1, and TTm3 bits are manipulated to operate channels 1 and 3.  The TEHm3 and TEHm1 bits are not changed. 
(10) For the 8-bit timer function, the simultaneous operation functions (one-shot pulse, PWM, and multiple PWM) 
cannot be used. 
 
Remark  m: Unit number (m = 0), n: Channel number (n = 1, 3)