Professional Documents
Culture Documents
DEVICE OVERVIEW
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
PIC24HJ64GP206
PIC24HJ64GP210
PIC24HJ64GP506
PIC24HJ64GP510
PIC24HJ128GP206
PIC24HJ128GP210
PIC24HJ128GP306
PIC24HJ128GP310
PIC24HJ128GP506
PIC24HJ128GP510
PIC24HJ256GP206
PIC24HJ256GP210
PIC24HJ256GP610
dsPIC33FJ12GP201
dsPIC33FJ12GP202
dsPIC33FJ12MC201
dsPIC33FJ12MC202
PIC24HJ12GP201
PIC24HJ12GP202
2.0
PROGRAMMING OVERVIEW
OF THE dsPIC33F/PIC24H
Preliminary
DS70152D-page 1
PROGRAMMING SYSTEM
OVERVIEW FOR
ENHANCED ICSP
FIGURE 2-2:
3.3V
dsPIC33F/PIC24H
Programmer
dsPIC33F/PIC24H
Programming
Executive
VDD
VDDCORE
CF
VSS
On-Chip Memory
Note 1:
2.1
Power Requirements
All devices in the dsPIC33F/PIC24H family are dual voltage supply designs: one supply for the core and another
for the peripherals and I/O pins. A regulator is provided
on-chip to alleviate the need for two external voltage
supplies.
All of the dsPIC33F/PIC24H devices power their core
digital logic at a nominal 2.5V. To simplify system
design, all devices in the dsPIC33F/PIC24H Programming Specification family incorporate an on-chip regulator that allows the device to run its core logic from
VDD.
2.2
Note:
DS70152D-page 2
Preliminary
A program memory word can be programmed twice before an erase, but only
if (a) the same data is used in both program operations or (b) bits containing 1
are set to 0 but no 0 is set to 1.
Pin Diagrams
TABLE 2-1:
Pin Name
MCLR
VDD and AVDD(1)
VSS and
AVSS(1)
VDDCORE
Pin Name
Pin Type
Pin Description
MCLR
Programming Enable
VDD
Power Supply
VSS
Ground
VDDCORE
PGC1
PGC1
PGD1
PGD1
I/O
PGC2
PGC2
PGD2
PGD2
I/O
PGC3
PGC3
PGD3
PGD3
I/O
Preliminary
DS70152D-page 3
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
CSDO/RG13
CSDI/RG12
CSCK/RG14
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ64GP206
dsPIC33FJ128GP206
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/CN17/RF4
U2TX/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
COFS/RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
DS70152D-page 4
Preliminary
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
CSDO/RG13
CSDI/RG12
CSCK/RG14
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ64GP306
dsPIC33FJ128GP306
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
COFS/RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
Preliminary
DS70152D-page 5
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
CSDO/RG13
CSDI/RG12
CSCK/RG14
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ256GP506
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
COFS/RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
DS70152D-page 6
Preliminary
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
CSDO/RG13
CSDI/RG12
CSCK/RG14
C2RX/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ64GP706
dsPIC33FJ128GP706
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
COFS/RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
Preliminary
DS70152D-page 7
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
IC6/CN19/RD13
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
C2RX/RG0
C2TX/RG1
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
CSCK/RG14
AN23/CN23/RA7
AN22/CN22/RA6
80
79
78
77
76
CSDO/RG13
CSDI/RG12
80-Pin TQFP
COFS/RG15
60
PGC2/EMUC2/SOSCO/T1CK/
CN0/RC14
AN16/T2CK/T7CK/RC1
59
PGD2/EMUD2/SOSCI/CN1/RC13
AN17/T3CK/T6CK/RC2
58
OC1/RD0
57
56
IC4/RD11
IC3/RD10
55
IC2/RD9
IC1/RD8
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
54
SDO2/CN10/RG8
53
SDA2/INT4/RA3
MCLR
52
SCL2/INT3/RA2
VSS
SS2/CN11/RG9
VSS
10
VDD
12
TMS/AN20/INT1/RA12
TDO/AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
PGD3/EMUD3/AN0/CN2/RB0
DS70152D-page 8
51
dsPIC33FJ64GP708
dsPIC33FJ128GP708
44
SCK1/INT0/RF6
SDI1/RF7
18
43
SDO1/RF8
19
42
U1RX/RF2
20
41
U1TX/RF3
24
25
26
27
28
29
30
31
32
33
34
VREF-/RA9
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
22
PGD1/EMUD1/AN7/RB7
VREF+/RA10
21
PGC1/EMUC1/AN6/OCFA/RB6
23
Preliminary
40
45
39
16
17
U2TX/CN18/RF5
SDA1/RG3
U2RX/CN17/RF4
46
IC8/U1RTS/CN21/RD15
SCL1/RG2
15
38
VDD
47
37
48
14
36
13
35
OSC1/CLKIN/RC12
U2RTS/AN14/RB14
OSC2/CLKO/RC15
49
AN15/OCFB/CN12/RB15
IC7/U1CTS/CN20/RD14
50
11
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
AN28/RE4
AN27/RE3
AN26/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
13
14
15
16
17
18
19
20
21
22
23
24
25
71
70
69
68
67
66
dsPIC33FJ64GP310
dsPIC33FJ128GP310
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
IC2/RD9
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
Preliminary
DS70152D-page 9
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
AN28/RE4
AN27/RE3
AN26/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
13
14
15
16
17
18
19
20
21
22
23
24
25
71
70
69
68
67
66
dsPIC33FJ256GP510
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
IC2/RD9
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
DS70152D-page 10
Preliminary
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
AN28/RE4
AN27/RE3
AN26/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
C2RX/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
13
14
15
16
17
18
19
20
21
22
23
24
25
71
70
69
68
67
66
dsPIC33FJ64GP710
dsPIC33FJ128GP710
dsPIC33FJ256GP710
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
IC2/RD9
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
Preliminary
DS70152D-page 11
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
PWM3L/RE4
PWM2H/RE3
PWM2L/RE2
PWM1H/RE1
PWM1L/RE0
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/UPDN/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ64MC506
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/FLTB/INT2/RD9
IC1/FLTA/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/CN17/RF4
U2TX/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PWM3H/RE5
PWM4L/RE6
PWM4H/RE7
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/QEB/IC8/CN7/RB5
AN4/QEA/IC7/CN6/RB4
AN3/INDX/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
DS70152D-page 12
Preliminary
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
PWM3L/RE4
PWM2H/RE3
PWM2L/RE2
PWM1H/RE1
PWM1L/RE0
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/UPDN/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dsPIC33FJ128MC506
dsPIC33FJ64MC506
dsPIC33FJ128MC706
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/FLTB/INT2/RD9
IC1/FLTA/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PWM3H/RE5
PWM4L/RE6
PWM4H/RE7
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/QEB/IC8/CN7/RB5
AN4/QEA/IC7/CN6/RB4
AN3/INDX/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
Preliminary
DS70152D-page 13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
CRX2/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/UPDN/RD7
PWM1L/RE0
PWM2L/RE2
PWM1H/RE1
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
PWM3L/RE4
PWM2H/RE3
80-Pin TQFP
PWM3H/RE5
60
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PWM4L/RE6
59
PGD2/EMUD2/SOSCI/CN1/RC13
OC1/RD0
PWM4H/RE7
58
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
57
56
IC4/RD11
IC3/RD10
55
IC2/RD9
SDI2/CN9/RG7
54
IC1/RD8
SDO2/CN10/RG8
MCLR
53
INT4/RA3
INT3/RA2
VSS
52
SS2/CN11/RG9
VSS
10
51
VDD
12
49
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
TMS/FLTA/INT1/RE8
13
48
VDD
TDO/FLTB/INT2/RE9
14
47
SCL1/RG2
AN5/QEB/CN7/RB5
AN4/QEA/CN6/RB4
15
46
SDA1/RG3
16
45
SCK1/INT0/RF6
AN3/INDX/CN5/RB3
17
44
SDI1/RF7
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
18
43
SDO1/RF8
19
42
U1RX/RF2
PGD3/EMUD3/AN0/CN2/RB0
20
41
U1TX/RF3
DS70152D-page 14
dsPIC33FJ64MC508
34
40
33
TDI/AN13/RB13
39
32
TCK/AN12/RB12
U2TX/CN18/RF5
31
VDD
U2RX/CN17/RF4
30
VSS
38
29
AN11/RB11
37
28
AN9/RB9
AN10/RB10
IC8/U1RTS/CN21/RD15
27
U2CTS/AN8/RB8
36
26
AVSS
35
25
AVDD
U2RTS/AN14/RB14
24
Preliminary
50
AN15/OCFB/CN12/RB15
IC7/U1CTS/CN20/RD14
23
VREF-/RA9
22
PGD1/EMUD1/AN7/RB7
VREF+/RA10
21
PGC1/EMUC1/AN6/OCFA/RB6
11
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
CRX2/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/UPDN/RD7
OC7/CN15/RD6
PWM2L/RE2
PWM1H/RE1
PWM1L/RE0
PWM2H/RE3
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
PWM3L/RE4
80-Pin TQFP
PWM3H/RE5
60
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PWM4L/RE6
59
PGD2/EMUD2/SOSCI/CN1/RC13
PWM4H/RE7
58
OC1/RD0
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
57
56
IC4/RD11
IC3/RD10
55
IC2/RD9
SDI2/CN9/RG7
54
IC1/RD8
53
SDA2/INT4/RA3
SCL2/INT3/RA2
VSS
SDO2/CN10/RG8
MCLR
52
SS2/CN11/RG9
VSS
10
51
VDD
12
49
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
dsPIC33FJ128MC708
11
50
29
30
31
32
33
34
35
36
37
38
39
40
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
U2TX/CN18/RF5
U1TX/RF3
AN11/RB11
41
28
20
AN9/RB9
U1RX/RF2
PGD3/EMUD3/AN0/CN2/RB0
AN10/RB10
SDO1/RF8
42
27
43
19
26
18
U2CTS/AN8/RB8
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
25
SDI1/RF7
AVSS
SCK1/INT0/RF6
44
AVDD
45
17
24
16
AN3/INDX/CN5/RB3
VREF+/RA10
SDA1/RG3
23
46
VREF-/RA9
SCL1/RG2
15
22
47
21
48
14
PGD1/EMUD1/AN7/RB7
13
PGC1/EMUC1/AN6/OCFA/RB6
TMS/FLTA/INT1/RE8
TDO/FLTB/INT2/RE9
AN5/QEB/CN7/RB5
AN4/QEA/CN6/RB4
Preliminary
DS70152D-page 15
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
PWM3L/RE4
PWM2H/RE3
PWM2L/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
PWM1H/RE1
PWM1L/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/UPDN//CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
PWM3H/RE5
PWM4L/RE6
PWM4H/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/FLTA/INT1/RE8
AN21/FLTB/INT2/RE9
AN5/QEB/CN7/RB5
AN4/QEA/CN6/RB4
AN3/INDX/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
IC2/RD9
71
70
69
68
67
66
13
14
15
16
17
18
19
20
21
22
23
24
25
dsPIC33FJ64MC510
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
RA3
RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
DS70152D-page 16
Preliminary
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
PWM3L/RE4
PWM2H/RE3
PWM2L/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
PWM1H/RE1
PWM1L/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/UPDN//CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
PWM3H/RE5
PWM4L/RE6
PWM4H/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/FLTA/INT1/RE8
AN21/FLTB/INT2/RE9
AN5/QEB/CN7/RB5
AN4/QEA/CN6/RB4
AN3/INDX/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
IC2/RD9
71
70
69
68
67
66
13
14
15
16
17
18
19
20
21
22
23
24
25
dsPIC33FJ128MC510
dsPIC33FJ256MC510
65
64
63
62
61
60
59
58
57
56
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
55
54
53
52
SCK1/INT0/RF6
51
U1TX/RF3
SDI1/RF7
SDO1/RF8
U1RX/RF2
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
Preliminary
DS70152D-page 17
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
PWM3L/RE4
PWM2H/RE3
PWM2L/RE2
CSDO/RG13
CSDI/RG12
CSCK/RG14
PWM1H/RE1
PWM1L/RE0
AN23/CN23/RA7
AN22/CN22/RA6
C2RX/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/UPDN//CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
COFS/RG15
VDD
PWM3H/RE5
PWM4L/RE6
PWM4H/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/FLTA/INT1/RE8
AN21/FLTB/INT2/RE9
AN5/QEB/CN7/RB5
AN4/QEA/CN6/RB4
AN3/INDX/CN5/RB3
AN2/SS1/LVDIN/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
2
3
4
5
6
7
8
9
10
11
12
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
IC4/RD11
IC3/RD10
IC2/RD9
71
70
69
68
67
66
13
14
15
16
17
18
19
20
21
22
23
24
25
dsPIC33FJ64MC710
dsPIC33FJ128MC710
dsPIC33FJ256MC710
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
DS70152D-page 18
Preliminary
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
RG13
RG12
RG14
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PIC24HJ64GP206
PIC24HJ128GP206
PIC24HJ256GP206
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/CN17/RF4
U2TX/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
Note:
The PIC24HJ64GP206 device does not have the SCL2 and SDA2 pins.
Preliminary
DS70152D-page 19
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
RG13
RG12
RG14
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PIC24HJ128GP306
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
DS70152D-page 20
Preliminary
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
CSDO/RG13
CSDI/RG12
CSCK/RG14
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/IC6/CN14/RD5
OC5/IC5/CN13/RD4
OC4/RD3
OC3/RD2
OC2/RD1
64-Pin TQFP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PIC24HJ64GP506
PIC24HJ128GP506
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/T4CK/CN1/RC13
OC1/RD0
IC4/INT4/RD11
IC3/INT3/RD10
IC2/U1CTS/INT2/RD9
IC1/INT1/RD8
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
SCL1/RG2
SDA1/RG3
U1RTS/SCK1/INT0/RF6
U1RX/SDI1/RF2
U1TX/SDO1/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
AVDD
AVSS
U2CTS/AN8/RB8
AN9/RB9
TMS/AN10/RB10
TDO/AN11/RB11
VSS
VDD
TCK/AN12/RB12
TDI/AN13/RB13
U2RTS/AN14/RB14
AN15/OCFB/CN12/RB15
U2RX/SDA2/CN17/RF4
U2TX/SCL2/CN18/RF5
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
COFS/RG15
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/T5CK/CN11/RG9
VSS
VDD
AN5/IC8/CN7/RB5
AN4/IC7/CN6/RB4
AN3/CN5/RB3
AN2/SS1/CN4/RB2
PGC3/EMUC3/AN1/VREF-/CN3/RB1
PGD3/EMUD3/AN0/VREF+/CN2/RB0
Preliminary
DS70152D-page 21
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
AN28/RE4
AN27/RE3
AN26/RE2
RG13
RG12
RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
RF1
RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/CN4/RB2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
PGD3/EMUD3/AN0/CN2/RB0
25
VSS
73
PGD2/EMUD2/SOSCI/CN1/RC13
OC1/RD0
IC4/RD11
72
71
70
69
68
67
66
PIC24HJ64GP210
PIC24HJ128GP210
PIC24HJ128GP310
PIC24HJ256GP210
65
64
63
62
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
IC3/RD10
IC2/RD9
IC1/RD8
INT4/RA15
INT3/RA14
VSS
61
60
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
59
58
SDA2/RA3
SCL2/RA2
57
56
55
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
54
53
52
51
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGC3/EMUC3/AN1/CN3/RB1
23
24
75
74
DS70152D-page 22
Preliminary
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
AN28/RE4
AN27/RE3
AN26/RE2
RG13
RG12
RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
RG0
RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
AN3/CN5/RB3
AN2/SS1/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
75
74
VSS
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
73
PGD2/EMUD2/SOSCI/CN1/RC13
OC1/RD0
5
6
7
8
9
71
70
69
68
67
66
72
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
65
64
PIC24HJ64GP510
PIC24HJ128GP510
63
62
61
60
59
58
57
56
55
54
53
52
51
IC4/RD11
IC3/RD10
IC2/RD9
IC1/RD8
INT4/RA15
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
SDI1/RF7
SDO1/RF8
U1RX/RF2
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
PGD3/EMUD3/AN0/CN2/RB0
1
2
3
4
Preliminary
DS70152D-page 23
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
AN28/RE4
AN27/RE3
AN26/RE2
RG13
RG12
RG14
AN25/RE1
AN24/RE0
AN23/CN23/RA7
AN22/CN22/RA6
C2RX/RG0
C2TX/RG1
C1TX/RF1
C1RX/RF0
VDD
VDDCORE
OC8/CN16/RD7
OC7/CN15/RD6
OC6/CN14/RD5
OC5/CN13/RD4
IC6/CN19/RD13
IC5/RD12
OC4/RD3
OC3/RD2
OC2/RD1
100-Pin TQFP
RG15
VDD
AN29/RE5
AN30/RE6
AN31/RE7
AN16/T2CK/T7CK/RC1
AN17/T3CK/T6CK/RC2
AN18/T4CK/T9CK/RC3
AN19/T5CK/T8CK/RC4
SCK2/CN8/RG6
SDI2/CN9/RG7
SDO2/CN10/RG8
MCLR
SS2/CN11/RG9
VSS
VDD
TMS/RA0
AN20/INT1/RA12
AN21/INT2/RA13
AN5/CN7/RB5
AN4/CN6/RB4
75
VSS
2
3
4
5
6
7
8
9
10
11
12
74
73
PGC2/EMUC2/SOSCO/T1CK/CN0/RC14
PGD2/EMUD2/SOSCI/CN1/RC13
72
OC1/RD0
71
70
69
IC4/RD11
IC3/RD10
IC2/RD9
68
67
66
IC1/RD8
INT4/RA15
PIC24HJ256GP610
13
14
15
16
17
18
19
20
21
22
23
24
25
65
64
63
62
61
60
59
58
INT3/RA14
VSS
OSC2/CLKO/RC15
OSC1/CLKIN/RC12
VDD
TDO/RA5
TDI/RA4
SDA2/RA3
SCL2/RA2
57
56
55
54
SCL1/RG2
SDA1/RG3
SCK1/INT0/RF6
53
52
51
SDO1/RF8
U1RX/RF2
SDI1/RF7
U1TX/RF3
PGC1/EMUC1/AN6/OCFA/RB6
PGD1/EMUD1/AN7/RB7
VREF-/RA9
VREF+/RA10
AVDD
AVSS
AN8/RB8
AN9/RB9
AN10/RB10
AN11/RB11
VSS
VDD
TCK/RA1
U2RTS/RF13
U2CTS/RF12
AN12/RB12
AN13/RB13
AN14/RB14
AN15/OCFB/CN12/RB15
VSS
VDD
IC7/U1CTS/CN20/RD14
IC8/U1RTS/CN21/RD15
U2RX/CN17/RF4
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
AN3/CN5/RB3
AN2/SS1/CN4/RB2
PGC3/EMUC3/AN1/CN3/RB1
PGD3/EMUD3/AN0/CN2/RB0
DS70152D-page 24
Preliminary
18
VDD
PGD2/EMUD2/AN0/VREF+/CN2/RA0
17
VSS
PGC2/EMUC2/AN1/VREF-/CN3/RA1
16
AN6/RP15/CN11/RB15
PGD1/EMUD1/AN2/RP0/CN4/RB0
15
AN7/RP14/CN12/RB14
PGC1/EMUC1/AN3/RP1/CN5/RB1
14
VDDCORE
OSCI/CLKI/CN30/RA2
13
VSS
OSCO/CLKO/CN29/RA3
12
SCL1/RP9/CN21/RB9
PGD3/EMUD3/SOSCI/RP4/CN1/RB4
11
SDA1/RP8/CN22/RB8
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
10
INT0/RP7/CN23/RB7
dsPIC33FJ12GP201
PIC24HJ12GP201
MCLR
Preliminary
DS70152D-page 25
20
VDD
PGD2/EMUD2/AN0/VREF+/CN2/RA0
19
Vss
PGC2/EMC2/AN1/VREF-/CN3/RA1
18
PWM1L1/RP15/CN11/RB15
PGD1/EMUD1/AN2/RP0/CN4/RB0
17
PWM1H1/RP14/CN12/RB14
PGC1/EMUC1/AN3/RP1/CN5/RB1
16
PWM1L2/RP13/CN13/RB13
VSS
15
PWM1H2/RP12/CN14/RB12
OSCI/CLKI/CN30/RA2
14
VDDCORE
OSCO/CLKO/CN29/RA3
13
PWM2L1/SDA1/RP9/CN21/RB9
PGD3/EMUD3/SOSCI/RP4/CN1/RB4
12
PWM2H1/SCL1/RP8/CN22/RB8
10
11
INT0/RP7/CN23/RB7
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
dsPIC33FJ12MC201
MCLR
28-PIN SDIP
28-PIN SOIC
28
AV DD
PGD2/EMUD2/AN0/VREF+/CN2/RA0
27
AV ss
PGC2/EMUC2/AN1/VREF-/CN3/RA1
26
AN6/RP15/CN11/RB15
PGD1/EMUD1/AN2/RP0/CN4/RB0
25
AN7/RP14/CN12/RB14
PGC1/EMUC1/AN3/RP1/CN5/RB1
24
AN8/RP13/CN13/RB13
AN4/RP2/CN6/RB2
23
AN9/RP12/CN14/RB12
AN5/RP3/CN7/RB3
22
TMS/RP11/CN15/RB11
Vss
21
TDI/RP10/CN16/RB10
OSCO/CLK1/CN30/RA2
20
VDDCORE
dsPIC33FJ12GP202
PIC24HJ12GP202
DS70152D-page 26
MCLR
OSCI/CLKI/CN29/RA3
10
19
Vss
PGD3/EMUD3/SOSC/RP4/CN1/RB4
11
18
TDO/SDA1/RP9/CN21/RB9
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
12
17
TCK/SCL1/RP8/CN22/RB8
VDD
13
16
INT0/RP7/CN23/RB7
ASDA1/RP5/CN27/RB5
14
15
ASCL1/RP6/CN24/RB6
Preliminary
28-PIN SDIP
28-PIN SOIC
28
AV DD
PGD2/EMUD2/AN0/VREF+/CN2/RA0
27
AVss
PGC2/EMUC2/AN1/VREF-/CN3/RA1
26
PWM1L1/RP15/CN11/RB15
PGD1/EMUD1/AN2/RP0/CN4/RB0
25
PWM1H1/RP14/CN12/RB14
PGC1/EMUC1/AN3/RP1/CN5/RB1
24
PWM1L2/RP13/CN13/RB13
AN4/RP2/CN6/RB2
23
PWM1H2/RP12/CN14/RB12
AN5/RP3/CN7/RB3
22
TMS/PWM1L3/RP11/CN15/RB11
Vss
21
TDI/PWM1H3/RP10/CN16/RB10
OSCI/CLKI/CN30/RA2
20
V DDCORE
19
Vss
dsPIC33FJ12MC202
MCLR
OSCO/CLKO/CN29/RA3
10
PGD3/EMUD3/SOSCI/RP4/CN1/RB4
11
18
TDO/PWM2L1/SDA1/RP9/CN21/RB9
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
12
17
TCK/PWM2H1/SCL1/RP8/CN22/RB8
V DD
13
16
INT0/RP7/CN23/RB7
ASDA1/RP5/CN27/RB5
14
15
ASCL1/RP6/CN24/RB6
Preliminary
DS70152D-page 27
28
27
26
25
24
23
AN7/RP14/CN12/RB14
AN6/RP15/CN11/RB15
AVSS
AVDD
MCLR
PGD2/EMUD2/AN0/VREF+/CN2/RA0
PGC2/EMUC2/AN1/VREF-/CN3/RA1
22
PGD1/EMUD1/AN2/RP0/CN4/RB0
21
AN8/RP13/CN13/RB13
PGC1/EMUC1/AN3/RP1/CN5/RB1
20
AN9/RP12/CN14/RB12
AN4/RP2/CN6/RB2
19
TMS/RP11/CN15/RB11
18
TDI/RP10/CN16/RB10
dsPIC33FJ12GP202
PIC24HJ12GP202
OSCI/CLKI/CN30/RA2
16
V SS
OSCO/CLKO/CN29/RA3
15
PGD3/EMUD3/SOSCI/RP4/CN1/RB4
DS70152D-page 28
10
11
12
13
14
TCK/SCL1/RP8/CN22/RB8
V DDCORE
INT0/RP7/CN23/RB7
17
ASCL1/RP6/CN24/RB6
ASDA1/RP5/CN27/RB5
VSS
V DD
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
AN5/RP3/CN7/RB3
Preliminary
TDO/SDA1/RP9/CN21/RB9
25
23
22
AV ss
AVDD
MCLR
26
PWM1H1/ RP14/CN12/RB14
27
PWM1L1/RP15/CN11/RB15
28
PGD2/EMUD2/AN0/VREF+/CN2/RA0
PGC2/EMUC2/AN1/VREF-/CN3/RA1
24
PGD1/EMUD1/AN2/RP0/CN4/RB0
21
PWM1L2/RP13/CN13/RB13
PGC1/EMUC1/AN3/RP1/CN5/RB1
20
PWM1H2/RP12/CN14/RB12
AN4/RP2/CN6/RB2
19
TMS/PWM1L3/RP11/CN15/RB11
AN5/RP3/CN7/RB3
18
TDI/PWM1H3/RP10/CN16/RB10
VSS
17
V DDCORE
OSCI/CLKI/CN30/RA2
16
VSS
OSCO/CLKO/CN29/RA3
15
TDO/PWM2L1/SDA1/RP9/CN21/RB9
11
12
13
14
ASCL1/RP6/CN24/RB6
INT0/RP7/CN23/RB7
TCK/PWM2H1/SCL1/RP8/CN22/RB8
PGC3/EMUC3/SOSCO/T1CK/CN0/RA4
10
ASDA1/RP5/CN27/RB5
VDD
PGD3/EMUD3/SOSCI/RP4/CN1/RB4
dsPIC33FJ12MC202
Preliminary
DS70152D-page 29
Memory Map
TABLE 2-2:
Write Blocks
Erase Blocks
dsPIC33FJ64GP206
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64GP306
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64GP310
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64GP706
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64GP708
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64GP710
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ128GP206
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128GP306
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128GP310
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128GP706
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128GP708
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33F/PIC24H Device
dsPIC33FJ128GP710
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ256GP506
0x02ABFE (88K)
1368
171
0x800FFE (2K)
dsPIC33FJ256GP510
0x02ABFE (88K)
1368
171
0x800FFE (2K)
dsPIC33FJ256GP710
0x02ABFE (88K)
1368
171
0x800FFE (2K)
dsPIC33FJ64MC506
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64MC508
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64MC510
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64MC706
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ64MC710
0x00ABFE (22K)
344
43
0x800FFE (2K)
dsPIC33FJ128MC506
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128MC510
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128MC706
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128MC708
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ128MC710
0x0157FE (44K)
688
86
0x800FFE (2K)
dsPIC33FJ256MC510
0x02ABFE (88K)
1368
171
0x800FFE (2K)
dsPIC33FJ256MC710
0x02ABFE (88K)
1368
171
0x800FFE (2K)
PIC24HJ64GP206
0x00ABFE (22K)
344
43
0x800FFE (2K)
PIC24HJ64GP210
0x00ABFE (22K)
344
43
0x800FFE (2K)
PIC24HJ64GP506
0x00ABFE (22K)
344
43
0x800FFE (2K)
PIC24HJ64GP510
0x00ABFE (22K)
344
43
0x800FFE (2K)
PIC24HJ128GP206
0x0157FE (44K)
688
86
0x800FFE (2K)
PIC24HJ128GP210
0x0157FE (44K)
688
86
0x800FFE (2K)
DS70152D-page 30
Preliminary
PIC24HJ128GP306
0x0157FE (44K)
688
86
0x800FFE (2K)
PIC24HJ128GP310
0x0157FE (44K)
688
86
0x800FFE (2K)
PIC24HJ128GP506
0x0157FE (44K)
688
86
0x800FFE (2K)
PIC24HJ128GP510
0x0157FE (44K)
688
86
0x800FFE (2K)
PIC24HJ256GP206
0x02ABFE (88K)
1368
171
0x800FFE (2K)
PIC24HJ256GP210
0x02ABFE (88K)
1368
171
0x800FFE (2K)
PIC24HJ256GP610
0x02ABFE (88K)
1368
171
0x800FFE (2K)
dsPIC33FJ12GP201
0x001FFE (4K)
64
0x8007FE (1K)
dsPIC33FJ12GP202
0x001FFE (4K)
64
0x8007FE (1K)
dsPIC33FJ12MC201
0x001FFE (4K)
64
0x8007FE (1K)
dsPIC33FJ12MC202
0x001FFE (4K)
64
0x8007FE (1K)
PIC24HJ12GP201
0x001FFE (4K)
64
0x8007FE (1K)
PIC24HJ12GP202
0x001FFE (4K)
64
0x8007FE (1K)
Preliminary
DS70152D-page 31
User Flash
Code Memory
(87552 x 24-bit)
User Memory
Space
0x02ABFE
0x02AC00
Reserved
0x7FFFFE
0x800000
Executive Code Memory
(2048 x 24-bit)
0x800FFE
0x801000
Configuration Memory
Space
Reserved
Configuration Registers
(12 x 8-bit)
0xF7FFFE
0xF80000
0xF80017
0xF80018
Reserved
Device ID
(2 x 16-bit)
Reserved
Note:
0xFEFFFE
0xFF0000
0xFF0002
0xFF0004
0xFFFFFE
The address boundaries for user Flash and Executive code memory are device dependent.
DS70152D-page 32
Preliminary
DEVICE PROGRAMMING
ENHANCED ICSP
3.1
Read Memory
Erase Memory
Program Memory
Blank Check
Read Executive Firmware Revision
FIGURE 3-1:
TABLE 3-1:
Command
Description
HIGH-LEVEL ENHANCED
ICSP PROGRAMMING
FLOW
Start
Perform Bulk
Erase
Program Memory
SCHECK
Sanity check
READC
READP
PROGC
PROGP
PROGW
QBLANK
QVER
Verify Program
Preliminary
Done
DS70152D-page 33
3.3
FIGURE 3-2:
CONFIRMING PRESENCE
OF PROGRAMMING
EXECUTIVE
Start
Read the
Application ID
from Address
0x807F0
Is
Application ID
0xBB?
No
Yes
Prog. Executive is
Resident in Memory
Finish
DS70152D-page 34
Preliminary
MCLR
P19
VDD
P7
VIH
VIH
PGD
1
b30
0
b29
0
b28
1
b27
...
0
b3
0
b2
0
b1
0
b0
PGC
P1A
P1B
P18
3.4
Blank Check
3.5
3.5.1
Preliminary
DS70152D-page 35
FLOWCHART FOR
PROGRAMMING CODE
MEMORY
3.5.2
Start
BaseAddress = 0x0
RemainingCmds = 1368
Send PROGP
Command to Program
BaseAddress
Is
PROGP response
PASS?
3.5.3
CHECKSUM COMPUTATION
No
Yes
RemainingCmds =
RemainingCmds 1
BaseAddress =
BaseAddress + 0x80
No
PROGRAMMING VERIFICATION
Is
RemainingCmds
0?
Yes
Finish
DS70152D-page 36
Failure
Report Error
Preliminary
CHECKSUM COMPUTATION
Device
dsPIC33FJ64GP206
dsPIC33FJ64GP306
dsPIC33FJ64GP310
dsPIC33FJ64GP706
dsPIC33FJ64GP708
dsPIC33FJ64GP710
Read Code
Protection
Disabled
Checksum Computation
CFGB + SUM(0:00ABFF)
Erased
Value
Value with
0xAAAAAA at 0x0
and Last
Code Address
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
dsPIC33FJ128GP206 Disabled
Enabled
dsPIC33FJ128GP306 Disabled
Enabled
dsPIC33FJ128GP310 Disabled
Enabled
dsPIC33FJ128GP706 Disabled
Enabled
dsPIC33FJ128GP708 Disabled
Enabled
dsPIC33FJ128GP710 Disabled
Enabled
dsPIC33FJ256GP506 Disabled
Enabled
dsPIC33FJ256GP510 Disabled
Enabled
dsPIC33FJ256GP710 Disabled
Enabled
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
CFGB
0x05BA
0x05BA
Item Description:
SUM(a:b) = Byte sum of locations a to b inclusive (all 3 bytes of code memory)
CFGB = Configuration Block (masked)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xFF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xE7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for dsPIC33FJ12GP201/202, dsPIC33FJ12MC201/202 and PIC24HJ12GP201/202)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xCF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xC7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for all other devices)
Preliminary
DS70152D-page 37
Device
dsPIC33FJ64MC506
dsPIC33FJ64MC508
dsPIC33FJ64MC510
dsPIC33FJ64MC706
dsPIC33FJ64MC710
Read Code
Protection
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
CFGB
0x05BA
0x05BA
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
CFGB
0x05BA
0x05BA
Enabled
dsPIC33FJ128MC510 Disabled
Enabled
dsPIC33FJ128MC706 Disabled
Enabled
dsPIC33FJ128MC708 Disabled
Enabled
dsPIC33FJ128MC710 Disabled
Enabled
dsPIC33FJ256MC510 Disabled
Enabled
dsPIC33FJ256MC710 Disabled
PIC24HJ64GP210
PIC24HJ64GP506
Value with
0xAAAAAA at 0x0
and Last
Code Address
Disabled
dsPIC33FJ128MC506 Disabled
PIC24HJ64GP206
Checksum Computation
Erased
Value
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Item Description:
SUM(a:b) = Byte sum of locations a to b inclusive (all 3 bytes of code memory)
CFGB = Configuration Block (masked)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xFF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xE7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for dsPIC33FJ12GP201/202, dsPIC33FJ12MC201/202 and PIC24HJ12GP201/202)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xCF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xC7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for all other devices)
DS70152D-page 38
Preliminary
Device
PIC24HJ64GP510
PIC24HJ128GP206
PIC24HJ128GP210
PIC24HJ128GP306
PIC24HJ128GP310
PIC24HJ128GP506
PIC24HJ128GP510
PIC24HJ256GP206
PIC24HJ256GP210
PIC24HJ256GP610
dsPIC33FJ12GP201
dsPIC33FJ12GP202
dsPIC33FJ12MC201
dsPIC33FJ12MC202
PIC24HJ12GP201
PIC24HJ12GP202
Read Code
Protection
Checksum Computation
Erased
Value
Value with
0xAAAAAA at 0x0
and Last
Code Address
Disabled
CFGB + SUM(0:00ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:0157FF)
0x01BC
0xFFBE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:02ABFF)
0x03BC
0x01BE
Enabled
CFGB
0x05BA
0x05BA
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Disabled
CFGB + SUM(0:001FFF)
0xD60C
0xD40E
Enabled
CFGB
0x060A
0x060A
Item Description:
SUM(a:b) = Byte sum of locations a to b inclusive (all 3 bytes of code memory)
CFGB = Configuration Block (masked)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xFF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xE7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for dsPIC33FJ12GP201/202, dsPIC33FJ12MC201/202 and PIC24HJ12GP201/202)
= Byte sum of ((FBS & 0xCF) + (FSS & 0xCF) + (FGS & 0x07) + (FOSCSEL & 0xA7) + (FOSC & 0xC7) +
(FWDT & 0xDF) + (FPOR & 0xE7) + (FICD & 0xE3))
(for all other devices)
Preliminary
DS70152D-page 39
DS70152D-page 40
Preliminary
Bit Field
Register
RBS<1:0>
FBS
Description
Boot Segment Data RAM Code Protection
11 = No RAM is reserved for Boot Segment
10 = Small-sized Boot RAM
[128 bytes of RAM are reserved for Boot Segment]
01 = Medium-sized Boot RAM
[256 bytes of RAM are reserved for Boot Segment]
00 = Large-sized Boot RAM
[1024 bytes of RAM are reserved for Boot Segment]
[Note: This bit is Reserved in dsPIC33FJ12GP201/202,
dsPIC33FJ12MC201/202 and PIC24HJ12GP201/202.]
BSS<2:0>
FBS
BWRP
FBS
Preliminary
DS70152D-page 41
Bit Field
Register
Description
RSS<1:0>
FSS
SSS<2:0>
FSS
SWRP
DS70152D-page 42
FSS
Preliminary
Bit Field
Register
Description
GSS<1:0>
FGS
GWRP
FGS
IESO
FOSCSEL
TEMP
FOSCSEL
FNOSC<2:0>
FOSCSEL
FCKSM<1:0>
FOSC
IOL1WAY
FOSC
OSCIOFNC
FOSC
POSCMD<1:0>
FOSC
FWDTEN
FWDT
WINDIS
FWDT
WDTPRE
FWDT
Preliminary
DS70152D-page 43
Bit Field
Register
WDTPOST
FWDT
PWMPIN
FPOR
HPOL
FPOR
LPOL
FPOR
ALTI2C
FPOR
FPWRT<2:0>
FPOR
BKBUG
FICD
COE
FICD
JTAGEN
FICD
ICS<1:0>
FICD
All
DS70152D-page 44
Description
Preliminary
Bit 7
Bit 6
FBS
RBS<1:0>
0xF80002
FSS
RSS<1:0>(3)
0xF80004
FGS
0xF80000
0xF80006 FOSCSEL
Bit 5
(3)
Bit 4
Bit 3
GSS<1:0>
IOL1WAY(2)
OSCIOFNC
FOSC
0xF8000A
FWDT
0xF8000C
FPOR
0xF8000E
FICD
0xF80010
FUID0
0xF80012
FUID1
0xF80014
FUID2
0xF80016
FUID3
2:
3:
3.6.2
FWDTEN
WINDIS
PWMPIN(1) HPOL(1)
BKBUG
COE
WDTPRE
LPOL(1)
ALTI2C(2)
JTAGEN
PROGRAMMING METHODOLOGY
3.6.3
POSCMD<1:0>
WDTPOST<3:0>
FPWRT<2:0>
ICS<1:0>
On the dsPIC33F General Purpose Family devices (dsPIC33FJXXXGPXXX) and PIC24H devices, these
bits are reserved (read as 1 and must be programmed as 1).
These bits are only present in the dsPIC33FJ12GP201/202, dsPIC33FJ12MC201/202 and
PIC24HJ12GP201/202 devices. In all other devices, they are unimplemented (read as 0).
In the dsPIC33FJ12GP201/202, dsPIC33FJ12MC201/202 and PIC24HJ12GP201/202 devices, these bits
are reserved (read as 1 and must be programmed as 1).
Note:
GWRP
FNOSC<2:0>
0xF80008
Note 1:
FCKSM<1:0>
SWRP(3)
SSS<2:0>
TEMP
Bit 0
BWRP
(3)
Bit 1
BSS<2:0>
IESO
Bit 2
PROGRAMMING VERIFICATION
3.6.4
CODEGUARD SECURITY
CONFIGURATION BITS
Preliminary
DS70152D-page 45
3.6.5
USER UNIT ID
The dsPIC33F/PIC24H devices provide four 8-bit Configuration registers (FUID0 through FUID3) for the user
to store product-specific information, such as unit serial
numbers and other product manufacturing data.
All bits in the FBS, FSS and FGS Configuration registers can only be programmed
to a value of 0. the ERASEB command is
the only way to reprogram code-protect
bits from ON (0) to OFF (1).
FIGURE 3-5:
Send PROGC
Command
Is
PROGC response
PASS?
No
Yes
ConfigAddress =
ConfigAddress + 2
No
Is
ConfigAddress
0xF80018?
Yes
Failure
Report Error
Finish
3.7
FIGURE 3-6:
EXITING ENHANCED
ICSP MODE
P16
P17
VIH
MCLR
VDD
PGD
VIH
PGC
PGD = Input
DS70152D-page 46
Preliminary
THE PROGRAMMING
EXECUTIVE
4.1
Programming Executive
Communication
4.1.1
COMMUNICATION INTERFACE
AND PROTOCOL
FIGURE 4-1:
11
12
13 14
After the entire response is clocked out, the programmer should terminate the clock on PGC until it is time
to send another command to the programming
executive. This protocol is shown in Figure 4-2.
4.1.2
SPI RATE
4.1.3
TIME OUTS
PROGRAMMING
EXECUTIVE SERIAL
TIMING
P1
1
15 16
PGC
P1A
P3
P1B
P2
PGD
MSb 14
13
12
11
...
1 LSb
Preliminary
DS70152D-page 47
Programming Executive
Processes Command
15 16
15 16
15 16
PGC
PGD
MSB X X X LSB
P8
MSB X X X LSB
P9a
P9b
MSB X X X LSB
8ns
23 s
PGC = Input
PGD = Input
4.2
4.2.2
Programming Executive
Commands
4.2.1
FIGURE 4-4:
COMMAND FORMAT
FIGURE 4-3:
15
PGC = Input
PGD = Output
12
COMMAND FORMAT
11
15
PACKED INSTRUCTION
WORD FORMAT
8
LSW1
MSB2
MSB1
LSW2
Opcode
Note:
Length
4.2.3
DS70152D-page 48
PROGRAMMING EXECUTIVE
ERROR HANDLING
Preliminary
Mnemonic
Length
(16-bit words)
Time Out
Description
0x0
SCHECK
1 msec
Sanity check.
0x1
READC
1 msec
0x2
READP
0x3
RESERVED
0x4
PROGC
5 msec
0x5
PROGP
99
5 msec
0x6
PROGW
5 msec
0x7
RESERVED
N/A
N/A
0x8
RESERVED
N/A
N/A
N/A
N/A
TBD
0x9
RESERVED
0xA
QBLANK
N/A
N/A
0xB
QVER
1 msec
0xC
RESERVED
N/A
N/A
0xD
RESERVED
N/A
N/A
One row of code memory consists of (64) 24-bit words. Refer to Table 2-2 for device-specific information.
4.2.4
COMMAND DESCRIPTIONS
4.2.5
SCHECK COMMAND
15
12 11
Opcode
Length
Field
Description
Opcode
0x0
Length
0x1
for
for
Preliminary
DS70152D-page 49
READC COMMAND
12 11
Opcode
4.2.7
8 7
15
12 11
8 7
Opcode
Length
N
READP COMMAND
0
Length
N
Addr_MSB
Reserved
Addr_LS
Addr_MSB
Addr_LS
Field
Description
Field
Description
Opcode
0x1
Length
0x3
Opcode
Length
0x4
Addr_MSB
Reserved
0x0
Addr_LS
Addr_MSB
Addr_LS
The READC command instructs the programming executive to read N Configuration registers or Device ID
registers, starting from the 24-bit address specified by
Addr_MSB and Addr_LS. This command can only be
used to read 8-bit or 16-bit data.
When this command is used to read Configuration
registers, the upper byte in every data word returned by
the programming executive is 0x00 and the lower byte
contains the Configuration register value.
Expected Response (4 + 3 * (N 1)/2 words
for N odd):
0x1100
2+N
Configuration register or Device ID Register 1
...
Configuration register or Device ID Register N
Note:
The READP command instructs the programming executive to read N 24-bit words of code memory, starting
from the 24-bit address specified by Addr_MSB and
Addr_LS. This command can only be used to read 24bit data. All data returned in the response to this command uses the packed data format described in
Section 4.2.2 Packed Data Format.
Expected Response (2 + 3 * N/2 words for N even):
0x1200
2 + 3 * N/2
Least significant program memory word 1
...
Least significant data word N
Expected Response (4 + 3 * (N 1)/2 words
for N odd):
0x1200
4 + 3 * (N 1)/2
Least significant program memory word 1
...
MSB of program memory word N (zero padded)
Note:
DS70152D-page 50
0x2
Preliminary
PROGC COMMAND
15
12 11
4.2.9
8 7
Opcode
15
12 11
8 7
Opcode
Length
Reserved
PROGP COMMAND
0
Length
Reserved
Addr_MSB
Addr_MSB
Addr_LS
Addr_LS
Data
D_1
D_2
Field
Opcode
...
Description
D_N
0x4
Length
0x4
Reserved
0x0
Field
Description
Addr_MSB
Opcode
0x5
Addr_LS
Length
0x63
Reserved
0x0
Data
Addr_MSB
The PROGC command instructs the programming executive to program a single Configuration register, located
at the specified memory address.
Addr_LS
D_1
D_2
...
D_96
The PROGP command instructs the programming executive to program one row of code memory
(64 instruction words) to the specified memory
address. Programming begins with the row address
specified in the command. The destination address
should be a multiple of 0x80.
The data to program to memory, located in command
words D_1 through D_96, must be arranged using the
packed instruction word format shown in Figure 4-4.
After all data has been programmed to code memory,
the programming executive verifies the programmed
data against the data in the command.
Expected Response (2 words):
0x1500
0x0002
Note:
Preliminary
DS70152D-page 51
PROGW COMMAND
15
12 11
Opcode
4.2.11
8 7
12 11
Opcode
Length
Reserved
15
QBLANK COMMAND
Length
PSize
Addr_MSB
Addr_LS
Data_LS
Reserved
Field
Field
Data_MSB
Description
Opcode
0x6
Length
0x5
Reserved
0x0
Addr_MSB
Addr_LS
Data_MSB
Data_LS
0xA
Length
0x2
PSize
DS70152D-page 52
Opcode
The QBLANK command queries the programming executive to determine if the contents of code memory are
blank (contains all 1s). The size of code memory to
check must be specified in the command.
The PROGW command instructs the programming executive to program one word of code memory (3 bytes) to
the specified memory address.
Description
Preliminary
4.3.1
QVER COMMAND
15
12 11
Opcode
Length
Field
Description
Opcode
0xB
Length
0x1
RESPONSE FORMAT
15
12 11
Opcode
8 7
Last_Cmd
0
QE_Code
Length
D_1 (if applicable)
...
D_N (if applicable)
Field
Description
Opcode
Response opcode.
Last_Cmd
QE_Code
Length
D_1
D_N
4.3.1.1
4.3
Programming Executive
Responses
TABLE 4-2:
Opcode
PROGRAMMING EXECUTIVE
RESPONSE OPCODES
Mnemonic
Description
0x1
PASS
Command successfully
processed.
0x2
FAIL
Command unsuccessfully
processed.
0x3
NACK
Opcode Field
4.3.1.2
Last_Cmd Field
Preliminary
DS70152D-page 53
QE_Code Field
TABLE 4-4:
TABLE 4-3:
Query
QE_Code
Description
0x0
No error.
0x1
Verify failed.
0x2
Other error.
4.3.1.4
Response Length
QBLANK
QVER
DS70152D-page 54
Preliminary
DEVICE PROGRAMMING
ICSP
FIGURE 5-1:
Start
Enter ICSP
Perform Bulk
Erase
Program Memory
HIGH-LEVEL ICSP
PROGRAMMING FLOW
Verify Program
Exit ICSP
5.1
Done
5.2
ICSP Operation
TABLE 5-1:
4-Bit
Mnemonic
Control Code
Description
0000b
SIX
0001b
REGOUT
0010b-1111b
N/A
Reserved.
Preliminary
DS70152D-page 55
5.2.2
Note:
FIGURE 5-2:
17 18
19 20
21
22 23 24
PGC
P4
P3
P4a
P1A
P1B
P2
PGD
Execute PC 1,
Fetch SIX Control Code
LSB X
X MSB
Only for
Program
Memory Entry
PGD = Input
FIGURE 5-3:
1
11
12
13 14 15 16
PGC
P4
PGD
DS70152D-page 56
P4a
P5
LSb
...
10 11
12 13 14 MSb
PGD = Output
Preliminary
FIGURE 5-4:
P19
P14
MCLR
P7
VIH
VIH
VDD
PGD
1
b30
0
b29
0
b28
1
b27
...
0
b3
0
b2
0
b1
1
b0
PGC
P1A
P1B
P18
5.4
5.4.1
TABLE 5-2:
NVMCON
Value
PROGRAMMING OPERATIONS
NVMCON ERASE
OPERATIONS
Erase Operation
0x404F
0x404D
0x404C
0x4042
0x4040
Preliminary
DS70152D-page 57
NVMCON WRITE
OPERATIONS
NVMCON
Value
0x4001
Write Operation
Program 1 row (64 instruction words)
of code memory or executive memory.
0x4000
0x4003
5.4.2
5.5
NVMCON, #WR
FIGURE 5-5:
A Bulk Erase operation is the recommended mechanism to allow a user to overwrite the Boot Segment (if
one chooses to do so).
In general, the segments and CodeGuard Securityrelated configuration registers should be programmed
in the following order:
Done
DS70152D-page 58
Preliminary
TABLE 5-4:
Command
(Binary)
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
2404FA
883B0A
MOV
MOV
#0x404F, W10
W10, NVMCON
BSET
NOP
NOP
NVMCON, #WR
A8E761
000000
000000
Step 4: Wait for Bulk Erase operation to complete and make sure WR bit is clear.
5.6
0000
0000
0000
0001
807600
887840
000000
<VISI>
FIGURE 5-6:
PACKED INSTRUCTION
WORDS IN W0:W5
15
W0
W1
LSW0
MSB1
MSB0
W2
LSW1
W3
LSW2
W4
W5
Preliminary
MSB3
MSB2
LSW3
DS70152D-page 59
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
24001A
883B0A
MOV
MOV
#0x4001, W10
W10, NVMCON
200xx0
880190
2xxxx7
MOV
MOV
MOV
#<DestinationAddress23:16>, W0
W0, TBLPAG
#<DestinationAddress15:0>, W7
Step 4: Initialize the read pointer (W6) and load W0:W5 with the next 4 instruction words to program.
0000
0000
0000
0000
0000
0000
2xxxx0
2xxxx1
2xxxx2
2xxxx3
2xxxx4
2xxxx5
MOV
MOV
MOV
MOV
MOV
MOV
#<LSW0>, W0
#<MSB1:MSB0>, W1
#<LSW1>, W2
#<LSW2>, W3
#<MSB3:MSB2>, W4
#<LSW3>, W5
Step 5: Set the read pointer (W6) and load the (next set of) write latches.
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
EB0300
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
CLR
W6
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
[W7]
[W7++]
[++W7]
[W7++]
[W7]
[W7++]
[++W7]
[W7++]
Step 6: Repeat steps 4-5 sixteen times to load the write latches for 64 instructions.
Step 7: Initiate the write cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #WR
Step 8: Wait for Row Program operation to complete and make sure WR bit is clear.
DS70152D-page 60
Preliminary
Command
(Binary)
Data
(Hex)
0000
0000
0000
0001
807600
887840
000000
<VISI>
MOV
NVMCON, W0
MOV
W0, VISI
NOP
Clock out contents of VISI register. Repeat until the WR bit
is clear.
Description
040200
000000
GOTO
NOP
0x200
Step 10: Repeat steps 3-9 until all code memory is programmed.
FIGURE 5-7:
Load 2 Bytes
to Write
Buffer at <Addr>
N=N+1
All
bytes
written?
No
Yes
N=1
LoopCount =
LoopCount + 1
No
All
locations
done?
Yes
Done
Preliminary
DS70152D-page 61
TABLE 5-6:
DS70152D-page 62
DEFAULT CONFIGURATION
REGISTER VALUES FOR
dsPIC33FJ12GP201/202,
dsPIC33FJ12MC201/202 AND
PIC24HJ12GP201/202
Address
Name
Default Value
0xF80000
FBS
0xCF
0xF80002
FSS
0xFF
0xF80004
FGS
0x07
0xF80006
FOSCSEL
0xA7
0xF80008
FOSC
0xE7
0xF8000A
FWDT
0xDF
0xF8000C
FPOR
0xF7
0xF8000E
FICD
0xE3
0xF80010
FUID0
0xFF
0xF80012
FUID1
0xFF
0xF80014
FUID2
0xFF
0xF80016
FUID3
0xFF
TABLE 5-7:
DEFAULT CONFIGURATION
REGISTER VALUES FOR ALL
OTHER DEVICES
Address
Name
Default Value
0xF80000
FBS
0xCF
0xF80002
FSS
0xCF
0xF80004
FGS
0x07
0xF80006
FOSCSEL
0xA7
0xF80008
FOSC
0xC7
0xF8000A
FWDT
0xDF
0xF8000C
FPOR
0xE7
0xF8000E
FICD
0xE3
0xF80010
FUID0
0xFF
0xF80012
FUID1
0xFF
0xF80014
FUID2
0xFF
0xF80016
FUID3
0xFF
Preliminary
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize the write pointer (W7) for the TBLWT instruction.
0000
200007
MOV
#0x0000, W7
24000A
883B0A
MOV
MOV
#0x4000, W10
W10, NVMCON
200F80
880190
MOV
MOV
#0xF8, W0
W0, TBLPAG
2xxxx0
MOV
#<CONFIG_VALUE>, W0
Step 6: Write the Configuration register data to the write latch and increment the write pointer.
0000
0000
0000
BB1B96
000000
000000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #WR
Step 8: Wait for the Configuration Register Write operation to complete and make sure WR bit is clear.
-
0000
0000
0000
0001
807600
887840
000000
<VISI>
040200
000000
GOTO
NOP
0x200
Step 10: Repeat steps 5-9 until all twelve Configuration registers are written.
Preliminary
DS70152D-page 63
TABLE 5-9:
Command
(Binary)
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize TBLPAG and the read pointer (W6) for TBLRD instruction.
0000
0000
0000
200xx0
880190
2xxxx6
MOV
MOV
MOV
#<SourceAddress23:16>, W0
W0, TBLPAG
#<SourceAddress15:0>, W6
Step 3: Initialize the write pointer (W7) to point to the VISI register.
0000
0000
207847
000000
MOV
NOP
#VISI, W7
Step 4: Read and clock out the contents of the next two locations of code memory, through the VISI register, using
the REGOUT command.
0000
0000
0000
0001
0000
0000
0000
0001
BA1B96
000000
000000
<VISI>
BA9BB6
000000
000000
<VISI>
DS70152D-page 64
040200
000000
GOTO
NOP
0x200
Preliminary
TABLE 5-10:
Command
(Binary)
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize TBLPAG, the read pointer (W6) and the write pointer (W7) for TBLRD instruction.
0000
0000
0000
0000
0000
200F80
880190
EB0300
207847
000000
MOV
MOV
CLR
MOV
NOP
#0xF8, W0
W0, TBLPAG
W6
#VISI, W7
Step 3: Read the Configuration register and write it to the VISI register (located at 0x784) and clock out the
VISI register using the REGOUT command.
0000
0000
0000
0001
BA0BB6
000000
000000
<VISI>
Step 4: Repeat step 3 twelve times to read all the Configuration registers.
Step 5: Reset device internal PC.
0000
0000
040200
000000
GOTO
NOP
0x200
Preliminary
DS70152D-page 65
5.11
FIGURE 5-8:
VERIFY CODE
MEMORY FLOW
Start
Set TBLPTR = 0
5.12
FIGURE 5-9:
P17
VIH
MCLR
VDD
Read High Byte
with Post-Increment
Does
Word = Expect
Data?
PGD
No
VIH
PGC
Failure,
Report
Error
PGD = Input
Yes
No
All
code memory
verified?
Yes
Done
DS70152D-page 66
Preliminary
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize TBLPAG and the read pointer (W0) for TBLRD instruction.
0000
0000
0000
0000
0000
0000
0000
0000
200800
880190
205FE0
207841
000000
BA0890
000000
000000
MOV
MOV
MOV
MOV
NOP
TBLRDL
NOP
NOP
#0x80, W0
W0, TBLPAG
#0x5BE, W0
#VISI, W1
[W0], [W1]
<VISI>
Preliminary
DS70152D-page 67
PROGRAMMING THE
PROGRAMMING EXECUTIVE
TO MEMORY
6.1
Overview
TABLE 6-1:
Command
(Binary)
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
24072A
883B0A
MOV
MOV
#0x4042, W10
W10, NVMCON
Step 3: Initiate the erase cycle, wait for erase to complete and make sure WR bit is clear.
0000
0000
0000
-
A8E761
000000
000000
-
BSET
NVMCON, #15
NOP
NOP
Externally time P12 msec (see Section TABLE 8-1: AC/DC
Characteristics and Timing Requirements) to allow sufficient time for the Page Erase operation to complete.
0000
0000
0000
0001
807600
887840
000000
<VISI>
MOV
NVMCON, W0
MOV
W0, VISI
NOP
Clock out contents of VISI register. Repeat until the WR bit
is clear.
Step 4: Repeat Step 3 four times to erase all four pages of executive memory.
Step 5: Initialize the NVMCON to program 64 instruction words.
0000
0000
24001A
883B0A
MOV
MOV
#0x4001, W10
W10, NVMCON
DS70152D-page 68
200800
880190
EB0380
000000
MOV
MOV
CLR
NOP
#0x80, W0
W0, TBLPAG
W7
Preliminary
Description
Step 7: Load W0:W5 with the next 4 words of packed programming executive code and initialize W6 for
programming. Programming starts from the base of executive memory (0x800000) using W6 as a read
pointer and W7 as a write pointer.
0000
0000
0000
0000
0000
0000
2<LSW0>0
2<MSB1:MSB0>1
2<LSW1>2
2<LSW2>3
2<MSB3:MSB2>4
2<LSW3>5
MOV
MOV
MOV
MOV
MOV
MOV
#<LSW0>, W0
#<MSB1:MSB0>, W1
#<LSW1>, W2
#<LSW2>, W3
#<MSB3:MSB2>, W4
#<LSW3>, W5
Step 8: Set the read pointer (W6) and load the (next four write) latches.
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
EB0300
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
BB0BB6
000000
000000
BBDBB6
000000
000000
BBEBB6
000000
000000
BB1BB6
000000
000000
CLR
W6
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTH.B[W6++],
NOP
NOP
TBLWTL [W6++],
NOP
NOP
[W7]
[W7++]
[++W7]
[W7++]
[W7]
[W7++]
[++W7]
[W7++]
Step 9: Repeat Steps 7-8 sixteen times to load the write latches for the 64 instructions.
Step 10: Initiate the programming cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #15
0000
0000
0000
0001
807600
887840
000000
<VISI>
Preliminary
DS70152D-page 69
Description
040200
000000
GOTO
NOP
0x200
Step 13: Repeat Steps 7-12 until all 32 rows of executive memory have been programmed.
DS70152D-page 70
Preliminary
Programming Verification
TABLE 6-2:
Command
(Binary)
Description
000000
000000
040200
000000
NOP
NOP
GOTO
NOP
0x200
Step 2: Initialize TBLPAG and the read pointer (W6) for TBLRD instruction.
0000
0000
0000
200800
880190
EB0300
MOV
MOV
CLR
#0x80, W0
W0, TBLPAG
W6
Step 3: Initialize the write pointer (W7) to point to the VISI register.
0000
207847
MOV
#VISI, W7
Step 4: Read and clock out the contents of the next two locations of executive memory through the VISI register
using the REGOUT command.
0000
0000
0000
0000
0001
0000
0000
0000
0001
000000
BA1B96
000000
000000
<VISI>
BA9BB6
000000
000000
<VISI>
NOP
TBLRDL [W6], [W7]
NOP
NOP
Clock out contents of VISI register
TBLRDH [W6++], [W7]
NOP
NOP
Clock out contents of VISI register
040200
000000
GOTO
NOP
0x200
Step 6: Repeat Steps 4-5 until all 2048 instruction words of executive memory are read.
Preliminary
DS70152D-page 71
DEVICE ID
TABLE 7-1:
DS70152D-page 72
DEVICE IDs
Device
DEVID
DEVREV
dsPIC33FJ64GP206
0xC1
0x3000
dsPIC33FJ64GP306
0xCD
0x3000
dsPIC33FJ64GP310
0xCF
0x3000
dsPIC33FJ64GP706
0xD5
0x3000
dsPIC33FJ64GP708
0xD6
0x3000
dsPIC33FJ64GP710
0xD7
0x3000
dsPIC33FJ128GP206
0xD9
0x3000
dsPIC33FJ128GP306
0xE5
0x3000
dsPIC33FJ128GP310
0xE7
0x3000
dsPIC33FJ128GP706
0xED
0x3000
dsPIC33FJ128GP708
0xEE
0x3000
dsPIC33FJ128GP710
0xEF
0x3000
dsPIC33FJ256GP506
0xF5
0x3000
dsPIC33FJ256GP510
0xF7
0x3000
dsPIC33FJ256GP710
0xFF
0x3000
dsPIC33FJ64MC506
0x89
0x3000
dsPIC33FJ64MC508
0x8A
0x3000
dsPIC33FJ64MC510
0x8B
0x3000
dsPIC33FJ64MC706
0x91
0x3000
dsPIC33FJ64MC710
0x97
0x3000
dsPIC33FJ128MC506
0xA1
0x3000
dsPIC33FJ128MC510
0xA3
0x3000
dsPIC33FJ128MC706
0xA9
0x3000
dsPIC33FJ128MC708
0xAE
0x3000
dsPIC33FJ128MC710
0xAF
0x3000
dsPIC33FJ256MC510
0xB7
0x3000
dsPIC33FJ256MC710
0xBF
0x3000
PIC24HJ64GP206
0x41
0x3000
PIC24HJ64GP210
0x47
0x3000
PIC24HJ64GP506
0x49
0x3000
PIC24HJ64GP510
0x4B
0x3000
PIC24HJ128GP206
0x5D
0x3000
PIC24HJ128GP210
0x5F
0x3000
PIC24HJ128GP306
0x65
0x3000
PIC24HJ128GP310
0x67
0x3000
PIC24HJ128GP506
0x61
0x3000
PIC24HJ128GP510
0x63
0x3000
PIC24HJ256GP206
0x71
0x3000
PIC24HJ256GP210
0x73
0x3000
PIC24HJ256GP610
0x7B
0x3000
dsPIC33FJ12GP201
0x802
0x3000
dsPIC33FJ12GP202
0x803
0x3000
dsPIC33FJ12MC201
0x800
0x3000
dsPIC33FJ12MC202
0x801
0x3000
PIC24HJ12GP201
0x80A
0x3000
PIC24HJ12GP202
0x80B
0x3000
Preliminary
Address
Name
15
0xFF0000
DEVID
0xFF0002
DEVREV
TABLE 7-3:
Bit Field
14
13
12
11
10
MASK<9:0>
PROC<3:0>
VARIANT<5:0>
REV<5:0>
DOT<5:0>
Description
MASK<9:0>
DEVID
VARIANT<5:0>
DEVID
PROC<3:0>
DEVREV
REV<5:0>
DEVREV
DOT<5:0>
DEVREV
Preliminary
DS70152D-page 73
AC/DC CHARACTERISTICS
AND TIMING REQUIREMENTS
TABLE 8-1:
Characteristic
VDD
Min
Max
Units
VDDCORE
3.60
Conditions
Normal programming(1)
D112
IPP
D113
IDDP
mA
D031
VIL
VSS
0.2 VDD
D041
VIH
0.8 VDD
VDD
D080
VOL
0.6
D090
VOH
VDD 0.7
D012
CIO
50
pF
To meet AC specifications
D013
CF
10
P1
TPGC
136
ns
P1A
TPGCL
40
ns
P1B
TPGCH
40
ns
ns
P2
TSET1
15
P3
THLD1
15
ns
P4
TDLY1
40
ns
P4A
TDLY1A
40
ns
P5
TDLY2
20
ns
P6
TSET2
100
ns
P7
THLD2
25
ms
P8
TDLY3
12
P9a
TDLY4
10
P9b
TDLY5
15
23
P10
TDLY6
400
ns
P11
TDLY7
200
ms
P12
TDLY8
20
ms
P13
TDLY9
1.5
ms
P14
TR
1.0
P15
TVALID
10
ns
P16
TDLY10
P17
THLD3
MCLR to VDD
100
ns
Note 1: VDD must also be supplied to the AVDD pins during programming. AVDD and AVSS should always be
within 0.3V of VDD and VSS, respectively.
DS70152D-page 74
Preliminary
Characteristic
Min
Max
Units
P18
TKEY1
40
ns
P19
TKEY2
25
ns
P20
TDLY11
25
ms
Conditions
Note 1: VDD must also be supplied to the AVDD pins during programming. AVDD and AVSS should always be
within 0.3V of VDD and VSS, respectively.
Preliminary
DS70152D-page 75
DS70152D-page 76
Preliminary
REVISION HISTORY
Preliminary
DS70152D-page 77
DS70152D-page 78
Preliminary
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 Microchips 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 Microchips 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.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, KEELOQ, KEELOQ logo, 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, Linear Active Thermistor, Migratable
Memory, MXDEV, MXLAB, PS logo, 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, Mindi, MiWi,
MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartTel, Total
Endurance, UNI/O, 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.
2007, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Preliminary
DS70152D-page 79
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
India - Bangalore
Tel: 91-80-4182-8400
Fax: 91-80-4182-8422
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Kokomo
Kokomo, IN
Tel: 765-864-8360
Fax: 765-864-8387
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
Korea - Gumi
Tel: 82-54-473-4301
Fax: 82-54-473-4302
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
China - Fuzhou
Tel: 86-591-8750-3506
Fax: 86-591-8750-3521
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
Malaysia - Penang
Tel: 60-4-646-8870
Fax: 60-4-646-5086
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
Taiwan - Kaohsiung
Tel: 886-7-536-4818
Fax: 886-7-536-4803
China - Shunde
Tel: 86-757-2839-5507
Fax: 86-757-2839-5571
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
China - Xian
Tel: 86-29-8833-7250
Fax: 86-29-8833-7256
12/08/06
DS70152D-page 80
Preliminary