MS51
Nov. 28, 2019
Page
318
of 491
Rev 1.00
MS51
32K
SE
RIES
TE
CHNICAL RE
F
EREN
CE MA
N
UAL
6.6 pulse Width Modulated (PWM)
6.6.1
Overview
The PWM (Pulse Width Modulation) signal is a useful control solution in wide application field. It can
used on motor driving, fan control, backlight brightness tuning, LED light dimming, or simulating as a
simple digital to analog converter output through a low pass filter circuit.
The MS51 PWM0 is especially designed for motor control by providing three pairs, maximum 16-bit
resolution of PWM0 output with programmable period and duty. The architecture makes user easy to
drive the one-phase or three-phase brushless DC motor (BLDC), or three-phase AC induction motor.
Each of six PWM can be configured as one of independent mode, complementary mode, or
synchronous mode. If the complementary mode is used, a programmable dead-time insertion is
available to protect MOS turn-on simultaneously. The PWM waveform can be edge-aligned or center-
aligned with variable interrupt points.
The MS51 PWM1/2/3 provide individual configurable period and duty. maximum 16-bit resolution
output. Each of two PWM1/2/3 can be configured as one of independent mode, complementary mode,
or synchronous mode.The PWM1/2/3 waveform can be edge-aligned or center-aligned with variable
interrupt points.
PWM output pin define and enable control register table.
PWM Channel
Output
Pin
Control register 1
Control register2
SFR Byte Name
Bit name
Value
SFR Byte Name
Bit name
Value
PWM0_CH0
P1.2
PIOCON0[0]
PIO12
1
AUXR4[1:0]
PWM1C0P
00 (default)
PWM0_CH1
P1.1
PIOCON0[1]
PIO11
1
AUXR4[3:2]
PWM1C1P
00 (default)
P1.4
PIOCON1[1]
PIO14
1
AUXR4[1:0]
PWM1C0P
00 (default)
PWM0_CH2
P3.3
PIOCON2[6]
PIO33
1
-
-
-
P1.0
PIOCON0[2]
PIO10
1
AUXR4[5:4]
PWM2C0P
00 (default)
PWM0_CH3
P0.5
PIOCON1[2]
PIO05
1
AUXR4[5:4]
PWM2C0P
00 (default)
P0.0
PIOCON0[3]
PIO00
1
AUXR4[7:6]
PWM2C1P
00 (default)
PWM0_CH4
P0.4
PIOCON1[3]
PIO04
1
AUXR4[7:6]
PWM2C1P
00 (default)
PWM0_CH5
P0.1
PIOCON0[4]
PIO01
1
AUXR5[1:0]
PWM3C0P
00 (default)
P0.3
PIOCON0[5]
PIO03
1
AUXR5[3:2]
PWM3C1P
00 (default)
P1.5
PIOCON1[5]
PIO15
1
AUXR5[3:2]
PWM3C1P
00 (default)
PWM1_CH0
P2.3
PIOCON2[2]
PIO23
1
AUXR4[1:0]
PWM1C0P
00
P1.2
PIOCON0[0]
PIO12
1
AUXR4[1:0]
PWM1C0P
00
PWM1_CH1
P2.2
PIOCON2[1]
PIO22
1
AUXR4[3:2]
PWM1C1P
01
P1.4
PIOCON1[1]
PIO14
1
10
P1.1
PIOCON0[1]
PIO11
1
11
PWM2_CH0
P2.1
PIOCON2[0]
PIO21
1
AUXR4[5:4]
PWM2C0P
00
P1.0
PIOCON0[2]
PIO10
1
01
P0.5
PIOCON1[2]
PIO05
1
10
PWM2_CH1
P3.0
-
-
-
AUXR4[7:6]
PWM2C1P
00