English
Language : 

M16C65 Datasheet, PDF (469/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
21.2.3 PWMi Register (PWMREGi) (i = 0, 1)
21. Pulse Width Modulator
PWMi Register (i = 0, 1)
b7
b0
Symbol
PWMREG0
PWMREG1
Function
Output high-level pulse width
Address
0373h
0375h
Setting Range
After Reset
00h
00h
RW
00h to FFh
RW
The PWMi register (i = 0, 1) sets the PWMi cycle (i = 0, 1) and high-level pulse width. The PWM cycle
and high-level pulse width are given by:
(28 - 1) × (m + 1)
PWM cycle =
fj
(Unit : s)
High level pulse width =
(m + 1) × n
fj
(Unit : s)
fj: PWM count source frequency (Unit : Hz)
m: PWMPREi register setting
n: PWMREGi register setting
The written value in the PWMPREi register is written into the PWMi prescaler prelatch. The state in the
PWMi prescaler prelatch cannot be read. At the beginning of the next PWM cycle, the PWMi prescalser
prelatch value is transferred to the PWMi prescaler latch and the PWMi prescaler, and then the
associated PWMi waveform is output. When reading the PWMPREi register, the state in the PWMi
prescaler latch can be read. (See Figure 21.1 “Block Diagram of PWM”)
The written value in the PWMREGi register is written into the PWMi register prelatch. The state in the
PWMi register prelatch cannot be read. At the beginning of the next PWM cycle, the PWMi register
prelatch value is transferred to the PWMi register latch and the PWMi register, and then the associated
PWMi waveform is output. When reading the PWMREGi register, the state in the PWMi register latch
can be read.
Therefore, the written value in registers PWMPREi and PWMREGi may differ from the values read from
registers PWMPREi and PWMREGi.
Even if the PWMENi bit is set to 1 (PWMi output enabled) when the PWMPREi and PWMREGi register
values are rewritten while the PWMENi bit in the PWMCON1 register is set to 0 (PWMi output
disabled), the rewritten values are not reflected immediately. The values prior to the change are
reflected for the first one cycle of PWM output. The values read from registers PWMPREi and
PWMREGi during this cycle are the values prior to the change. When the second PWM cycle begins,
the rewritten values should be read from registers PWMPREi and PWMREGi and the associated PWM
waveform is output.
See 21.3.2 “Operation Example” for output waveforms and transfer timings.
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 434 of 791