Timer Z - Renesas M16C Series Hardware Manual

16-bit microcopmuter
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

R8C/11 Group

12.3 Timer Z

Timer Z is an 8-bit timer with an 8-bit prescaler and has two reload registers-Timer Z Primary and Timer
Z Secondary. Figure 12.18 shows a block diagram of Timer Z. Figures 12.19 to 12.21 show the TYZMR,
PREZ, TZSC, TZPR, TYZOC, PUM, and TCSS registers.
Timer Z has the following four operation modes.
• Timer mode: The timer counts an internal count source or Timer Y underflow.
• Programmable waveform generation mode: The timer outputs pulses of a given width successively.
• Programmable one-shot generation mode: The timer outputs one-shot pulse.
• Programmable wait one-shot generation mode: The timer outputs delayed one-shot pulse.
T Z C K 1 t o T Z C K 0
= 0 0
2
f
1
= 0 1
2
f
8
= 1 0
2
T i m e r Y u n d e r f l o w
= 1 1
2
f
2
I N T 0
T Z M O D 1 t o T Z M O D 0 = 0 1
, 1 0
, 1 1
2
2
TZ
OUT
Figure 12.18 Timer Z Block Diagram
T i m e r Y , Z m o d e r e g i s t e r
b 7 b 6 b 5 b 4 b 3 b 2 b1 b 0
N O T E S :
1 . T h e I R b i t i n t h e I N T 2 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 1 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 .
Figure 12.19 TYZMR Register
Rev.1.20
Jan 27, 2006
REJ09B0062-0120
Reload register
C o u n t e r
P R E Z r e g i s t e r
T Z S
D i g i t a l
I n p u t p o l a r i t y s e l e c t e d t o b e
f i l t e r
o n e e d g e o r b o t h e d g e s
INT0PL
INT0EN
2
TZOCNT=0
P3_1 bit in P3 register
T Z O C N T = 1
S y m b o l
T Y Z M R
B i t s y m b o l
Bit name
Timer Y operation
T Y M O D 0
mode bit
INT2/CNTR
R 1 E D G
switching bit
Timer Y write
T Y W C
control bit
Timer Y count
TYS
start flag
Timer Z operation
TZMOD0
mode bit
TZMOD1
Timer Z write
T Z W C
control bit
Timer Z count
T Z S
start flag
page 88 of 204
Da t a b u s
T Z S C r e g i s t e r
R e l o a d r e g i s t e r
R e l o a d r e g i s t e r
C o u n t e r
,
TZMOD1 to TZMOD0=10
11
2
2
T Z O S
Polarity
select
INOSEG
T Z O P L = 1
Q
T o g g l e f l i p - f l o p
Q
CLR
TZOPL=0
A d d r e s s
A f t e r r e s e t
0 0 8 0
0 0
1 6
1 6
Function
0 : T i m e r m o d e
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
0 : R i s i n g e d g e
polarity
1
1 : F a l l i n g e d g e
(1)
F u n c t i o n v a r i e s d e p e n d i n g o n t h e o p e r a t i o n
m o d e
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
b 5 b 4
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
F u n c t i o n v a r i e s d e p e n d i n g o n t h e o p e r a t i o n
m o d e
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
12.3 Timer (Timer Z)
T Z P R r e g i s t e r
Timer Z interrupt
I N T 0 i n t e r r u p t
C K
W r i t e t o T Y Z M R r e g i s t e r
TZMOD1 to TZMOD0 bits=01
R W
R W
R W
R W
R W
R W
R W
R W
R W
, 10
, 11
2
2
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

R8c/11 seriesR8c/tiny series

Table of Contents