
7542 Group
Rev.3.02 Oct 31, 2006 Page 34 of 134
REJ03B0006-0302
Fig. 31 Block diagram of timer A and timer B
Timer A (low-order) latch (8)
Timer A (low-order) (8)
Timer A (high-order) latch (8)
Timer A (high-order) (8)
Data bus
Timer A interrupt
request
Compare
Capture
Timer B (low-order) latch (8)
Timer B (low-order) (8)
Timer B (high-order) latch (8)
Timer B (high-order) (8)
Data bus
Timer B interrupt
request
Compare
Capture
1/2
1/16
1/32
1/64
1/128
1/256
Timer A count
stop bit
Timer A
count source
selection bits
On-chip
oscillator
Timer A write
control bit
Timer B write
control bit
1/2
1/16
1/32
1/64
1/128
1/256
Timer B count
stop bit
Timer B count source
selection bits
Frequency
divider
On-chip
oscillator
X
IN
“00”
“01”
“11”
Clock division
ratio selection
bits
“10”
Frequency
divider
CPU mode register
Fig. 29 Structure of timer A, B mode register
Fig. 30 Timer count source set register
T
i
m
e
r
A
,
B
m
o
d
e
r
e
g
i
s
t
e
r
(
T
A
B
M
:
a
d
d
r
e
s
s
0
0
1
D
1
6
,
i
n
i
t
i
a
l
v
a
l
u
e
:
0
0
1
6
)
b
7
b
0
T
i
m
e
r
A
w
r
i
t
e
c
o
n
t
r
o
l
b
i
t
0
:
W
r
i
t
e
t
o
l
a
t
c
h
a
n
d
t
i
m
e
r
s
i
m
u
l
t
a
n
e
o
u
s
l
y
1
:
W
r
i
t
e
t
o
o
n
l
y
l
a
t
c
h
T
i
m
e
r
A
c
o
u
n
t
s
t
o
p
b
i
t
0
:
C
o
u
n
t
s
t
a
r
t
1
:
C
o
u
n
t
s
t
o
p
T
i
m
e
r
B
w
r
i
t
e
c
o
n
t
r
o
l
b
i
t
0
:
W
r
i
t
e
t
o
l
a
t
c
h
a
n
d
t
i
m
e
r
s
i
m
u
l
t
a
n
e
o
u
s
l
y
1
:
W
r
i
t
e
t
o
o
n
l
y
l
a
t
c
h
T
i
m
e
r
B
c
o
u
n
t
s
t
o
p
b
i
t
0
:
C
o
u
n
t
s
t
a
r
t
1
:
C
o
u
n
t
s
t
o
p
N
o
t
u
s
e
d
(
r
e
t
u
r
n
“
0
”
w
h
e
n
r
e
a
d
)
C
o
m
p
a
r
e
0
,
1
m
o
d
u
l
a
t
i
o
n
m
o
d
e
b
i
t
0
:
D
i
s
a
b
l
e
d
1
:
E
n
a
b
l
e
d
C
o
m
p
a
r
e
2
,
3
m
o
d
u
l
a
t
i
o
n
m
o
d
e
b
i
t
0
:
D
i
s
a
b
l
e
d
1
:
E
n
a
b
l
e
d
b7 b0
Timer X count source selection bits
b1 b0
0 0 : f(X
IN
)/16
0 1 : f(X
IN
)/2
1 0 : f(X
IN
) (Note 1)
1 1 : Not available
Notes 1: f(X
IN
) can be used as timer X count source when using
a ceramic resonator or on-chip oscillator.
Do not use it at RC oscillation.
2: On-chip oscillator can be used when the on-chip oscillator
is enabled by bit 3 of CPUM.
Timer count source set register
(TCSS : address 002A
16
, initial value: 00
16
)
Timer B count source selection bits
b7 b6 b5
0 0 0 : f(X
IN
)/16
0 0 1 : f(X
IN
)/2
0 1 0 : f(X
IN
)/32
0 1 1 : f(X
IN
)/64
1 0 0 : f(X
IN
)/128
1 0 1 : f(X
IN
)/256
1 1 0 : Timer A underflow
1 1 1 : Not available
Timer A count source selection bits
b4 b3 b2
0 0 0 : f(X
IN
)/16
0 0 1 : f(X
IN
)/2
0 1 0 : f(X
IN
)/32
0 1 1 : f(X
IN
)/64
1 0 0 : f(X
IN
)/128
1 0 1 : f(X
IN
)/256
1 1 0 : On-chip oscillator output (Note 2)
1 1 1 : Not available