English
Language : 

7702 Datasheet, PDF (115/522 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER
TIMER A
5.4 Event counter mode
(2) Two-phase pulse signal processing function (Timers A2 to A4)
For timers A2 to A4, the two-phase pulse signal processing function is selected by setting the two-
phase pulse signal processing select bits (bits 5 to 7 at address 4416) to “1.” (Refer to Figure 5.4.5.)
Figure 5.4.6 shows the timer A2, A3, and A4 mode registers when the two-phase pulse signal
processing function is selected.
With timers selecting the two-phase pulse signal processing function, the timer counts two kinds of
pulses of which phases differ by 90 degrees. There are two types of the two-phase pulse signal
processing: normal processing and quadruple processing. In timers A2 and A3, normal processing
is performed; in timer A4, quadruple processing is performed.
For some bits of the port P5 and P6 direction registers correspond to pins used for two-phase pulse
input, set these bits for the input mode.
b7 b6 b5 b4 b3 b2 b1 b0
!!0 1 0 0 0 1
Timer A2 mode register (Address 5816)
Timer A3 mode register (Address 5916)
Timer A4 mode register (Address 5A16)
! : It may be either “0” or “1.”
Fig. 5.4.6 Timer A2, A3, and A4 mode registers when two-phase pulse signal processing function is
selected
qNormal processing
The timer up-counts the rising edges to the TAkIN pin when the phase has the relationship that the
TAkIN pin’s input signal level goes from “L” to “H” while the TAkOUT (k = 2 and 3) pin’s input signal
is “H” level.
The timer down-counts the falling edges to the TAkIN pin when the phase has the relationship that
the TAkIN pin’s input signal level goes from “H” to “L” while the TAkOUT pin’s input signal is “H” level.
(Refer to Figure 5.4.7.)
“H”
TAkOUT
“L”
“H”
TAkIN
(k=2, 3) “L”
UUpp-
count
+1
Fig. 5.4.7 Normal processing
Up-
count
+1
Up-
count
Down-
count
+1
–1
Down-
count
–1
Down-
count
–1
7702/7703 Group User’s Manual
5–27