English
Language : 

UPD78F1502AGK-GAK-AX Datasheet, PDF (322/1031 Pages) Renesas Technology Corp – 16-Bit Single-Chip Microcontrollers
78K0R/Lx3
CHAPTER 6 TIMER ARRAY UNIT
6.7.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 TIpq 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.
Specified number of counts = Set value of TDRpq + 1
TCRpq operates as a down counter in the event counter mode.
When the channel start trigger bit (TSpq) is set to 1, TCRpq loads the value of TDRpq.
TCRpq counts down each time the valid input edge of the TIpq pin has been detected. When TCRpq = 0000H, TCRpq
loads the value of TDRpq again, and outputs INTTMpq.
After that, the above operation is repeated.
TOpq must not be used because its waveform depends on the external event and irregular.
TDRpq can be rewritten at any time. The new value of TDRpq becomes valid during the next count period.
Figure 6-41. Block Diagram of Operation as External Event Counter
TIpq pin
Edge
detection
Timer counter
(TCRpq)
TSpq
Data register
(TDRpq)
Interrupt
controller
Interrupt signal
(INTTMpq)
Remark pq: Unit number + Channel number (only for channels provided with timer I/O pins)
78K0R/LF3: pq = 00 to 04, 07
78K0R/LG3: pq = 00 to 07
78K0R/LH3: pq = 00 to 07, 10 to 13
R01UH0004EJ0501 Rev.5.01
306
Jun 20, 2011