PIC16F785-I/P Microchip Technology Inc., PIC16F785-I/P Datasheet - Page 102

no-image

PIC16F785-I/P

Manufacturer Part Number
PIC16F785-I/P
Description
MCU, 8-Bit, 2KW Flash, 128 RAM, 18 I/O, DIP-20
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F785-I/P

A/d Inputs
12-Channel, 10-Bit
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
256 Bytes
Input Output
17
Memory Type
Flash
Number Of Bits
8
Package Type
20-pin PDIP
Programmable Memory
3.5K Bytes
Ram Size
128 Bytes
Speed
20 MHz
Timers
2-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device
PIC16F785/HV785
13.9
The Two-Phase PWM module may be configured to
operate in a Complementary Output mode where PH1
and PH2 are always 180 degrees out-of-phase (see
Figure 13-5).
available and are selected by the COMOD<1:0> bits in
the PWMCON1 register (see Register 13-5). The differ-
ence between the modes is the method by which the
PH1 and PH2 outputs switch from the active to the
inactive state during the PWM period.
In Complementary mode, there are three methods by
which the duty cycle can be controlled. These modes
are selected with the COMOD<1:0> bits (see
Register 13-5). In each of these modes, the duty cycle
is started when the pwm_count = PWMPH1<4:0> and
terminates on one of the following:
• Feedback through C1 or C2
• When the pwm_count equals PWMPH1<4:0>
• Combined feedback and pwm_count match
When COMOD<1:0> = 01, the duty cycle is controlled
only by feedback through comparator C1 or C2. In this
mode, the active drive cycle starts when pwm_count
equals PWMPH1<4:0> and terminates when compara-
tor
PWMPH1<5> = 1) or when comparator C2 output goes
high (if enabled by PWMPH1<6> = 1).
When COMOD<1:0> = 10, the duty cycle is controlled
only by the PWM Phase counter. In this mode, the
active drive cycle starts when the pwm_count equals
PWMPH1<4:0> and terminates when the pwm_count
equals PWMPH2<4:0>. For example, free running
50% duty cycle can be accomplished by setting
COMOD<1:0> = 10 and choosing appropriate values
for PWMPH1<4:0> and PWMPH2<4:0>.
When COMOD<1:0> = 11, the duty cycle is controlled
by the phase counter or feedback through comparator
C1 or C2. For example, in this mode, the maximum
duty
PWMPH1<4:0> (duty cycle start) and PWMPH2<4:0>
(duty cycle end). The duty cycle can be terminated
earlier than the maximum by feedback through
comparator C1 or C2.
13.9.1
The Complementary Output mode facilitates driving
series connected MOSFET drivers by providing dead
band drive timing between each phase output (see
Figure 13-6). Dead band times are selectable by the
CMDLY<4:0> bits of the PWMCON1 register. Delays
from 0 to 155 nanoseconds (typical) with a resolution of
5 nanoseconds (typical) are available.
DS41249D-page 100
C1’s
cycle
Complementary Output Mode
DEAD BAND CONTROL
output
is
Three
determined
goes
complementary
high
by
(if
the
enabled
modes
values
Preliminary
are
by
of
13.9.2
Overlap timing can be accomplished by configuring the
Complementary mode for the desired output polarity
and overlap time (as dead time) then swapping the out-
put connections and inverting the outputs. For exam-
ple, to configure a complementary drive for 55 ns of
overlap and an active-high drive output on PH1 and an
active-low drive output on PH2, set the PWM control
registers as follows:
• Connect PH1 driver to PH2 output
• Connect PH2 driver to PH1 output
• Initialize PORTC<1> to 1 (PH2 driver off)
• Initialize PORTC<4> to 0 (PH1 driver off)
• Set TRISC<1,4> to 0 for output
• Set PWMPH1<POL> to 1 (Inverted PH1)
• Set PWMPH2<POL> to 1 (Non-Inverted PH2)
• Set PWMCON1 for 55 ns delay and desired
• Set PWMCON0 desired SYNC and auto-shutdown
13.9.3
During shutdown the PH1 and PH2 complementary
outputs are forced to their inactive states (see
Figure 13-5). When shutdown ceases the PWM out-
puts revert to their start-up states for the first cycle
which is PH1 inactive (output undriven) and PH2 active
(output driven).
termination (comparator, count or both)
configuration and to enable PH1 and PH2
OVERLAP CONTROL
SHUTDOWN IN COMPLEMENTARY
MODE
© 2006 Microchip Technology Inc.

Related parts for PIC16F785-I/P