User guide

69
SmartBook for Renesas R8C/Tiny Microcontrollers
www.MightyMicons.com
tion, the initial state of the output pin,
CNTR0, can be defined to meet the re-
quirements.
The other timer with this facility, Timer RA,
has two output pins: TRAIO and comple-
ment output of TRAIO.
7.7 Programmable Waveform Generation Mode:
In this mode, the R8C/Tiny micon generates a
square waveform at the timer output pin. In the pulse
output mode, the duty cycle of the generated waveform is
fixed at 50%, where as in this waveform generating mode, the
duty cycle of the square waveform can be varied.
This waveform generating mode is available only in these timers: Timer Y, Timer Z
and Timer RB.
Like other timers, these timers also have an 8 bit timing register along with the 8
bit prescalar. However, the timing register is supported with two reload registers,
Primary register, TYPR and Secondary register, TYSC. When the timer is set to
work, timing register is loaded with the TYPR value. This timing register counts
down the underflow of the prescalar. When the timing register underflows, the
timer output changes the polarity of the output pin. But the next reload value
comes from the TYSC register.
The timing register gets alternate reload values from both TYPR and TYSC regis-
D
a
t
a
4
D
e
s
i
g
n
In waveform generating
mode, the duty cycle of
the square waveform
can be varied. The
timing register gets
alternate reload
values from both TYPR and TYSC reg-
isters. Because of this facility,
square waveform with different
primary and secondary
width can be gener-
ated.