
R8C/10 Group
Rev.1.20 Jan 27, 2006 page 65 of 180
REJ09B0019-0120
12.2 Timer Y
Timer Y is an 8-bit timer with an 8-bit prescaler and has two reload registers-Timer Y Primary and Timer
Y Secondary. Figure 12.11 shows a block diagram of Timer Y. Figures 12.12 to 12.14 show the TYZMR,
PREY, TYSC, TYPR, TYZOC, PUM, and YCSS registers.
The Timer Y has two operation modes as follows:
• Timer mode: The timer counts an internal count source.
• Programmable waveform generation mode: The timer outputs pulses of a given width successively.
Figure 12.11 Timer Y Block Diagram
Figure 12.12 TYZMR Register
Toggle
flip-flop
Timer Y interrupt
INT2 interrupt
TYPR register
f
1
f
8
Q
CK
f
RING
TYSC register
TYOCNT=1
TYOPL=1
Q
TYOPL=0
P3_2 bit in P3 register
TYOCNT=0TYMOD0=1
TYS=1
PREY register
INT
2
/CNTR
1
TYCK1 to TYCK0
=00
2
=01
2
=10
2
=11
2
Counter
Reload register
Counter
Reload register
Peripheral data bus
Reload register
Polarity
switching
CLR
Write to TYZMR register
TYMOD0 bit=1
T
i
m
e
r
Y
,
Z
m
o
d
e
r
e
g
i
s
t
e
r
Symbol Address After reset
TYZMR 0080
16
00
16
B
i
t
n
a
m
e
F
u
n
c
t
i
o
nB
i
t
s
y
m
b
o
l
7
6
5
4
3
2
1
0
0
0
:
T
i
m
e
r
m
o
d
e
0
1
:
P
r
o
g
r
a
m
m
a
b
l
e
w
a
v
e
f
o
r
m
g
e
n
e
r
a
t
i
o
n
m
o
d
e
1
0
:
P
r
o
g
r
a
m
m
a
b
l
e
o
n
e
-
s
h
o
t
g
e
n
e
r
a
t
i
o
n
m
o
d
e
1
1
:
P
r
o
g
r
a
m
m
a
b
l
e
w
a
i
t
o
n
e
-
s
h
o
t
g
e
n
e
r
a
t
i
o
n
m
o
d
e
T
Z
M
O
D
1
T
Y
S
T
Y
W
C
TYMOD0
T
Z
M
O
D
0
T
i
m
e
r
Y
o
p
e
r
a
t
i
o
n
m
o
d
e
b
i
t
T
i
m
e
r
Y
w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