EasyManuals Logo
Home>Renesas>Microcontrollers>RL78/G1H

Renesas RL78/G1H User Manual

Renesas RL78/G1H
941 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #217 background imageLoading...
Page #217 background image
RL78/G1H CHAPTER 7 TIMER ARRAY UNIT
R01UH0575EJ0120 Rev. 1.20 Page 199 of 920
Dec 22, 2016
7.8.2 Operation as external event counter
The timer array unit can be used as an external event counter that counts the number of times the valid input
edge (external event) is detected in the TImn pin. When a specified count value is reached, the event counter
generates an interrupt. The specified number of counts can be calculated by the following expression.
Timer count register mn (TCRmn) operates as a down counter in the event counter mode.
The TCRmn register loads the value of timer data register mn (TDRmn) by setting any channel start trigger bit
(TSmn, TSHm1, TSHm3) of timer channel start register m (TSm) to 1.
The TCRmn register counts down each time the valid input edge of the TImn pin has been detected. When
TCRmn = 0000H, the TCRmn register loads the value of the TDRmn register again, and outputs INTTMmn.
After that, the above operation is repeated.
An irregular waveform that depends on external events is output from the TOmn pin. Stop the output by setting
the TOEmn bit of timer output enable register m (TOEm) to 0.
The TDRmn register can be rewritten at any time. The new value of the TDRmn register becomes valid during
the next count period.
Figure 7 - 47 Block Diagram of Operation as External Event Counter
Remark m: Unit number (m = 0), n: Channel number (n = 3)
Specified number of counts = Set value of TDRmn + 1
Timer counter
register mn (TCRmn)
Interrupt
controller
Edge
detection
Interrupt signal
(INTTMmn)
Timer data
register mn (TDRmn)
TSmn
Clock selectionTrigger selection
TImn pin
Noise
filter
TNFENxx

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RL78/G1H and is the answer not in the manual?

Renesas RL78/G1H Specifications

General IconGeneral
BrandRenesas
ModelRL78/G1H
CategoryMicrocontrollers
LanguageEnglish

Related product manuals