English
Language : 

R5F21114DFP Datasheet, PDF (99/227 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY/R8C/Tiny SERIES
R8C/11 Group
12.3 Timer (Timer Z)
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.
TZCK1 to TZCK0
f1
f8
Timer Y underflow
f2
=002
=012
=102
=112
Reload register
Counter
PREZ register
TZS
INT0
Digital Input polarity selected to be
filter
one edge or both edges
TZMOD1 to TZMOD0=012, 102, 112
TZOCNT=0
INT0PL
INT0EN
TZOUT
P3_1 bit in P3 register
TZOCNT=1
Figure 12.18 Timer Z Block Diagram
Data bus
TZSC register
Reload register
TZPR register
Reload register
Counter
Timer Z interrupt
TZMOD1 to TZMOD0=102, 112
TZOS
Polarity
select
INOSEG
TZOPL=1
TZOPL=0
Q
Toggle flip-flop CK
Q
CLR
INT0 interrupt
Write to TYZMR register
TZMOD1 to TZMOD0 bits=012, 102, 112
Timer Y, Z mode register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
TYZMR
Address
008016
After reset
0016
Bit symbol Bit name
Function
RW
TYMOD0
Timer Y operation
mode bit
0 : Timer mode
1 : Programmable waveform generation mode
RW
R1EDG
INT2/CNTR1 polarity 0 : Rising edge
switching bit(1)
1 : Falling edge
RW
TYWC
Timer Y write
control bit
Function varies depending on the operation
mode
RW
TYS
TZMOD0
TZMOD1
TZWC
Timer Y count
start flag
Timer Z operation
mode bit
Timer Z write
control bit
0 : Stops counting
1 : Starts counting
RW
b5 b4
0 0 : Timer mode
RW
0 1 : Programmable waveform generation mode
1 0 : Programmable one-shot generation mode
1 1 : Programmable wait one-shot generation RW
mode
Function varies depending on the operation
mode
RW
TZS
Timer Z count
start flag
0 : Stops counting
1 : Starts counting
RW
NOTES:
1. The IR bit in the INT2IC register may be set to “1” (interrupt requested) when the R1EDG bit is rewritten.
Refer to the paragraph 19.2.5 “Changing Interrupt Factor” in the Usage Notes Reference Book.
Figure 12.19 TYZMR Register
Rev.1.20 Jan 27, 2006 page 88 of 204
REJ09B0062-0120