Renesas R8C/Tiny Series Manuale Pagina 68

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 199
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 67
R8C/10 Group
Rev.1.20 Jan 27, 2006 page 58 of 180
REJ09B0019-0120
12.1.1 Timer Mode
In this mode, the timer counts an internally generated count source (See Table 12.2 Timer Mode
Specifications). Figure 12.4 shows the TXMR register in timer mode.
Item Specification
Count source f1, f2, f8, f32
Count operation Down-count
When the timer underflows, the contents in the reload register is reloaded and the count
is continued
Divide ratio 1/(n+1)(m+1) n: set value of PREX register, m: set value of TX register
Count start condition Write 1 (count start) to TXS bit in TXMR register
Count stop condition Write 0 (count stop) to TXS bit in TXMR register
Interrupt request generation timing
When Timer X underflows [Timer X interruption]
INT1/CNTR0 pin function Programmable I/O port, or INT1 interrupt input
CNTR0 pin function Programmable I/O port
Read from timer Count value can be read by reading TX register
Same applies to
PREX
register.
Write to timer
Value written to TX register is written to both reload register and counter.
Same applies to
PREX
register.
Table 12.2 Timer Mode Specifications
Figure 12.4 TXMR Register in Timer Mode
12.1 Timer (Timer X)
Timer X mode register
S
y
m
b
o
lA
d
d
r
e
s
sA
f
t
e
r
r
e
s
e
t
T
X
M
R0
0
8
B
1
6
0
0
1
6
B
i
t
n
a
m
e
FunctionB
i
t
s
y
m
b
o
l
R
W
b
7
b
6
b
5
b
4
b
3
b
2
b
1
b
0
0 0 : Timer mode or pulse period
measurement mode
b1 b0
T
X
M
O
D
2
T
X
S
TXMOD1
R0EDG
TXMOD0
T
X
O
C
N
T
O
p
e
r
a
t
i
o
n
m
o
d
e
s
e
l
e
c
t
b
i
t
0
,
1
T
i
m
e
r
X
c
o
u
n
t
s
t
a
r
t
f
l
a
g
0
:
S
t
o
p
s
c
o
u
n
t
i
n
g
1
:
S
t
a
r
t
s
c
o
u
n
t
i
n
g
O
p
e
r
a
t
i
o
n
m
o
d
e
s
e
l
e
c
t
b
i
t
2
00
0
S
e
t
t
o
"
0
"
i
n
t
i
m
e
r
m
o
d
e
0 : Rising edge
1 : Falling edge
0
TXEDG
T
X
U
N
D
R
W
RW
RW
RW
R
W
R
W
R
W
R
W
INT1/CNTR
0
polarity
switching bit
(1, 2)
S
e
t
t
o
"
0
"
i
n
t
i
m
e
r
m
o
d
e
Set to "0" in timer mode
0 : Other than pulse period measurement mode
N
O
T
E
S
:
1
.
T
h
e
I
R
b
i
t
i
n
t
h
e
I
N
T
1
I
C
r
e
g
i
s
t
e
r
m
a
y
b
e
s
e
t
t
o
1
(
i
n
t
e
r
r
u
p
t
r
e
q
u
e
s
t
e
d
)
w
h
e
n
t
h
e
R
0
E
D
G
b
i
t
i
s
r
e
w
r
i
t
t
e
n
.
R
e
f
e
r
t
o
t
h
e
p
a
r
a
g
r
a
p
h
1
9
.
2
.
5
C
h
a
n
g
i
n
g
I
n
t
e
r
r
u
p
t
F
a
c
t
o
r
i
n
t
h
e
U
s
a
g
e
N
o
t
e
s
R
e
f
e
r
e
n
c
e
B
o
o
k
.
2
.
T
h
i
s
b
i
t
i
s
u
s
e
d
t
o
s
e
l
e
c
t
t
h
e
p
o
l
a
r
i
t
y
o
f
I
N
T
1
i
n
t
e
r
r
u
p
t
i
n
t
i
m
e
r
m
o
d
e
.
00
Vedere la pagina 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 198 199

Commenti su questo manuale

Nessun commento