PIC24FJ128GA010 FAMILY
64/80/100-Pin, General Purpose, 16-Bit Flash Microcontrollers
High-Performance CPU:
• Modified Harvard Architecture
• Up to 16 MIPS Operation @ 32 MHz
• 8 MHz Internal Oscillator with 4x PLL Option and
Multiple Divide Options
• 17-Bit x 17-Bit Single-Cycle Hardware
Multiplier
• 32-Bit by 16-Bit Hardware Divider
• 16 x 16-Bit Working Register Array
• C Compiler Optimized Instruction Set Architecture:
- 76 base instructions
- Flexible addressing modes
• Two Address Generation Units for Separate Read
and Write Addressing of Data Memory
Analog Features:
• 10-Bit, Up to 16-Channel Analog-to-Digital Converter
- 500 ksps conversion rate
- Conversion available during Sleep and Idle
• Dual Analog Comparators with Programmable
Input/Output Configuration
Peripheral Features:
• Two 3-Wire/4-Wire SPI modules, Supporting
4 Frame modes with 8-Level FIFO Buffer
• Two I
2
C™ modules Support Multi-Master/Slave
mode and 7-Bit/10-Bit Addressing
• Two UART modules:
- Supports RS-232, RS-485 and LIN/J2602
- On-chip hardware encoder/decoder for IrDA
®
- Auto-wake-up on Start bit
- Auto-Baud Detect
- 4-level FIFO buffer
• Parallel Master Slave Port (PMP/PSP):
- Supports 8-bit or 16-bit data
- Supports 16 address lines
• Hardware Real-Time Clock/Calendar (RTCC):
- Provides clock, calendar and alarm functions
• Programmable Cyclic Redundancy Check (CRC)
- User-programmable polynomial
- 8/16-level FIFO buffer
• Five 16-Bit Timers/Counters with Programmable
Prescaler
• Five 16-Bit Capture Inputs
• Five 16-Bit Compare/PWM Outputs
• High-Current Sink/Source (18 mA/18 mA) on All
I/O Pins
• Configurable, Open-Drain Output on Digital I/O Pins
• Up to 5 External Interrupt Sources
• 5.5V Tolerant Input (digital pins only)
Special Microcontroller Features:
• Operating Voltage Range of 2.0V to 3.6V
• Flash Program Memory:
- 1000 erase/write cycles
- 20-year data retention minimum
• Self-Reprogrammable under Software Control
• Selectable Power Management modes:
- Sleep, Idle and Alternate Clock modes
• Fail-Safe Clock Monitor Operation:
- Detects clock failure and switches to on-chip,
low-power RC oscillator
• On-Chip 2.5V Regulator
• JTAG Boundary Scan and Programming Support
• Power-on Reset (POR), Power-up Timer (PWRT)
and Oscillator Start-up Timer (OST)
• Flexible Watchdog Timer (WDT) with On-Chip,
Low-Power RC Oscillator for Reliable Operation
• In-Circuit Serial Programming™ (ICSP™) and
In-Circuit Emulation (ICE) via 2 Pins
Compare/
PWM Output
Comparators
Device
Pins
Program
Memory
(Bytes)
64K
96K
128K
64K
96K
128K
64K
96K
128K
PMP/PSP
Y
Y
Y
Y
Y
Y
Y
Y
Y
Capture
Input
UART
SRAM
(Bytes)
Timers
16-Bit
SPI
I
2
C™
10-Bit
A/D (ch)
PIC24FJ64GA006
PIC24FJ96GA006
PIC24FJ128GA006
PIC24FJ64GA008
PIC24FJ96GA008
PIC24FJ128GA008
PIC24FJ64GA010
PIC24FJ96GA010
PIC24FJ128GA010
64
64
64
80
80
80
100
100
100
8K
8K
8K
8K
8K
8K
8K
8K
8K
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
16
16
16
16
16
16
16
16
16
2
2
2
2
2
2
2
2
2
2005-2012 Microchip Technology Inc.
DS39747F-page 1
JTAG
Y
Y
Y
Y
Y
Y
Y
Y
Y
PIC24FJ128GA010 FAMILY
Pin Diagrams
64-Pin TQFP/QFN
(1)
PMD4/RE4
PMD3/RE3
PMD2/RE2
PMD1/RE1
PMD0/RE0
RF1
RF0
ENVREG
V
CAP
/V
DDCORE
CN16/RD7
CN15/RD6
PMRD/CN14/RD5
PMWR/OC5/IC5/CN13/RD4
PMBE/OC4/RD3
OC3/RD2
OC2/RD1
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PMD5/RE5
PMD6/RE6
PMD7/RE7
PMA5/SCK2/CN8/RG6
PMA4/SDI2/CN9/RG7
PMA3/SDO2/CN10/RG8
MCLR
PMA2/SS2/CN11/RG9
V
SS
V
DD
C1IN+/AN5/CN7/RB5
C1IN-/AN4/CN6/RB4
C2IN+/AN3/CN5/RB3
C2IN-/AN2/SS1/CN4/RB2
PGC1/EMUC1/V
REF
-/AN1/CN3/RB1
PGD1/EMUD1/PMA6/V
REF
+/AN0/CN2/RB0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SOSCO/T1CK/CN0/RC14
SOSCI/CN1/RC13
OC1/RD0
IC4/PMCS1/INT4/RD11
IC3/PMCS2/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/RTCC/INT1/RD8
Vss
OSC2/CLKO/RC15
OSC1/CLKI/RC12
V
DD
SCL1/RG2
SDA1/RG3
U1RTS/BCLK1/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PIC24FJXXGA006
PIC24FJXXXGA006
Legend:
Note 1:
Shaded pins indicate pins that are tolerant to up to +5.5 VDC.
Bottom pad of QFN package must be connected to V
SS
.
PGC2/EMUC2/AN6/OCFA/RB6
PGD2/EMUD2/AN7/RB7
AV
DD
AV
SS
U2CTS/C1OUT/AN8/RB8
PMA7/C2OUT/AN9/RB9
TMS/PMA13/CV
REF
/AN10/RB10
TDO/PMA12/AN11/RB11
V
SS
V
DD
TCK/PMA11/AN12/RB12
TDI/PMA10/AN13/RB13
PMA1/U2RTS/BCLK2/AN14/RB14
PMA0/AN15/OCFB/CN12/RB15
PMA9/U2RX/SDA2/CN17/RF4
PMA8/U2TX/SCL2/CN18/RF5
DS39747F-page 2
2005-2012 Microchip Technology Inc.
PIC24FJ128GA010 FAMILY
Pin Diagrams (Continued)
80-Pin TQFP
PMD4/RE4
PMD3/RE3
PMD2/RE2
PMD1/RE1
PMD0/RE0
RG0
RG1
RF1
RF0
ENVREG
V
CAP
/V
DDCORE
CN16/RD7
CN15/RD6
PMRD/CN14/RD5
PMWR/OC5/CN13/RD4
CN19/RD13
IC5/RD12
PMBE/OC4/RD3
OC3/RD2
OC2/RD1
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
PMD5/RE5
PMD6/RE6
PMD7/RE7
T2CK/RC1
T4CK/RC3
PMA5/SCK2/CN8/RG6
PMA4/SDI2/CN9/RG7
PMA3/SDO2/CN10/RG8
MCLR
PMA2/SS2/CN11/RG9
V
SS
V
DD
TMS/INT1/RE8
TDO/INT2/RE9
C1IN+/AN5/CN7/RB5
C1IN-/AN4/CN6/RB4
C2IN+/AN3/CN5/RB3
C2IN-/AN2/SS1/CN4/RB2
PGC1/EMUC1/AN1/CN3/RB1
PGD1/EMUD1/AN0/CN2/RB0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
SOSCO/T1CK/CN0/RC14
SOSCI/CN1/RC13
OC1/RD0
IC4/PMCS1/RD11
IC3/PMCS2/RD10
IC2/RD9
IC1/RTCC/RD8
SDA2/INT4/RA15
SCL2/INT3/RA14
V
SS
OSC2/CLKO/RC15
OSC1/CLKI/RC12
V
DD
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PIC24FJXXGA008
PIC24FJXXXGA008
Legend:
Shaded pins indicate pins that are tolerant to up to +5.5 VDC.
2005-2012 Microchip Technology Inc.
PGC2/EMUC2/AN6/OCFA/RB6
PGD2/EMUD2/AN7/RB7
PMA7/V
REF
-/RA9
PMA6/V
REF
+/RA10
AV
DD
AV
SS
U2CTS/C1OUT/AN8/RB8
C2OUT/AN9/RB9
PMA13/CV
REF
/AN10/RB10
PMA12/AN11/RB11
V
SS
V
DD
TCK/PMA11/AN12/RB12
TDI/PMA10/AN13/RB13
PMA1/U2RTS/BCLK2/AN14/RB14
PMA0/AN15/OCFB/CN12/RB15
U1CTS/CN20/RD14
U1RTS/BCLK1/CN21/RD15
PMA9/U2RX/CN17/RF4
PMA8/U2TX/CN18/RF5
DS39747F-page 3
PIC24FJ128GA010 FAMILY
Pin Diagrams (Continued))
100-Pin TQFP
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
80
79
78
77
76
PMD4/RE4
PMD3/RE3
PMD2/RE2
RG13
RG12
RG14
PMD1/RE1
PMD0/RE0
RA7
RA6
RG0
RG1
RF1
RF0
ENVREG
V
CAP
/V
DDCORE
CN16/RD7
CN15/RD6
PMRD/CN14/RD5
PMWR/OC5/CN13/RD4
CN19/RD13
IC5/RD12
PMBE/OC4/RD3
OC3/RD2
OC2/RD1
RG15
V
DD
PMD5/RE5
PMD6/RE6
PMD7/RE7
T2CK/RC1
T3CK/RC2
T4CK/RC3
T5CK/RC4
PMA5/SCK2/CN8/RG6
PMA4/SDI2/CN9/RG7
PMA3/SDO2/CN10/RG8
MCLR
PMA2/SS2/CN11/RG9
V
SS
V
DD
TMS/RA0
INT1/RE8
INT2/RE9
C1IN+/AN5/CN7/RB5
C1IN-/AN4/CN6/RB4
C2IN+/AN3/CN5/RB3
C2IN-/AN2/SS1/CN4/RB2
PGC1/EMUC1/AN1/CN3/RB1
PGD1/EMUD1/AN0/CN2/RB0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PIC24FJXXGA010
PIC24FJXXXGA010
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
V
SS
SOSCO/T1CK/CN0/RC14
SOSCI/CN1/RC13
OC1/RD0
IC4/PMCS1/RD11
IC3/PMCS2/RD10
IC2/RD9
IC1/RTCC/RD8
INT4/RA15
INT3/RA14
V
SS
OSC2/CLKO/RC15
OSC1/CLKI/RC12
V
DD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
Legend:
Shaded pins indicate pins that are tolerant to up to +5.5 VDC.
DS39747F-page 4
PGC2/EMUC2/AN6/OCFA/RB6
PGD2/EMUD2/AN7/RB7
PMA7/V
REF
-/RA9
PMA6/V
REF
+/RA10
AV
DD
AV
SS
C1OUT/AN8/RB8
C2OUT/AN9/RB9
PMA13/CV
REF
/AN10/RB10
PMA12/AN11/RB11
V
SS
V
DD
TCK/RA1
U2RTS/BCLK2/RF13
U2CTS/RF12
PMA11/AN12/RB12
PMA10/AN13/RB13
PMA1/AN14/RB14
PMA0/AN15/OCFB/CN12/RB15
V
SS
V
DD
U1CTS/CN20/RD14
U1RTS/BCLK1/CN21/RD15
PMA9/U2RX/CN17/RF4
PMA8/U2TX/CN18/RF5
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
2005-2012 Microchip Technology Inc.
PIC24FJ128GA010 FAMILY
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 Guidelines for Getting Started with 16-bit Microcontrollers ........................................................................................................ 19
3.0 CPU............................................................................................................................................................................................ 25
4.0 Memory Organization ................................................................................................................................................................. 31
5.0 Flash Program Memory.............................................................................................................................................................. 51
6.0 Resets ........................................................................................................................................................................................ 57
7.0 Interrupt Controller ..................................................................................................................................................................... 63
8.0 Oscillator Configuration .............................................................................................................................................................. 97
9.0 Power-Saving Features............................................................................................................................................................ 105
10.0 I/O Ports ................................................................................................................................................................................... 107
11.0 Timer1 ...................................................................................................................................................................................... 111
12.0 Timer2/3 and Timer4/5 ............................................................................................................................................................ 113
13.0 Input Capture............................................................................................................................................................................ 119
14.0 Output Compare....................................................................................................................................................................... 121
15.0 Serial Peripheral Interface (SPI)............................................................................................................................................... 127
16.0 Inter-Integrated Circuit (I
2
C™) ................................................................................................................................................. 137
17.0 Universal Asynchronous Receiver Transmitter (UART) ........................................................................................................... 145
18.0 Parallel Master Port (PMP)....................................................................................................................................................... 153
19.0 Real-Time Clock and Calendar (RTCC)................................................................................................................................... 163
20.0 Programmable Cyclic Redundancy Check (CRC) Generator .................................................................................................. 175
21.0 10-bit High-Speed A/D Converter............................................................................................................................................. 179
22.0 Comparator Module.................................................................................................................................................................. 189
23.0 Comparator Voltage Reference................................................................................................................................................ 193
24.0 Special Features ...................................................................................................................................................................... 195
25.0 Instruction Set Summary .......................................................................................................................................................... 205
26.0 Development Support............................................................................................................................................................... 213
27.0 Electrical Characteristics .......................................................................................................................................................... 217
28.0 Packaging Information.............................................................................................................................................................. 231
Appendix A: Revision History............................................................................................................................................................. 245
Index ................................................................................................................................................................................................. 247
The Microchip Web Site ..................................................................................................................................................................... 251
Customer Change Notification Service .............................................................................................................................................. 251
Customer Support .............................................................................................................................................................................. 251
Reader Response .............................................................................................................................................................................. 252
Product Identification System ............................................................................................................................................................ 253
2005-2012 Microchip Technology Inc.
DS39747F-page 5