R01UH0092EJ0110 Rev.1.10
Page 399 of 807
Jul 31, 2012
M16C/64C Group
21. Pulse Width Modulator
21.2.4
PWM Control Register 1 (PWMCON1)
PWMEN0 (PWM0 output enable bit) (b0)
PWMEN1 (PWM1 output enable bit) (b1)
Set these bits to start PWM output. See Table 21.4 “PWM Pin and Bit Setting” for details.
PWMPORT0 (PWM0 port switch bit) (b2)
PWMPORT1 (PWM1 port switch bit) (b3)
Set these bits to select a PWM output pin. See Table 21.4 “PWM Pin and Bit Setting” for details.
Table 21.4
PWM Pin and Bit Setting
Bit Setting
Pin Function or State
PWMCON0 register
PWMCON1 register
PWMSELi bit
PWMPORTi
bit
PWMENi bit
P9_3
P9_4
P4_6
P4_7
0
0
0 or 1
I/O port or pin for other
peripheral function
I/O port or pin for other
peripheral function
1
(1)
0
PWMi output level
maintained
(2)
1
PWMi pulse output
1
0
0 or 1
I/O port or pin for other
peripheral function
I/O port or pin for other
peripheral function
1
(1)
0
PWMi output level
maintained
(2)
1
PWMi pulse output
i = 0, 1
Notes:
1.
Set the direction bit corresponding to the selected pin to 1 (output mode).
2.
Even if the PWMENi bit is set from 1 to 0 during PWMi output, the PWMi output remains
unchanged. The PWM output signal is low immediately after the MCU is reset.
b7
0
b6 b5 b4
b1
b2
b3
PWM Control Register 1
Symbol
PWMCON1
Address
0376h
Bit Symbol
Bit Name
RW
PWMEN0
Reset Value
00h
RW
b0
Function
PWM0 output enable bit
PWMEN1
RW
RW
PWM1 output enable bit
0: Output disabled
1: Output enabled
PWMPORT0
PWM0 port switch bit
0: I/O port
1: PWM0 output
PWMPORT1
PWM1 port switch bit
0: I/O port
1: PWM1 output
—
(b7-b4)
Reserved bits
Set to 0
RW
RW
0: Output disabled
1: Output enabled
0 0 0
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...