8-Bit Pwm Output Control - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

FUNCTIONAL DESCRIPTION
2.10 PWM

2.10.5 8-bit PWM output control

How to control the 8-bit PWM output is described below.
The PWM0–PWM7 output pins are also used for port P0
Set "0" to bit 0 of the PWM output control register 1 (address 00D5
(this bit is cleared to "0" after reset).
Write output data to the corresponding 8-bit PWM registers (addresses 00D0
Set the corresponding bit of the port P0 direction register to "1" to specify the output mode.
Select the output polarity by bit 3 of the PWM output control register 2 (address 00D6
is cleared to "0," a positive polarity is selected; when set to "1," a negative polarity is selected.
By setting "1" to the corresponding bits among bits 2 to 7 of the PWM output control register 1, the pins
are given the PWM output function to output the PWM. When clearing to "0," the pins become general-
purpose ports (ports P0
PWM Output Control Register 2
b7 b6 b5 b4 b3 b2 b1 b0
Fig. 2.10.7 PWM output control register 2 (address 00D6
2-70
–P0
).
0
5
PWM output control register 2 (PN) [Address 00D6
B
Name
0, 1
Nothing is assigned. These bits are write disable bits.
When these bits are read out, the values are "0."
2
DA output polarity
selection bit (PN3)
PWM output polarity
3
selection bit (PN4)
DA general-purpose
4
output bit (PN5)
5
Nothing is assigned. These bits are write disable bits.
to
When these bits are read out, the values are "0."
7
7220 Group User's Manual
–P0
and P6
–P6
.
0
3
0
3
) to supply the PWM count source
16
16
Functions
0 : Positive polarity
1 : Negative polarity
0 : Positive polarity
1 : Negative polarity
0 : Output LOW
1 : Output HIGH
)
16
to 00D4
and 00F6
16
16
). When this bit
16
]
After reset R W
0
R —
0
R W
0
R W
0
R W
0
R —
).
16

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents