English
Language : 

PIC18F2331 Datasheet, PDF (205/396 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High Performance PWM and A/D
PIC18F2331/2431/4331/4431
FIGURE 17-20:
POUT0
OVERRIDE BITS IN COMPLEMENTARY MODE
1
POUT1
PWM1
PWM0
4
2
3
5
7
6
Assume: PVOD0 = 0; PVOD1 = 0; PMOD0 = 0
1. Even override bits have no effect in Complementary mode.
2. Odd override bit is activated, which causes the even PWM to deactivate.
3. Dead time insertion.
4. Odd PWM activated after the dead time.
5. Odd override bit is deactivated, which causes the odd PWM to deactivate.
6. Dead time insertion.
7. Even PWM is activated after the dead time.
17.10.3 OUTPUT OVERRIDE EXAMPLES
Figure 17-21 shows an example of a waveform that
might be generated using the PWM output override
feature. The figure shows a six-step commutation
sequence for a BLDC motor. The motor is driven
through a 3-phase inverter as shown in Figure 17-16.
When the appropriate rotor position is detected, the
PWM outputs are switched to the next commutation
state in the sequence. In this example, the PWM out-
puts are driven to specific logic states. The OVDCOND
and OVDCONS register values used to generate the
signals in Figure 17-21 are given in Table 17-4.
The PWM Duty Cycle registers may be used in con-
junction with the OVDCOND and OVDCONS registers.
The Duty Cycle registers control the average voltage
across the load and the OVDCOND and OVDCONS
registers control the commutation sequence.
Figure 17-22 shows the waveforms, while Table 17-4
and Table 17-5 show the OVDCOND and OVDCONS
register values used to generate the signals.
REGISTER 17-6:
OVDCOND: OUTPUT OVERRIDE CONTROL REGISTER
R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
POVD7(1) POVD6(1) POVD5 POVD4 POVD3 POVD2
bit 7
R/W-1
POVD1
R/W-1
POVD0
bit 0
bit 7-0
POVD7:POVD0: PWM Output Override bits(1)
1 = Output on PWM I/O pin is controlled by the value in the Duty Cycle register and the PWM
time base.
0 = Output on PWM I/O pin is controlled by the value in the corresponding POUT bit.
Note 1: Unimplemented in PIC18F2X31 devices; maintain these bits clear.
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = bit is cleared x = bit is unknown
 2003 Microchip Technology Inc.
Preliminary
DS39616B-page 203