R8C/1A Group, R8C/1B Group 14. Timers
Rev.1.30 Dec 08, 2006 Page 123 of 315
REJ09B0252-0130
14.2 Timer Z
Timer Z is an 8-bit timer with an 8-bit prescaler. The prescaler and timer each consist of a reload register and
counter. The reload register and counter are allocated at the same address. Refer to the Tables 14.7 to 14.10 for the
Specifications of Each Mode. Timer Z contains timer Z primary and timer Z secondary reload registers.
Figure 14.11 shows a Block Diagram of Timer Z. Figures 14.12 to 14.15 show registers TZMR, PREZ, TZSC,
TZPR, TZOC, PUM, and TCSS.
Timer Z has the following four operating modes:
• Timer mode: The timer counts an internal count source or timer X
underflows.
• Programmable waveform generation mode: The timer outputs pulses of a given width successively.
• Programmable one-shot generation mode: The timer outputs a one-shot pulse.
• Programmable wait one-shot generation mode: The timer outputs a delayed one-shot pulse.
Figure 14.11 Block Diagram of Timer Z
= 00b
= 01b
= 11b
f8
f1
= 10b
Timer X underflow
TZCK1 to TZCK0
TZS
Counter
Reload register
PREZ register
TZPR register
Data bus
Timer Z interrupt
INT0 interrupt
Write to TZMR register
TZMOD0 to TZMOD1, TZS: Bits in TZMR register
TZOS, TZOCNT: Bits in TZOC register
Toggle
flip-flop
Q
Q
CLR
CK
TZOPL = 1
TZOPL = 0
TZOUT
TZSC register
Reload register
Counter
Reload register
TZOCNT = 0
TZOCNT = 1
P1_3 bit in P1 register
TZOPL, INOSTG: Bits in PUM register
TZCK0 to TZCK1: Bits in TCSS register
INT0EN, INT0PL: Bits in INTEN register
f2
TZMOD1 to TZMOD0 = 10b, 11b
TZOS
Polarity
select
INOSEG
Digital filterINT0
INT0EN
INT0PL
TZMOD1 to TZMOD0 = 01b, 10b, 11b
TZMOD1 to TZMOD0
= 01b, 10b, 11b
Input polarity selected to
be one edge or both edges