10-9
PULSE-WIDTH MODULATOR
WG_OUTPUT (Waveform Generator)
Address:
Reset State:
1FC0H
0000H
The waveform generator output configuration (WG_OUTPUT) register controls the configuration of
the waveform generator and PWM module pins. Both the waveform generator and the PWM module
share pins with port 6. Having these control bits in a single register enables you to configure all port 6
pins with a single write to WG_OUTPUT.
15 8
OP1 OP0 SYNC PE7 PE6 PH3.2 PH2.2 PH1.2
7 0
P7 P6
PH3.1 PH3.0 PH2.1 PH2.0 PH1.1 PH1.0
Bit
Number
Bit
Mnemonic
Function
15 OP1 Output Polarity
14 OP0 Output Polarity
13 SYNC Synchronize
12 PE7 P6.7/PWM1 Function
Selects either the port function or the PWM output function of
P6.7/PWM1.
1 = PWM1
0 = P6.7
11 PE6 P6.6/PWM0 Function
Selects either the port function or the PWM output function of
P6.6/PWM0.
1 = PWM0
0 = P6.6
10 PH3.2 Phase 3 Function
9 PH2.2 Phase 2 Function
8 PH1.2 Phase 1 Function
7 P7 P6.7/PWM1 Value
Write the desired P6.7/PWM1 value to this bit.
6 P6 P6.6/PWM0 Value
Write the desired P6.6/PWM0 value to this bit.
5:4 PH3.1:0 P6.4/WG3# P6.5/WG3 Value
3:2 PH2.1:0 P6.2/WG2#, P6.3/WG2 Values
1:0 PH1.1:0 P6.0/WG1#, P6.1/WG1 Values
Figure 10-6. Waveform Generator Output Configuration (WG_OUTPUT) Register