PIC24FJ128GB MICROCHIP [Microchip Technology], PIC24FJ128GB Datasheet - Page 164

no-image

PIC24FJ128GB

Manufacturer Part Number
PIC24FJ128GB
Description
64/80/100-Pin, 16-Bit Flash Microcontrollers with USB On-The-Go (OTG)
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC24FJ128GB106-I/MR
Manufacturer:
MICROCHIP
Quantity:
54 574
Part Number:
PIC24FJ128GB106-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB106-I/PT
0
Part Number:
PIC24FJ128GB106T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB106T-I/PT
0
Part Number:
PIC24FJ128GB108-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB108T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GB110-I/PF
Manufacturer:
Microchip Technology
Quantity:
10 000
Company:
Part Number:
PIC24FJ128GB210-I/PT
Quantity:
119
PIC24FJ256GB110 FAMILY
13.3
In PWM mode, the output compare module can be
configured for edge-aligned or center-aligned pulse
waveform generation. All PWM operations are
double-buffered (buffer registers are internal to the
module and are not mapped into SFR space).
To configure the output compare module for PWM
operation:
1.
2.
3.
4.
FIGURE 13-2:
DS39897B-page 162
Trigger and
Sync Sources
OC Clock
Sources
Configure the OCx output for one of the
available Peripheral Pin Select pins.
Calculate the desired duty cycles and load them
into the OCxR register.
Calculate the desired period and load it into the
OCxRS register.
Select the current OCx as the trigger/sync source
by
(OCxCON2<4:0>).
Note 1: The OCx outputs must be assigned to an available RPn pin before use. Please see Section 9.4 “Peripheral
Pulse-Width Modulation (PWM)
Mode
writing
TRIGMODE
SYNCSELx
TRIGSTAT
Pin Select” for more information.
OCTSELx
OCTRIG
0x1F
Trigger and
Sync Logic
OUTPUT COMPARE BLOCK DIAGRAM (DOUBLE-BUFFERED, 16-BIT PWM MODE)
Clock
Select
Reset
to
Match Event
Increment
SYNCSEL<4:0>
Reset
OCxRS buffer
OCxR buffer
Comparator
Comparator
OCxCON1
OCxCON2
Preliminary
OCxTMR
OCxRS
OCxR
Rollover/Reset
Rollover/Reset
5.
6.
7.
8.
Match
Event
Match
Event
Rollover
Note:
Select
OCTSEL2<2:0> (OCxCON<12:10>) bits.
Enable interrupts, if required, for the timer and
output compare modules. The output compare
interrupt is required for PWM Fault pin utilization.
Select the desired PWM mode in the OCM<2:0>
(OCxCON1<2:0>) bits.
If a timer is selected as a clock source, set the
TMRy prescale value and enable the time base by
setting the TON (TxCON<15>) bit.
This peripheral contains input and output
functions that may need to be configured
by
Section 9.4 “Peripheral Pin Select” for
more information.
a
OC Output and
Fault Logic
the
clock
OCx Interrupt
OCMx
OCINV
OCTRIS
FLTOUT
FLTTRIEN
FLTMD
ENFLT0
OCFLT0
peripheral
© 2008 Microchip Technology Inc.
source
by
pin
writing
OCFA/OCFB
select.
OCx Pin
the
See

Related parts for PIC24FJ128GB