RL78/G1P
CHAPTER 6 TIMER ARRAY UNIT
R01UH0895EJ0100 Rev.1.00
128
Nov 29, 2019
6.1 Functions of Timer Array Unit
Timer array unit has the following functions.
6.1.1 Independent channel operation function
By operating a channel independently, it can be used for the following purposes without being affected by the operation
mode of other channels.
(1) Interval
timer
Each timer of a unit can be used as a reference timer that generates an interrupt (INTTMmn) at fixed intervals.
Interrupt signal
(INTTMmn)
Operation clock
Compare operation
Channel n
(2) Square wave output
A toggle operation is performed each time INTTMmn interrupt is generated and a square wave with a duty factor of
50% is output from a timer output pin (TOmn).
Timer output
(TOmn)
Operation clock
Compare operation
Channel n
(3) External event counter
Each timer of a unit can be used as an event counter that generates an interrupt when the number of the valid
edges of a signal input to the timer input pin (TImn) has reached a specific value.
Interrupt signal
(INTTMmn)
Edge detection
Timer input
(TImn)
Compare operation
Channel n
(4) Input pulse interval measurement
Counting is started by the valid edge of a pulse signal input to a timer input pin (TImn). The count value of the
timer is captured at the valid edge of the next pulse. In this way, the interval of the input pulse can be measured.
Edge detection
Timer input
(TImn)
Capture
xxH
00H
Start
Channel n
Capture operation
(5) Measurement of high-/low-level width of input signal
Counting is started by a single edge of the signal input to the timer input pin (TImn), and the count value is
captured at the other edge. In this way, the high-level or low-level width of the input signal can be measured.
Edge detection
Timer input
(TImn)
Capture
xxH
00H
Start
Channel n
Capture operation