Programmable Waveform Generation Mode - Renesas R8C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for R8C Series:
Table of Contents

Advertisement

R8C/1A Group, R8C/1B Group
14.2.2

Programmable Waveform Generation Mode

In programmable waveform generation mode, the signal output from the TZOUT pin is inverted each time the
counter underflows, while the values in registers TZPR and TZSC are counted alternately (refer to Table 14.8
Programmable Waveform Generation Mode Specifications). Counting starts by counting the value set in the
TZPR register. Figure 14.17 shows Registers TZMR and PUM in Programmable Waveform Generation Mode.
Figure 14.18 shows an Operating Example of Timer Z in Programmable Waveform Generation Mode.
Table 14.8
Programmable Waveform Generation Mode Specifications
Item
Count sources
Count operations
Width and period of
output waveform
Count start condition
Count stop condition
Interrupt request
generation timing
TZOUT pin function
INT0 pin function
Read from timer
Write to timer
Select functions
NOTES:
1. Even when counting the secondary period, the TZPR register may be read.
2. The value set in registers TZPR and TZSC are made effective by writing a value to the TZPR
register. The set values are reflected in the waveform output beginning with the following primary
period after writing to the TZPR register.
3. The TZOCNT bit is enabled by the following.
• When counting starts.
• When a timer Z interrupt request is generated. The contents after the TZOCNT bit is changed are
reflected from the output of the following primary period.
Rev.1.30
Dec 08, 2006
REJ09B0252-0130
f1, f2, f8, timer X underflow
• Decrement
• When the timer underflows, it reloads the contents of the primary reload and
secondary reload registers alternately before the count is continued.
Primary period: (n+1)(m+1)/fi
Secondary period: (n+1)(p+1)/fi
Period: (n+1){(m+1)+(p+1)}/fi
fi: Count source frequency
n: Value set in PREZ register, m: value set in TZPR register, p: value set in TZSC
register
1 (count starts) is written to the TZS bit in the TZMR register.
0 (count stops) is written to the TZS bit in the TZMR register.
In half a cycle of the count source, after timer Z underflows during the secondary
period (at the same time as the TZout output change) [timer Z interrupt].
Pulse output
(To use this pin as a programmable I/O port, select timer mode.)
Programmable I/O port, or INT0 interrupt input
The count value can be read out by reading registers TZPR and PREZ
The value written to registers TZSC, PREZ, and TZPR is written to the reload
(2)
register only
• Output level latch select function
The TZOPL bit can select the output level during primary and secondary
periods.
• Programmable waveform generation output switch function
When the TZOCNT bit in the TZOC register is set to 0, the output from the
TZOUT pin is inverted synchronously when timer Z underflows. When set to 1,
the value in the P1_3 bit is output from the TZOUT pin
Page 130 of 315
Specification
(3)
14. Timers
(1)
.

Advertisement

Table of Contents
loading

Table of Contents