Renesas M16C Series User Manual page 89

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group
Table 1.20:
Timer specification in event counter mode (when processing two-phase pulse signal with
Timers A2, A3, A4.)
Item
Count Source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request
generation timing
TAi
pin function
IN
TAi
pin function
OUT
Read from timer
Writer to timer
Select function
Figure 1.65 shows Timer Ai mode register in event counter mode when processing two-phase signal.
Rev.1.00 Sep 24, 2003 Page 71 of 360
•Two-phase pulse signals input to TAi
•Up count or down count can be selected by two-phase pulse signal
•When the timer overflows or underflows, the reload register content is loaded and the timer starts over
again (Note 1)
1/ (FFFF
- n + 1) for up count
16
1/ (n+1) for down count
Count start flag is set (=1)
Count start flag is reset (=0)
Timer overflow or underflows
Two-phase pulse input
Two-phase pulse input
Count value can be read out by reading timer A2, A3, or A4 register
•When counting is stopped and a value is written to timer A2, A3, or A4 register, it is written to both the
reload register and counter
•When counting is in progress and a value is written to timer A2, A3, or A4 register, it is written to only
reload register to be transferred to counter at the next reload time.
•Normal processing operation
The timer counts up rising edges or counts down falling edges on the TAi
the TAi
pin is "H"
OUT
TAi
OUT
TAi
IN
(i=2,3)
Up
Up
count
count
•Multiply-by-4 processing operation
If the phase relationship is such that the
is "H", the timer counts up rising and falling edges on the
Ai
relationship is such that the T
counts down rising and falling edges on the
TAi
OUT
Count up all edges
Ai
T
IN
(i=3,4)
Count up all edges
Specification
or TAi
pin
IN
OUT
n: Set value
Up
Down
count
count
TAi
pin goes "H" when the input signal on the
IN
TAi
pin goes "L" when the input signal on the
IN
TAi
Ai
and T
OUT
Count down all edges
Count down all edges
pin when input signal on
IN
Down
Down
count
count
TAi
Ai
nd T
pins. If the phase
OUT a
IN
TAi
pin is "H", the timer
OUT
pins.
IN
Timer A
pin
OUT

Advertisement

Table of Contents
loading

Table of Contents