Renesas R8C/Tiny Series Manuel Page 71

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 199
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 70
R8C/10 Group
Rev.1.20 Jan 27, 2006 page 61 of 180
REJ09B0019-0120
12.1.4 Pulse Width Measurement Mode
_____
In this mode, the timer measures the pulse width of an external signal fed to INT1/CNTR0 pin (See
Table 12.5 Pulse Width Measurement Mode Specifications). Figure 12.7 shows the TXMR register
in pulse width measurement mode. Figure 12.8 shows an operation example in pulse width measure-
ment mode.
Item Specification
Count source f1, f2, f8, f32
Count operation Down-count
Continuously counts the selected signal only when the measurement pulse is "H" level,
or conversely only "L" level.
When the timer underflows, the contents in the reload register is reloaded and the count
is continued
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 When Timer X underflows [Timer X interruption]
generation timing Rising or falling of CNTR0 input (end of measurement period) [INT1 interrupt]
INT1/CNTR0 pin function Measurement pulse 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.
Select function INT1/CNTR
0 polarity switching function
H or L level duration can be selected with R0EDG bit as the input pulse measurement
Table 12.5 Pulse Width Measurement Mode Specifications
Figure 12.7 TXMR Register in Pulse Width Measurement Mode
12.1 Timer (Timer X)
T
i
m
e
r
X
m
o
d
e
r
e
g
i
s
t
e
r
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
01
6
B
i
t
n
a
m
e
F
u
n
c
t
i
o
nB
i
t
s
y
m
b
o
l
RW
b
7
b
6
b
5
b
4
b
3
b
2
b
1
b
0
b1 b0
T
X
M
O
D
1
T
X
M
O
D
0
O
p
e
r
a
t
i
o
n
m
o
d
e
s
e
l
e
c
t
b
i
t
0
,
1
0
1
0
R
W
R
W
00 1
1
1
:
P
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
R
0
E
D
G
R
W
INT1/CNTR
0 polarity
switching bit
(1)
T
X
M
O
D
2
T
X
S
T
X
O
C
N
T
T
i
m
e
r
X
c
o
u
n
t
s
t
a
r
t
f
l
a
g
0 : Stops counting
1 : Starts counting
Set to "0" in pulse width measurement mode
T
X
E
D
G
T
X
U
N
D
R
W
R
W
R
W
R
W
R
W
N
O
T
E
S
:
1
.
I
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
.
S
e
t
t
o
"
0
"
i
n
p
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
S
e
t
t
o
"
0
"
i
n
p
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
S
e
t
t
o
"
0
"
i
n
p
u
l
s
e
w
i
d
t
h
m
e
a
s
u
r
e
m
e
n
t
m
o
d
e
[CNTR0]
0 : Measures H level width
1 : Measures L level width
[INT1]
0 : Rising edge
1 : Falling edge
Vue de la page 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 198 199

Commentaires sur ces manuels

Pas de commentaire