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 Digital Millennium Copyright Act. If such acts
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, dsPIC,
K
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL 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, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated 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 design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial 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.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS70591C-page 2Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and
dsPIC33FJ64GS406/606/608/610
High-Performance, 16-Bit Digital Signal Controllers
Operating Range:
• Up to 40 MIPS operation (at 3.0-3.6V):
- Industrial temperature range (-40°C to +85°C)
- Extended temperature range (-40°C to +125°C)
High-Performance DSC CPU:
• Modified Harvard architecture
• C compiler optimized inst ruction set
• 16-bit wide data path
• 24-bit wide instructions
• Linear program memory addressing up to 4M
instruction words
• Linear data memory addressing up to 64 Kbytes
• 83 base instructions: mostly 1 word/1 cycle
• Two 40-bit accumulators with rounding and
saturation options
• Flexible and powerful addressing modes:
-Indirect
- Modulo
- Bit-Reversed
• Software stack
• 16 x 16 fractional/integer multiply operations
• 32/16 and 16/16 divide operations
• Single-cycle multiply and accumulate:
- Accumulator write back for DSP operations
- Dual data fetch
• Up to ±16-bit shifts for up to 40-bit data
Direct Memory Access (DMA):
• 4-channel hardware DMA
• 1 Kbyte dual ported DMA buff er area (DMA RAM)
to store data transferred via DMA:
- Allows data transfer between RAM and a
peripheral while CPU is executing code (no
cycle steali ng)
• Most peripherals support DMA
Digital I/O:
• Up to 85 programmable digital I/O pi ns
• Wake-up/Interrupt-on-Change for up to 24 pins
• Output pins can drive voltage from 3.0V to 3.6V
• Up to 5V output with open drain configuration
• 5V tolerant digital input pins
• 16 mA source/sink on all PWM pins
On-Chip Flash and SRAM:
• Flash program memory (up to 64 Kbytes)
• Data SRAM (up to 8 Kbytes)
• Boot and General Security for program Flash
Peripheral Features:
• Timer/Counters, up to five 16-bit timers
- Can pair up to make one 32-bit timer
• Input Capture (up to four channels):
- Capture on up, down or both edges
- 16-bit capture input functions
- 4-deep FIFO on each capture
• Output Compare (up to four channels):
- Single or Dual 16-bit Compare mode
- 16-bit Glitchless PWM mode
• 4-wire SPI (up to two modules):
- Framing supports I/O interface to simpl e
codecs
- 1-deep FIFO buffer
- Supports 8-bit and 16-bit data
- Supports all serial clock formats and
sampling modes
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
dsPIC33FJ32GS406/606/608/610 and
dsPIC33FJ64GS406/606/608/610
PRODUCT FAMILIES
The device names, pin counts, memory sizes, and
peripheral availability of each device are listed in
Table 1. The following pages show their pinout
diagrams.
TABLE 1:dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610 CONTROLLER
2.0Guidelines for Getting Started with 16-bit Digital Signal Controllers ..........................................................................................25
5.0Flash Program Memory............................................................................................................................................................ 109
23.0 High-Speed Analog Comparato r......................... .................................................... ................................................................. 329
24.0 Special Features...................................................................................................................................................................... 333
25.0 Instruction Set Summary .......................................................................................................................................................... 341
26.0 Development Support............................................................................................................................................................... 349
Appendix A: Migrating from dsPIC33FJ06GS101/X02 and dsPIC33FJ16GSX02/X04 to dsPIC33FJ32GS406/606/608/610
and dsPIC33FJ64GS406/606/608/610 Devices ................................................................................................................................ 403
Index ................................................................................................................................................................................................. 409
The Microchip Web Site.............. ....................................................................................................................................................... 415
Customer Change Notification Service .............................................................................................................................................. 415
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
TO OUR VALUED CUSTOMERS
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 to 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 r egarding t his publication, p lease c ontact the M arket ing Communications 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.
DS70591C-page 18Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
1.0DEVICE OVERVIEW
Note:This data sheet summarizes the features
of the dsPIC33FJ32GS406/606/608/610
and dsPIC33FJ64GS406/606/608/610
families of devic es . It is not intended to be
a comprehensive reference source. To
complement the information in this data
sheet, refer to the “dsPIC33F/PIC24HFamily Reference Manual”. Please see
the Microchip web site (www.microchip.com) for the latest dsPIC3 3F/PIC 24H
Family Reference Manual sections.
This document cont a ins dev ice -specific information for
the following dsPIC33F Digital Signal Controller (DSC)
devices:
• dsPIC33FJ32GS406
• dsPIC33FJ32GS606
• dsPIC33FJ32GS608
• dsPIC33FJ32GS610
• dsPIC33FJ64GS406
• dsPIC33FJ64GS606
• dsPIC33FJ64GS608
• dsPIC33FJ64GS610
The dsPIC33FJ32GS406/606/608/610 and
dsPIC33FJ64GS406/606/608/610 families of devices
contain extensiv e Di gital Signal Processo r (DSP) fun ctionality with a high-performance 16-bit microcontroller
(MCU) architecture.
Figure 1-1 shows a general block diagram of the core
and peripheral modules in the dsPIC33FJ32GS406/
606/608/610 and dsPIC33FJ64GS406/606/608/610
devices. Table 1-1 lists the functio ns of th e various pins
shown in the pinout diagrams.
Note:Not all pins or features are implemented on all device pinout configurations. See pinout diagrams for the specific pins and features
present on each device.
ECAN1
QEI1,2
PORTD
PORTE
PORTF
PORTG
DMA
DMA
RAM
Controller
16
16
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
FIGURE 1-1:BLOCK DIAGRAM
DS70591C-page 20Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
TABLE 1-1:PINOUT I/O DESCRIPTIONS
Pin Name
AN0-AN23IAnalogAnalog input channels
CLKI
CLKO
OSC1
OSC2
SOSCI
SOSCO
CN0-CN23ISTChange notification inputs. Can be software programmed for internal
C1RX
C1TX
IC1-IC4ISTCapture inputs 1/4
INDX1, INDX2, AINDX1
QEA1, QEA2, AQEA1
QEB1, QEB2, AQEB1
UPDN1
OCFA
OCFB
OC1-OC4
INT0
INT1
INT2
INT3
INT4
RA0-RA15I/OSTPORTA is a bidirectional I/O port
RB0-RB15I/OSTPORTB is a bidirectional I/O port
RC0-RC15I/OSTPORTC is a bidirectional I/O port
RD0-RD15I/OSTPORTD is a bidirectional I/O port
RE0-RE9I/OSTPORTE is a bidirectional I/O port
RF0-RF13I/OSTPORTF is a bidirectional I/O port
RG0-RG15I/OSTPORTG is a bidirectional I/O port
T1CK
T2CK
T3CK
T4CK
T5CK
Legend: CMOS = CMOS compatible input or outputAnalog = Analog inputI = Input
ST = Schmitt Trigger input with CMOS levelsP = PowerO = Output
TTL = Transistor-Transistor Logic
Pin
Type
I/O
O
O
O
Buffer
Type
IOST/CMOS—External clock source input. Always associated with OSC1 pin function.
Oscillator crystal output. Connects to crystal or resonator in Crystal
Oscillator mode. Optionally functions as CLKO in RC and EC modes.
Always associated with OSC2 pin function.
I
ST/CMOS—Oscillator crystal input. ST buffer when configured in RC mode; CMOS
otherwise.
Oscillator crystal output. Connects to crystal or resonator in Crystal
Oscillator mode. Optionally functions as CLKO in RC and EC modes.
Quadrature Encoder Index Pulse input.
Quadrature Encoder Phase A input in QEI mode.
Auxiliary Timer External Clock/Gate input in Timer mode.
Quadrature Encoder Phase A input in QEI mode.
Auxiliary Timer External Clock/Gate input in Timer mode.
Position Up/Down Counter Direction State.
Compare Fault A input (for Compare Channels 1 and 2)
Compare Fault B input (for Compare Channels 3 and 4)
DACOUT0—DAC output voltage
EXTREFIAnalogExternal Voltage Reference Input for the Reference DACs
REFCLK0—REFCLK output signal is a postscaled derivative of the system clock
Legend: CMOS = CMOS compatible input or outputAnalog = Analog inputI = Input
ST = Schmitt Trigger input with CMOS levelsP = PowerO = Output
TTL = Transistor-Transistor Logic
I
O
I
O
I
O
I
O
I/O
I
O
I/O
I/O
I
O
I/O
I/O
I/O
I/O
I/O
I
I
I
O
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
ST
—
ST
—
ST
—
ST
—
ST
ST
—
ST
ST
ST
—
ST
ST
ST
ST
ST
TTL
TTL
TTL
—
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
Analog
UART1 clear to send
UART1 ready to send
UART1 receive
UART1 transmit
UART2 clear to send
UART2 ready to send
UART2 receive
UART2 transmit
Synchronous serial clock input/output for SPI1
SPI1 data in
SPI1 data ou t
SPI1 slave synchronization or frame pulse I/O
Synchronous serial clock input/output for SPI2
SPI2 data in
SPI2 data ou t
SPI2 slave synchronization or frame pulse I/O
Synchronous serial clock input/output for I2C1
Synchronous serial data input/output for I2C1
Synchronous serial clock input/output for I2C2
Synchronous serial data input/output for I2C2
JTAG Test mode select pin
JTAG test clock input pi n
JTAG test data input pin
JTAG test data output pin
Comparator 1 Channel A
Comparator 1 Channel B
Comparator 1 Channel C
Comparator 1 Channel D
Comparator 2 Channel A
Comparator 2 Channel B
Comparator 2 Channel C
Comparator 2 Channel D
Comparator 3 Channel A
Comparator 3 Channel B
Comparator 3 Channel C
Comparator 3 Channel D
Comparator 4 Channel A
Comparator 4 Channel B
Comparator 4 Channel C
Comparator 4 Channel D
DS70591C-page 22Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
DDP—Positive supply for peripheral logic and I/O pins
V
VCAP/VDDCOREP—CPU logic filter capacitor connection
VSSP—Ground reference for logic and I/O pins
Legend: CMOS = CMOS compatible input or outputAnalog = Analog inputI = Input
ST = Schmitt Trigger input with CMOS levelsP = PowerO = Output
TTL = Transistor-Transistor Logic
I
I
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
I/O
I
I/O
I
I/O
I
I/PSTMaster Clear (Reset) input. This pin is an active-low Reset to the
ST
ST
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
ST
ST
ST
ST
ST
ST
Fault Inputs to PWM Module
External synchronization signal to PWM Master Time Base
PWM Master Time Base for external device synchronization
PWM1 Low output
PWM1 High output
PWM2 Low output
PWM2 High output
PWM3 Low output
PWM3 High output
PWM4 Low output
PWM4 High output
PWM5 Low output
PWM5 High output
PWM6 Low output
PWM6 High output
PWM7 Low output
PWM7 High output
PWM8 Low output
PWM8 High output
PWM9 Low output
PWM9 High output
Data I/O pin for programming/debugging communication Channel 1
Clock input pin for programming/debugging communication Channel 1
Data I/O pin for programming/debugging communication Channel 2
Clock input pin for programming/debugging communication Channel 2
Data I/O pin for programming/debugging communication Channel 3
Clock input pin for programming/debugging communication Channel 3
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
NOTES:
DS70591C-page 24Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
2.0GUIDELINES FOR GETTING
STARTED WITH 16-BIT
DIGITAL SIGNAL
CONTROLLERS
Note 1: This data sheet summarizes the features
of the dsPIC33FJ32GS406/606/608/610
and dsPIC33FJ64GS406/606/608/610
family of devices. It is not intended to be
a comprehensive reference source. To
complement the information in this data
sheet, refer to the “dsPIC33F/PIC24HFamily Reference Manual”. Please see
the Microchip web site
(www.microchip.com) for the latest
74dsPIC33F/PIC24H Family Reference
Manual sections.
2: Some registers and associated bits
described in this section may not be available on all devices. Refer to Section 4.0“Memory Organization” in this data
sheet for device-specific register and bit
information.
2.1Basic Connection Requirements
Getting started with the
dsPIC33FJ32GS406/606/608/610 and
dsPIC33FJ64GS406/606/608/610 family of 16-bit
Digital Signal Controllers (DSC) requires attention to a
minimal set of device pin connections before
proceeding with development. The following is a list of
pin names, which must always be connected:
DD and VSS pins
•All V
(see Section 2.2 “Decoupling Capacitors”)
•All AV
•V
•MCLR pin
• PGECx/PGEDx pins used for In-Circuit Serial
• OSC1 and OSC2 pins when external oscillator
DD and AVSS pins (regardless if ADC module
is not used)
(see Section 2.2 “Decoupling Capacitors”)
CAP/VDDCORE
(see Section 2.3 “Capacitor on Internal Voltage
Regulator (V
(see Section 2.4 “Master Clear (MCLR) Pin”)
Programming™ (ICSP™) and debugging purposes
(see Section 2.5 “ICSP Pins”)
source is used
(see Section 2.6 “External Oscillator Pins”)
CAP/VDDCORE)”)
2.2Decoupling Capacitors
The use of decoupling capacitors on every pair of
power supply pins, such as V
SS is required.
AV
Consider the following criteria when using decoupling
capacitors:
• Value and type of cap a cito r: Reco mm endation
of 0.1 µF (100 nF), 10-20V. This capacitor should
be a low-ESR and have resonance frequency in
the range of 20 MHz and higher. It is
recommended that ceramic c apacitors be used.
• Placement on the printed circuit board: The
decoupling capacitors should be placed as close
to the pins as possible. It is recommended to
place the capacitors on the same side of the
board as the device. If space is constricted, the
capacitor can be placed on another layer on the
PCB using a via; however, ensure that the trace
length from the pin to the capacitor is within
one-quarter inch (6mm) in length.
• Handling high frequency noise: If the board is
experiencing high frequency noise, upward of
tens of MHz, add a second ceramic-type capacitor in parallel to the above described decoupling
capacitor. The value of the second capacitor can
be in the range of 0.01 µF to 0.001 µF. Place this
second capacitor next to the primary decoupling
capacitor. In high-speed circuit designs, consider
implementing a decade pair of capacitances as
close to the power and ground pins as possible.
For example, 0.1 µF in parallel with 0.001 µF.
• Maximizing performance: On the board layout
from the power supply circuit, run the power and
return traces to the decoupling cap acito rs firs t,
and then to the device pins. This ensures that the
decoupling capacitors are first in the power chain.
Equally important is to keep the trace length
between the capacitor and the power pins to a
minimum, thereby reducing PCB track
inductance.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
dsPIC33F
VDD
VSS
VDD
VSS
VSS
VDD
AVDD
AVSS
VDD
VSS
0.1 µF
Ceramic
0.1 µF
Ceramic
0.1 µF
Ceramic
0.1 µF
Ceramic
C
R
V
DD
MCLR
0.1 µF
Ceramic
VCAP/VDDCORE
10
R1
Note 1: R 10 k is recommended. A suggested
starting value is 10 k. Ensure that the
MCLR
pin VIH and VIL specifications are met.
2: R1 470 will limit any current flowing into
MCLR
from the external capacitor C, in the
event of MCLR
pin breakdown, due to
Electrostatic Discharge (ESD) or Electrical
Overstress (EOS). Ensure that the MCLR
pin
V
IH and VIL specifications are met.
C
R1
R
V
DD
MCLR
dsPIC33F
JP
FIGURE 2-1:RECOMMENDED
MINIMUM CONNECTION
2.2.1TANK CAPACITORS
On boards with power traces running longer than six
inches in length, it is suggested to use a tank capacitor
for integrated circuits including DSCs to supply a local
power source. The value of the tank capacitor should
be determined based on the trace resistance that connects the power supply source to the device, and the
maximum current drawn by the device in the application. In other words, select the tank capacitor so that it
meets the ac ceptable volta ge sag at th e device . T ypical
values range from 4.7 µF to 47 µF.
2.4Master Clear (MCLR) Pin
The MCLR pin provides for two specific device
functions:
• Device Reset
• Device programming and debugging.
During device programming and debugging, the
resistance and capacitance that can be added to the
pin must be considered. Device programmers and
debuggers drive the MCLR
specific voltage levels (V
transitions must not be adversely affected. Therefore,
specific values of R and C will need to be adjusted
based on the application and PCB requirements.
For example, as shown in Figure 2-2, it is
recommended that the capacitor C, be isolated from
the MCLR
pin during programming and debugging
operations.
Place the components shown in Figure2-2 within
one-quarter inch (6mm) from the MCLR
FIGURE 2-2:EXAMPLE OF MCLR PIN
CONNECTIONS
pin. Consequently,
IH and VIL) and fast signal
pin.
2.3Capacitor on Internal Voltage
Regulator (V
A low-ESR (< 5 Ohms) capacitor is required on the
CAP/VDDCORE pin, which is used to stabilize the
V
voltage regulator output voltage. The V
pin must not be connected to VDD, and must have a
capacitor bet ween 4.7µF and 10 µF, 16V connected to
ground. The type can be ceramic or tantalum. Refer to
Section 27.0 “Electrical Characteristics” for
additional information.
The placement of this capacitor should be close to the
CAP/VDDCORE. It is recommended that the trace
V
length not exceed one-quarter inch (6 mm). Refer to
Section 24.2 “On-Chip Voltage Regulator” for
details.
DS70591C-page 26Preliminary 2010 Microchip Technology Inc.
CAP/VDDCORE)
CAP/VDDCORE
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
13
Main Oscillator
Guard Ring
Guard Trace
Secondary
Oscillator
14
15
16
17
18
19
20
2.5ICSP Pins
The PGECx and PGEDx pins are used for In-Circuit
Serial Programming™ (ICSP™) and debugging purposes. It is recommended to keep the trace length
between the ICSP connec tor an d th e ICSP pi ns on th e
device as short as possible. If the ICSP connector is
expected to experience an ESD event, a serie s resistor
is recommended, with the value in the range of a few
tens of Ohms, not to exceed 100 Ohms.
Pull-up resistors, series diodes, and capacitors on the
PGCx and PGDx pins are not recommended as they
will interfere with the programmer/debugger communications to the device. If such discrete components are
an application requirement, they should be removed
from the circuit during programming and debugging.
Alternatively, refer to the AC/DC characteristics and
timing requirements information in the respective
device Flash programming specification for information
on capacitive loading limits and pin input voltage high
IH) and input low (VIL) requirements.
(V
Ensure that the “Communication Channel Select” (i.e.,
PGECx/PGEDx pins) programmed into the device
matches the physical connections for the ICSP to
MPLAB
ICE™.
For more information on ICD 2, ICD 3, and REAL ICE
connection requirements, refer to the following
documents that are available on the Microchip web
site.
• “MPLAB
• “Using MPLAB
• “MPLAB
• “Using MPLAB® ICD 3” (poster) DS51765
• “MPLAB® ICD 3 Design Advisory” DS51764
• “MPLAB
• “Using MPLAB
®
ICD 2, MPLAB® ICD 3, or MPLAB® REAL
®
ICD 2 In-Circuit Debugger User's
Guide” DS51331
®
®
®
ICD 2” (poster) DS51265
ICD 2 Design Advisory” DS51566
REAL ICE™ In-Circuit Debugger
User's Guide” DS51616
®
REAL ICE™” (poster) DS51749
2.6External Oscillator Pins
Many DSCs have options for at least two oscillators: a
high-frequency primary oscillator and a low-frequency
secondary oscillator (refer to Section 9.0 “OscillatorConfiguration” for details).
The oscillator circuit should be placed on the same
side of the board as the device. Also, place the
oscillator circuit close to the respective oscillator pins,
not exceeding one-half inch (12 mm) distance
between them. The load capacitors should be placed
next to the oscillator itself, on the same side of the
board. Use a grounded copper pour around the
oscillator circuit to isolate them from surrounding
circuits. The grounded copper pour should be routed
directly to the MCU ground. Do not run any signal
traces or power traces inside the ground pour. Also, if
using a two-sided board, avoid any traces on the
other side of the board where the crystal is placed. A
suggested layout is shown in Figure 2-3.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610
2.7Oscillator Value Conditions on
Device Start-up
If the PLL of the target device is enabled and
configured for the device start-up oscillator, the
maximum oscil lator source freque ncy must be limit ed
to 4 MHz < F
start-up conditions. This means that if the external
oscillator frequency is outside this range, the
application must start-up in the FRC mode first. The
default PLL settings after a POR with an oscillator
frequency outside this range will violate the device
operating speed.
Once the device powers up, the application firmware
can initialize the PLL SFR s, CLKDIV, and PLLDBF to a
suitable value, and then perform a clock switch to the
Oscillator + PLL clock source. Note that clock switching
must be enabled in the device Configuration Word.
IN < 8 MHz to comply with device PLL
2.8Configuration of Analog and
Digital Pins During ICSP
Operations
If MPLAB ICD 2, ICD 3, or R EAL ICE i s sele cted as a
debugger, it automatical ly ini tia liz es al l of the A/D input
pins (ANx) as “digital” pins, by setting all bits in the
ADPCFG and ADPCFG2 registers.
The bits in the re gister s that co rrespond to the A/D pin s
that are initialized by MPLAB ICD 2, ICD 3, or REAL
ICE, must not be cleared by the user application
firmware; otherwise, communication errors will result
between the debugger and the device.
If your application needs to use certain A/D pins as
analog input pins during the debug session, the user
application must clear the corresponding bits in the
ADPCFG and ADPCFG2 registers during initialization
of the ADC module.
When MPLAB ICD 2, ICD 3, or REAL ICE is used as a
programmer, the user application firmware must
correctly configure the ADPCFG and ADPCFG2
registers. Automatic initialization of these registers is
only done during debugger operation. Failure to
correctly configure the register(s) will result in all A/D
pins being recogn ized as a nalog inpu t pins , res ulting in
the port value being read as a logic '0', which may
affect user application functionality.
2.9Unused I/Os
Unused I/O pins s hould b e config ured as outputs and
driven to a logic-low state.
Alternatively, connect a 1k to 10k resistor to V
unused pins and drive the output to logic low.
SS on
2.10Typical Application Connection
Examples
Examples of typical applicati on connecti ons are shown
in Figure 2-4 through Figure 2-11.
DS70591C-page 28Preliminary 2010 Microchip Technology Inc.
dsPIC33FJ32GS406/606/608/610 and dsPIC33FJ64GS406/606/608/610