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

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

2.10.4 14-bit PWM output control

How to control the 14-bit PWM output is described below.
Set "0" to bit 0 of PWM output control register 1 (address 00D5
bit is cleared to "0" when reset).
Set the high-order 8 bits of the output data to the DA-H register.
Set the low-order 6 bits of the output data to the DA-L register.
Data is written to the 14-bit PWM circuit by writing data to the DA-L register.
For this reason, even when changing only the high-order 8 bits of the output data, be sure to write the
low-order 6 bits data to the DA-L register again.
Conversely, when changing low-order 6 bits only, it needs to only write data to the DA-L register, and
needs not write the high-order 8-bit data again.
Select the output polarity by bit 2 of PWM output control register 2 (address 00D6
"0," a positive polarity is selected; when "1," a negative polarity is selected.
14-bit PWM is output from the D-A pin by clearing bit 1 of PWM output control register 1 to "0." When
setting to "1," pin D-A functions as a 1-bit general-purpose output port. In this case, it is possible to
specify either HIGH output (= "1") or LOW output(= "0") output by bit 4 of PWM output control register
2.
PWM Output Control Register 1
b7 b6 b5 b4 b3 b2 b1 b0
Fig. 2.10.6 PWM output control register 1 (address 00D5
FUNCTIONAL DESCRIPTION
PWM output control register 1 (PW) [Address 00D5
B
Name
DA, PWM count source
0
selection bit (PW0)
1
DA/PN4 output
selection bit (PW1)
P0
/PWM0 output
2
0
selection bit (PW2)
P0
/PWM1 output
3
1
selection bit (PW3)
4
P0
/PWM2 output
2
selection bit (PW4)
5 P0
/PWM3 output
3
selection bit (PW5)
6 P0
/PWM4 output
4
selection bit (PW6)
7 P0
/PWM5 output
5
selection bit (PW7)
7220 Group User's Manual
) to supply the PWM count source (this
16
]
16
Functions
0 : Count source supply
1 : Count source stop
0 : DA output
1 : PN4 output
0: P0
output
0
1: PWM0 output
0: P0
output
1
1: PWM1 output
0: P0
output
2
1: PWM2 output
0: P0
output
3
1: PWM3 output
0: P0
output
4
1: PWM4 output
0: P0
output
5
1: PWM5 output
)
16
2.10 PWM
). When setting to
16
After reset R W
0
R W
0
R W
0
R W
0
R W
0
R W
0
R W
0
R W
0
R W
2-69

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents