Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digit al Millennium Copyright Act. If suc h a c t s
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC and SmartShunt are
registered trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, ECAN,
ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active
Thermistor, Mindi, MiWi, MPASM, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartT el, Total
Endurance, UNI/O, WiperLock and ZENA are trademarks of
Microchip Technology I ncorporat ed in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona, Gresham, Oregon and Mountain View, California. The
Company’s quality system processes and procedures are for its PIC
MCUs and dsPIC DSCs, KEELOQ
EEPROMs, microperipherals, nonvolatile memory and analog
products. In addition, Microchip’s quality system for the design and
manufacture of development systems is ISO 9001:2000 certified.
for Uninterrupted Power Supply (UPS), inverters,
Switched mode power supplies, power factor correc-
There are two device subfamilies within the dsPIC33F
family of devices. They are the General Purpose
Family and the Motor Control Family.
The General Purpose Family is ideal for a wide variety
of 16-bit MCU embedded applications. The variants
with codec interfaces are well-suited for speech and
tion and also for controlling the power management
module in servers, telecommunication equipment and
other industrial equipment.
The device names, pin counts, memory sizes and
peripheral availability of each family are listed below,
followed by their pinout diagrams.
audio processing applications.
The Motor Control Family supports a variety of motor
control applications, such as brushless DC motors,
single and 3-phase induction motors and switched
reluctance moto rs. The se pro duct s are also well-s uited
4.0Flash Program Mem o ry................................... ........................................................................................................................... 77
9.0Power-Savi n g Features................................................................................................ ............................................................ 157
15.0 Motor Control PWM Module. .................................................................................................................................................... 175
21.0 Data Converter Interface (DCI) Module....................................................................................................................................261
22.0 10-bit/12-bit Analog-to-Digital Converte r ( ADC)....................................................................... ................................................ 275
23.0 Special Features...................................................................................................................................................................... 289
24.0 Instruction Set Summary.......................................................................................................................................................... 297
25.0 Development Support............................................................................................................................................................... 305
Index ................................................................................................................................................................................................. 359
The Microchip Web Site....................................... .............................................................................................................................. 365
Customer Change Notification Service .............................................................................................................................................. 365
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications t o better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or c omm ents regarding t his publication, p lease c ontact the M arket ing Co mmunications Department via
E-mail at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We
welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
Customer Notification System
Register on our web site at www.microchip.com to receive the most current information on all of our products.
of this group of dsPIC33F devices. It is not
intended to be a compr ehensive refer ence
source. To complement the information in
this data sheet, refer to the “dsPIC30FFamily Reference Manual” (DS70046).
This documen t conta i ns dev ic e spec if i c in for m at i on fo r
the following devices:
• dsPIC33FJ64GP206
• dsPIC33FJ64GP306
• dsPIC33FJ64GP310
• dsPIC33FJ64GP706
• dsPIC33FJ64GP708
• dsPIC33FJ64GP710
• dsPIC33FJ128GP206
• dsPIC33FJ128GP306
• dsPIC33FJ128GP310
• dsPIC33FJ128GP706
• dsPIC33FJ128GP708
• dsPIC33FJ128GP710
• dsPIC33FJ256GP506
• dsPIC33FJ256GP510
• dsPIC33FJ256GP710
• dsPIC33FJ64MC506
• dsPIC33FJ64MC508
• dsPIC33FJ64MC510
• dsPIC33FJ64MC706
• dsPIC33FJ64MC710
• dsPIC33FJ128MC506
• dsPIC33FJ128MC510
• dsPIC33FJ128MC706
• dsPIC33FJ128MC708
• dsPIC33FJ128MC710
• dsPIC33FJ256MC510
• dsPIC33FJ256MC710
The dsPIC33F General Purpose and Motor Control
Families of devices include devices with a wide range
of pin counts (64, 80 and 100), different program
memory sizes (64 Kb ytes, 128 Kbytes and 25 6 Kbytes)
and different RAM sizes (8 Kbytes, 16 Kbytes and
30 Kbytes)
This makes these families suitable for a wide variety of
high-performance digital signal control application. The
devices are pin compatible with the PIC24H family of
devices, and also share a very high degree of compatibility with the dsPIC30F family devices. This allows easy
migration betwee n device families as may be necessitated by the specific functionality, computational
resource and sys tem cost requirem ents of the applic ation.
The dsPIC33F device famil y employs a powe rful 16-b it
architecture that seamlessly integrates the control
features of a Microcontroller (MCU) with the
computational ca pabil ities of a D igital Signal Process or
(DSP). The resulting functionality is ideal for
applications that rely on high-speed, repetitive
computations, as well as control.
The DSP engine, dual 40-bit accumulators, hardware
support for division operations, barrel shifter, 17 x 17
multiplier, a large array of 16-bit working registers and
a wide variety of data addressing modes, together
provide the dsPIC33F Central Processing Unit (CPU)
with extensive mathematical processing capability.
Flexible and deterministic interrupt handling, coupled
with a powerful array of peripherals, renders the
dsPIC33F devices suitable for control applications.
Further, Direct Memory Access (DMA) enables
overhead-free transfer of data between several
peripherals and a dedicated DMA RAM. Reliable, field
programmable Flash program memory ensures
scalability of applications that use dsPIC33F devices.
Figure 1-1 shows a general block diagram of the
various core and peripheral modules in the dsPIC33F
family of devices, while Table 1-1 lists the functions of
the various pins shown in the pinout diagrams.
Legend:CMOS = CMOS compatible input or output; Analog = Analog input
Pin
Type
I
O
I/O
I/O
I
O
I
O
I
O
I/O
I
I/O
I
I/O
I
I
I
I
O
I
I
I
I
I
I
I
O
O
O
O
O
O
O
O
I/PSTMaster Clear (R es et ) input. This pin is an active-low R eset to the device.
I
I
O
I
I/O
ST = Schmitt Trigger input with CMOS levels; O = Output; I = Input; P = Power
Buffer
Type
ST/CMOS—External clock source input. Always associated wit h O SC 1 pin function.
ST
ST
ST
—
ST
—
ST
—
ST
ST
ST
ST
ST
ST
ST
ST
ST
CMOS
ST
ST
ST
ST
ST
ST
ST
—
—
—
—
—
—
—
—
ST
ST
—
ST/CMOS—Oscillator crystal input. ST buffer when configured in RC mode; CMOS otherwise.
Oscillator crystal out put. Connects to crystal o r resonator in Crystal Osc illa to r mode.
Optionally functions as CLKO in RC and EC mode s. A lw ays associated with OSC 2
pin function.
Can be software program med for internal weak pull- ups on al l in puts .
Data Converter Interface fr am e synchronization pin.
Data Conve r ter Interface serial clock input/ output pin.
Data Converter Interface ser ia l data input pin.
Data Converter Interface serial data output pin.
ECAN1 bus receive pin.
ECAN1 bus transmit pin .
ECAN2 bus receive pin.
ECAN2 bus transmit pin .
Data I/O pin for programming/debugging communication channel 1.
Clock input pin for program m i ng/debugging communication channel 1.
Data I/O pin for programming/debugging communication channel 2.
Clock input pin for program m i ng/debugging communication channel 2.
Data I/O pin for programming/debugging communication channel 3.
Clock input pin for program m i ng/debugging communication channel 3.
Quadrature Encoder Index Pulse input.
Quadrature Encoder P has e A i nput in QEI mode.
Auxiliary Timer External Clock/Gate input in Timer mode.
Quadrature Encoder P has e A i nput in QEI mode.
Auxiliary Timer External Clock/Gate input in Timer mode.
Position Up/Down Cou nt er Dir ec tion State.
Externa l interrup t 0 .
Externa l interrup t 1 .
Externa l interrup t 2 .
Externa l interrup t 3 .
Externa l interrup t 4 .
PWM Fault A input.
PWM Fault B input.
PWM 1 low output.
PWM 1 high output.
PWM 2 low output.
PWM 2 high output.
PWM 3 low output.
PWM 3 high output.
PWM 4 low output.
PWM 4 high output.
Compare Fault A i nput (for Compare Channels 1, 2, 3 and 4).
Compare Fault B i nput (for Compare Channels 5, 6, 7 and 8).
Compare outputs 1 through 8.
Oscillator crystal out put. Connects to crystal o r resonator in Crystal Osc illa to r mode.
Optionally functions as CL KO i n RC and EC modes.
of this group of dsPIC33F devices. It is not
intended to be a compr ehensive refer ence
source. To complement the information in
this data sheet, refer to the “dsPIC30FFamily Reference Manual” (DS70046).
The dsPIC33F CPU module has a 16-bit (data) modified
Harvard archit ecture with an enha nced instruction set,
including significant support for DSP. The CPU has a
24-bit instructio n word with a variab le length opcode field.
The Program Counter (PC) is 23 bits wide and
addresses up to 4M x 2 4 bits of user prog ram memory
space. The actual amount of program memory
implemented varies by de v ice. A single-cycle instr uction
prefetch mecha ni sm i s used to help maintain throughput
and provides predictable execution. All instructions
execute in a single cycle, with the exception of
instructions that change the program flow, the double
word move (MOV.D) instructio n and the tabl e instructions .
Overhead-free program loop constructs are supported
using the DO and REPEAT instructions, both of which are
interruptible at an y po in t.
The dsPIC33F devices have sixteen, 16-bit working
registers in th e programmer’s model . Each of the workin g
registers can s erve as a d ata, ad dres s or ad dr es s offs et
register. The 16th working register (W15) operates as a
software S tack Pointer (SP) for interrupts a nd c alls .
The dsPIC33F instruction set has two classes of
instructions: MCU and DSP. These two instruction
classes are seamlessly integrated into a single CPU.
The instruction set includes many addressing modes
and is designed for optimum C compiler efficiency. For
most instructions, the dsPIC33F is capable of
executing a data (or program data) memory read, a
working register (data) read, a data memory write and
a program (instruction) memory read per instruction
cycle. As a result, three parameter instructions can be
supported, allowing A + B = C operations to be
executed in a single cycle.
A block diagram of the CPU is shown in Figure 2-1,
and the programmer’s model for the dsPIC33F is
shown in Figure 2-2.
2.1Data Addressing Overview
The data space can be addressed as 32K words or
64 Kbytes and is split into two blocks, referr ed to as X
and Y data memo ry. Each memory block has its own
independent Address Genera tion Unit (AGU). The MCU
class of instructions operates solely through the X memory AGU, which accesses the entire memory map as one
linear data space. Certain DSP instructions operate
through the X and Y AGUs to support dual operand
reads, which splits the data address space into two parts.
The X and Y da t a space boundary is device-spec i fic .
Overhead-free circular buffers (Modulo Addressing
mode) are supported in both X and Y address spaces.
The Modulo Addressing removes the software boundary
checking overhead for DSP algorithms. Furthermore,
the X AGU circular addressing can be used with any of
the MCU class of instructions. The X AGU also support s
Bit-Reversed Addressing to greatly simplify input or
output data reordering for radix-2 FFT algorithms.
The upper 32 Kby tes of the data s pace mem ory map ca n
optionally be mapped into program space at any 16K
program word boundary defined by the 8-bit Program
Space Visibility Page (PSVPAG) register. The program
to data space mapping feature lets any instruction
access program space as if it were data s p a ce .
The data space also includes 2 Kbytes of DMA RAM,
which is primarily us ed for DMA dat a transfers, but may
be used as general purpose RAM.
2.2DSP Engine Overview
The DSP engine feature s a high-speed, 17-bit by 17-bit
multiplier, a 40-bit ALU, two 40-bit saturating
accumulators and a 40-bit bidirectional barrel shifter.
The barrel sh ifter is capa ble of shift ing a 40-bi t value,
up to 16 bits right or left, in a single cycle. The DSP
instructions operate seamlessly with all other
instructions and have been designed for optimal
real-time performance. The MAC instruction an d other
associated instructions can concurrentl y fetch two dat a
operands from memory while multiplying two W
registers and accumulating and optionally saturating
the result in the same cycle. This instruction
functionality req uires that the RAM memory d ata sp ace
be split for these instructions and linear for all others.
Data space partitioning is achieved in a transparent
and flexible mann er thro ugh d edica ting c ert ain w orkin g
registers to each address space.
2.3Special MCU Features
The dsPIC33 F fea tur es a 17-bi t by 17-b it, sing le-c ycle
multiplier that is shared by both the MCU ALU and DSP
engine. The multiplier can perform signed, unsigned
and mixed-sign multiplication. Using a 17-bit by 17-bit
multiplier for 16-bit by 16-bit multiplication not only
allows you to perform mixed-sign multiplication, it also
achieves accurate results for special operations, such
as (-1.0) x (-1.0).
The dsPIC33F supports 16/16 and 32/16 divide
operations, both fractional and integer. All divide
instructions are iterative operations. They must be
executed within a REPEAT loop, resulting in a total
execution time of 19 instruction cycles. The divide
operation can be interrupted during any of those
19 cycles without loss of data.
A 40-bit barrel shifter is used to perform up to a 16-bit,
left or right shift in a single cycle. The barrel shifter can
be used by both MCU and DSP instructions.