dsPIC33EPXXGS202 FAMILY
16-Bit Digi
tal Signal Controllers for Digital Power Applications with
Interconne
cted High-Speed PWM, ADC, PGA and Comparators
Operating Conditions
• 3.0V to 3.6V, -40°C to +85°C, DC to 70 MIPS
• 3.0V to 3.6V, -40°C to +125°C, DC to 60 MIPS
Advanced Analog Features
• High-Speed ADC module:
- 12-bit with 2 dedicated SAR ADC cores and
one shared SAR ADC core
- Up to 3.25 Msps conversion rate per ADC core @
12-bit resolution
- Dedicated result buffer for each analog
channel
- Flexible and independent ADC trigger
sources
- Two digital comparators
- One oversampling filter
• Two Rail-to-Rail Comparators with Hysteresis:
- Dedicated 12-bit Digital-to-Analog Converter
(DAC) for each analog comparator
• Two Programmable Gain Amplifiers:
- Single-ended or independent ground
reference
- Five selectable gains (4x, 8x, 16x, 32x
and 64x)
- 40 MHz gain bandwidth
Flash Architecture
• 16 Kbytes-32 Kbytes of Program Flash
Core: 16-Bit dsPIC33E CPU
Code-Efficient (C and Assembly) Architecture
Two 40-Bit Wide Accumulators
Single-Cycle (MAC/MPY) with Dual Data Fetch
Single-Cycle Mixed-Sign MUL Plus
Hardware Divide
• 32-Bit Multiply Support
• Two Additional Working Register Sets (reduces
context switching)
•
•
•
•
Clock Management
•
•
•
•
•
±0.9% Internal Oscillator
Programmable PLLs and Oscillator Clock Sources
Fail-Safe Clock Monitor (FSCM)
Independent Watchdog Timer (WDT)
Fast Wake-up and Start-up
Interconnected SMPS Peripherals
• Reduces CPU Interaction to Improve Performance
• Flexible PWM Trigger Options for
ADC Conversions
• High-Speed Comparator Truncates PWM
(15 ns typical):
- Supports Cycle-by-Cycle Current mode control
- Current Reset mode (variable frequency)
Power Management
• Low-Power Management modes (Sleep,
Idle, Doze)
• Integrated Power-on Reset and Brown-out Reset
• 0.5 mA/MHz Dynamic Current (typical)
• 10
μA
I
PD
Current (typical)
High-Speed PWM
• Three PWM Generators (two outputs per
generator)
• Individual Time Base and Duty Cycle for each PWM
• 1.04 ns PWM Resolution (frequency, duty cycle,
dead time and phase)
• Supports Center-Aligned, Redundant, Complementary
and True Independent Output modes
• Independent Fault and Current-Limit Inputs
• Output Override Control
• PWM Support for:
- AC/DC, DC/DC, inverters, PFC, lighting
Timers/Output Compare/Input Capture
• Three 16-Bit and up to Two 32-Bit Timers/
Counters
• One Output Compare (OC) module, Configurable
as Timers/Counters
• One Input Capture (IC) module
2015-2016 Microchip Technology Inc.
DS70005208D-page 1
dsPIC33EPXXGS202 FAMILY
Communication Interfaces
• One UART module (15 Mbps):
- Supports LIN/J2602 protocols and IrDA
®
• One 4-Wire SPI module (15 Mbps)
• One I
2
C module (up to 1 Mbaud) with SMBus
Support
Qualification and Class B Support
• AEC-Q100 REVG (Grade 1, -40°C to +125°C)
• Class B Safety Library, IEC 60730
• 4x4x0.6 mm and 6x6x0.5 mm UQFN Packages
are Designed and Optimized to ease IPC9592B
2nd Level Temperature Cycle Qualification
Input/Output
• Sink/Source up to 12mA/15mA, respectively;
Pin-Specific for Standard V
OH
/V
OL
• 5V Tolerant Pins
• Selectable Open-Drain, Pull-ups and Pull-Downs
• External Interrupts on All I/O Pins
• Peripheral Pin Select (PPS) to allow Function
Remap with Six Virtual I/Os
Debugger Development Support
• In-Circuit and In-Application Programming
• Three Program and One Complex
Data Breakpoint
• IEEE 1149.2 Compatible (JTAG) Boundary Scan
• Trace and Run-Time Watch
TABLE 1:
dsPIC33EPXXGS202 FAMILY DEVICES
Program Memory Bytes
Remappable Peripherals
External Interrupts
(2)
Analog Comparator
General Purpose I/O (GPIO)
Output Compare
ADC Inputs
RAM Bytes
ADC Cores
Input Capture
UART
dsPIC33EP16GS202
dsPIC33EP32GS202
Note 1:
2:
28
28
16K
32K
2K
2K
3
3
1
1
1
1
1
1
SPI
Device
1
1
3
3
3x2
3x2
12
12
1
1
3
3
2
2
2
2
21 SSOP, SOIC, QFN-S,
UQFN (4x4 mm),
21
UQFN (6x6 mm)
The external clock for Timer1, Timer2 and Timer3 is remappable.
INT0 is not remappable; INT1 and INT2 are remappable.
DS70005208D-page 2
2015-2016 Microchip Technology Inc.
Packages
Timers
(1)
PWM
PGA
Pins
I
2
C
dsPIC33EPXXGS202 FAMILY
Pin Diagrams
28-Pin SOIC,
28-Pin SSOP
= Pins are up to 5V tolerant
MCLR
RA0
RA1
RA2
RB0
RB9
RB10
V
SS
RB1
RB2
RB3
RB4
V
DD
RB8
1
2
3
4
28
27
26
25
AV
DD
AV
SS
RA3
RA4
RB14
RB13
RB12
RB11
V
CAP
V
SS
RB7
RB6
RB5
RB15
dsPIC33EPXXGS202
5
6
7
8
9
10
11
12
13
14
24
23
22
21
20
19
18
17
16
15
PIN FUNCTION DESCRIPTIONS
Pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
MCLR
AN0/PGA1P1/CMP1A/RA0
AN1/PGA1P2/PGA2P1/CMP1B/RA1
AN2/PGA1P3/PGA2P2/CMP1C/CMP2A/RA2
AN3/PGA2P3/CMP1D/CMP2B/RP32/RB0
AN4/CMP2C/RP41/RB9
AN5/CMP2D/RP42/RB10
V
SS
OSC1/CLKI/AN6/RP33/RB1
OSC2/CLKO/AN7/PGA1N2/RP34/RB2
PGED2/AN8/INT0/RP35/RB3
PGEC2/ADTRG31/RP36/RB4
V
DD
PGED3/RP40/RB8
Pin Function
Pin
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Pin Function
PGEC3/RP47/RB15
TDO/AN9/PGA2N2/RP37/RB5
PGED1/TDI/AN10/SCL1/RP38/RB6
PGEC1/AN11/SDA1/RP39/RB7
V
SS
V
CAP
TMS/PWM3H/RP43/RB11
TCK/PWM3L/RP44/RB12
PWM2H/RP45/RB13
PWM2L/RP46/RB14
PWM1H/RA4
PWM1L/RA3
AV
SS
AV
DD
Legend:
Shaded pins are up to 5 VDC tolerant.
Note:
RPn
represents remappable peripheral functions. See
Table 10-1
and
Table 10-2
for the complete list of remappable sources.
2015-2016 Microchip Technology Inc.
DS70005208D-page 3
dsPIC33EPXXGS202 FAMILY
Pin Diagrams (Continued)
28-Pin UQFN 4x4 mm, 28-Pin UQFN 6x6 mm,
28-Pin QFN-S 6x6 mm
= Pins are up to 5V tolerant
MCLR
AV
DD
AV
SS
RA1
RA0
RA3
28 27 26 25 24 23 22
RA2
RB0
RB9
RB10
V
SS
RB1
RB2
RA4
21
20
19
1
2
3
4
5
6
7
8
RB3
9
RB4
10 11 12 13 14
RB8
RB5
RB15
RB6
V
DD
RB14
RB13
RB12
RB11
V
CAP
V
SS
RB7
dsPIC33EPXXGS202
18
17
16
15
PIN FUNCTION DESCRIPTIONS
Pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Pin Function
AN2/PGA1P3/PGA2P2/CMP1C/CMP2A/RA2
AN3/PGA2P3/CMP1D/ CMP28/RP32/RB0
AN4/CMP2C/RP41/RB9
AN5/CMP2D/RP42/RB10
V
SS
OSC1/CLKI/AN6/RP33/RB1
OSC2/CLKO/AN7/PGA1N2/RP34/RB2
PGED2/AN8/INT0/RP35/RB3
PGEC2/ADTRG31/RP36/RB4
V
DD
PGED3/RP40/RB8
PGEC3/RP47/RB15
TDO/AN9/PGA2N2/RP37/RB5
PGED1/TDI/AN10/SCL1/RP38/RB6
Pin
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Pin Function
PGEC1/AN11/SDA1/RP39/RB7
V
SS
V
CAP
TMS/PWM3H/RP43/RB11
TCK/PWM3L/RP44/RB12
PWM2H/RP45/RB13
PWM2L/RP46/RB14
PWM1H/RA4
PWM1L/RA3
AV
SS
AV
DD
MCLR
AN0/PGA1P1/CMP1A/RA0
AN1/PGA1P2/PGA2P1/CMP1B/RA1
Legend:
Shaded pins are up to 5 VDC tolerant.
Note:
RPn
represents remappable peripheral functions. See
Table 10-1
and
Table 10-2
for the complete list of remappable sources.
DS70005208D-page 4
2015-2016 Microchip Technology Inc.
dsPIC33EPXXGS202 FAMILY
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 Guidelines for Getting Started with 16-Bit Digital Signal Controllers.......................................................................................... 11
3.0 CPU............................................................................................................................................................................................ 17
4.0 Memory Organization ................................................................................................................................................................. 27
5.0 Flash Program Memory.............................................................................................................................................................. 61
6.0 Resets ....................................................................................................................................................................................... 69
7.0 Interrupt Controller ..................................................................................................................................................................... 73
8.0 Oscillator Configuration .............................................................................................................................................................. 87
9.0 Power-Saving Features.............................................................................................................................................................. 99
10.0 I/O Ports ................................................................................................................................................................................... 107
11.0 Timer1 ...................................................................................................................................................................................... 133
12.0 Timer2/3 .................................................................................................................................................................................. 137
13.0 Input Capture............................................................................................................................................................................ 141
14.0 Output Compare....................................................................................................................................................................... 145
15.0 High-Speed PWM..................................................................................................................................................................... 151
16.0 Serial Peripheral Interface (SPI)............................................................................................................................................... 177
17.0 Inter-Integrated Circuit (I
2
C) ..................................................................................................................................................... 185
18.0 Universal Asynchronous Receiver Transmitter (UART) ........................................................................................................... 193
19.0 High-Speed, 12-Bit Analog-to-Digital Converter (ADC)............................................................................................................ 199
20.0 High-Speed Analog Comparator .............................................................................................................................................. 229
21.0 Programmable Gain Amplifier (PGA) ....................................................................................................................................... 235
22.0 Special Features ...................................................................................................................................................................... 239
23.0 Instruction Set Summary .......................................................................................................................................................... 251
24.0 Development Support............................................................................................................................................................... 261
25.0 Electrical Characteristics .......................................................................................................................................................... 265
26.0 DC and AC Device Characteristics Graphs.............................................................................................................................. 311
27.0 Packaging Information.............................................................................................................................................................. 315
Appendix A: Revision History............................................................................................................................................................. 331
Index ................................................................................................................................................................................................. 333
The Microchip Web Site ..................................................................................................................................................................... 339
Customer Change Notification Service .............................................................................................................................................. 339
Customer Support .............................................................................................................................................................................. 339
Product Identification System ............................................................................................................................................................ 341
2015-2016 Microchip Technology Inc.
DS70005208D-page 5