R5F21133DFP RENESAS [Renesas Technology Corp], R5F21133DFP Datasheet - Page 89

no-image

R5F21133DFP

Manufacturer Part Number
R5F21133DFP
Description
16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY/R8C/Tiny SERIES
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
R5F21133DFP#U0
Manufacturer:
Renesas Electronics America
Quantity:
10 000
R8C/13 Group
Rev.1.20
REJ09B0111-0120
Table 12.6 Pulse Period Measurement Mode Specifications
Figure 12.9 TXMR Register in Pulse Period Measurement Mode
NOTES:
Count source
Count operation
Count start condition
Count stop condition
Interrupt request
generation timing
INT1/CNTR
CNTR
Read from timer
Write to timer
Select function
1. The period of input pulse must be longer than twice the period of prescaler X. Longer pulse for H width and L width than
12.1.5 Pulse Period Measurement Mode
the prescaler X period must be input. If shorter pulse than the period is input to the CNTR0 pin, the input may be disabled.
In this mode, the timer measures the pulse period of an external signal fed to INT1/CNTR0 pin (See
“Table 12.6 Pulse Period Measurement Mode Specifications”). Figure 12.9 shows the TXMR register
in pulse period measurement mode. Figure 12.10 shows an operation example in pulse period mea-
surement mode.
Jan 27, 2006
0
T i m e r X m o d e r e g i s t e r
b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0
pin function
N O T E S :
2 . T h i s b i t i s s e t t o
Item
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 .
0
1
pin function
0
page 78 of 205
0 0
“ 0 ”
b y w r i t i n g
Contents in the read-out buffer can be read by reading TX register. The value retained in
f
• Down-count
• After an active edge of measurement pulse is input, contents in the read-out buffer is
Write “1” (count start) to TXS bit in TXMR register
Write “0” (count stop) to TXS bit in TXMR register
• When Timer X underflows or reloads [Timer X interrupt]
• Rising or falling of CNTR0 input (end of measurement period) [INT1 interrupt]
Measurement pulse input
Programmable I/O port
the read-out buffer is released by reading TX register.
Value written to TX register is written to both reload register and counter.
Same applies to PREX register.
• INT1/CNTR0 polarity switching function
1
B i t s y m b o l
T X M O D 0
T X M O D 1
R 0 E D G
T X S
T X O C N T
T X M O D 2
T X E D G
T X U N D
retained in the first underflow of prescaler X. Then the timer X reloads contents in the
reload register in the second underflow of prescaler X and continues counting.
Measurement period of input pulse can be selected with R0EDG bit.
, f
_____
2
S y m b o l
T X M R
, f
8
(2 )
(2 )
, f
“ 0 ”
32
i n a p r o g r a m . ( I t r e m a i n s u n c h a n g e d e v e n i f w r i t i n g
Active edge
judgment flag
O p e r a t i o n m o d e
s e l e c t b i t 0 , 1
I N T 1 / C N T R 0
p o l a r i t y
s w i t c h i n g b i t
T i m e r X c o u n t
s t a r t f l a g
O p e r a t i o n m o d e
s e l e c t b i t 2
Timer X
underflow flag
Set to “0” in pulse period measurement mode
B i t n a m e
(1 )
A d d r e s s
0 0 8 B
(1)
1 6
(INT1 interrupt input)
b1 b0
[ C N T R
0 : M e a s u r e s a m e a s u r e m e n t p u l s e f r o m o n e
1 : M e a s u r e s a m e a s u r e m e n t p u l s e f r o m o n e
[ I N T 1 ]
0 : R i s i n g e d g e
1 : F a l l i n g e d g e
0 0 : T i m e r m o d e o r p u l s e p e r i o d
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
1 : P u l s e p e r i o d m e a s u r e m e n t m o d e
0 : N o a c t i v e e d g e
1 : A c t i v e e d g e f o u n d
0 : N o u n d e r f l o w
1 : U n d e r f l o w f o u n d
_______
r i s i n g e d g e t o t h e n e x t r i s i n g e d g e
f a l l i n g e d g e t o t h e n e x t f a l l i n g e d g e
m e a s u r e m e n t m o d e
0
Specification
]
A f t e r r e s e t
0 0
1 6
F u n c t i o n
“ 1 ”
)
_____
12.1 Timer (Timer X)
RW
R W
R W
R W
R W
R W
R W
R W
R W

Related parts for R5F21133DFP