Escolar Documentos
Profissional Documentos
Cultura Documentos
DEVICE OVERVIEW
PIC24FJ64GA204
PIC24FJ128GA202
PIC24FJ64GA202
PIC24FJ128GB204
PIC24FJ64GB204
PIC24FJ128GB202
PIC24FJ64GB202
2.0
In those cases where legacy programming specification code from other device
families is used as a basis to implement
the programming specification for the
PIC24FJXXXGA2/GB2 devices, special
care must be taken to ensure all references to TBLPAG and NVMCON, in any
existing code, are updated with the correct
opcode hex data for the mnemonic and
operands.
PROGRAMMING OVERVIEW
OF PIC24FJXXXGA2/GB2
DEVICES
PIC24FJXXXGA2/GB2 Devices:
Command
(Binary)
Data
(Hex)
0000
8802A0
Description
MOV
W0, TBLPAG
Data
(Hex)
0000
880190
Description
MOV
W0, TBLPAG
DS30000510F-page 1
PIC24FJXXXGA2/GB2 FAMILIES
FIGURE 2-1:
PROGRAMMING SYSTEM
OVERVIEW FOR
ENHANCED ICSP
FIGURE 2-2:
PIC24FJ128GA20X/GB20X Devices
(VBAT tied to VDD):
PIC24F Devices
3.3V
PIC24FJXXXGA2/GB2
Programming
Executive
Programmer
VDD
VBAT
VCAP
CEFC
(10 F typ.)
On-Chip Memory
2.1
2.2
Power Requirements
TABLE 2-1:
VSS
Pin Name
During Programming
Pin Name
Pin Type
Pin Description
MCLR
Programming Enable
VDD, AVDD(1)
VDD
Power Supply
VSS, AVSS(1)
VBAT(2)
VSS
Ground
VBAT
MCLR
VCAP
VCAP
PGECx
PGEDx
PGEDX
I/O
VUSB3V3(3)
VUSB3V3
PGECx
DS30000510F-page 2
PIC24FJXXXGA2/GB2 FAMILIES
2.3
Pin Diagrams
2.3.1
MCLR
RA0
RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB2
RB3
VSS
RA2
RA3
RB4
RA4
VDD
PGED3/RP5/ASDA1/CN27/RB5
MCLR
PGED3/RA0
PGEC3/RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB2
RB3
VSS
RA2
RA3
RB4
RA4
VDD
RB5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PIC24FJXXXGA202
PIC24FJXXXGB202
FIGURE 2-3:
28
27
26
25
24
23
22
21
20
19
18
17
16
15
28
27
26
25
24
23
22
21
20
19
18
17
16
15
VDD
VSS
RB15
RB14
RB13
RB12
PGEC2/TMS/RP11/CN15/RB11
PGED2/TDI/RP10/CN16/RB10
VCAP
VBAT
RB9
RB8
RB7
PGEC3/RP6/ASCL1/CN24/RB6
VDD
VSS
RB15
RB14
RB13
VUSB3V3
PGEC2/REFI/RP11/D-/CTED9/CN15/RB11
PGED2/RP10/D+/CTED11/CN16/RB10
VCAP
VBAT
RB9
RB8
RB7
VBUS/RB6
DS30000510F-page 3
PIC24FJXXXGA2/GB2 FAMILIES
PIN DIAGRAMS (28-PIN QFN)(1)
RA1
RA0
MCLR
VDD
VSS
RB15
RB14
FIGURE 2-4:
28 27 26 25 24 23 22
1
21 RB13
2
20 RB12
3
19 PGEC2/TMS/RP11/CN15/RB11
4 PIC24FJXXXGA202 18 PGED2/TDI/RP10/CN16/RB10
5
17 VCAP
6
16 VBAT
7
15 RB9
8 9 10 11 12 13 14
PGEC3/CVREF-/VREF-/AN1/C3IND/RP6/ASCL1/CTED2/CN3/RA1
PGED3/CVREF+/VREF+/AN0/C3INC/RP5/ASDA1/CTED1/CN2/RA0
MCLR
VDD
VSS
RB15
RB14
RB4
RA4
VDD
PGED3/CN27/RB5
PGEC3/CN24/RB6
RB7
RB8
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB2
RB3
VSS
RA2
RA3
28 27 26 25 24 23 22
1
21
2
20
3
19
PIC24FJXXXGB202 18
4
5
17
6
16
7
15
8 9 10 11 12 13 14
RB13
VUSB3V3
PGEC2/REFI/RP11/D-/CTED9/CN15/RB11
PGED2/RP10/D+/CTED11/CN16/RB10
VCAP
VBAT
RB9
RB4
RA4
VDD
RB5
VBUS/RB6
RB7
RB8
PGED1/AN2/CTCMP/HLVDIN/C2INB/RP0/CN4/RB0
PGEC1/AN3/C2INA/RP1/CTED12/CN5/RB1
RB2
RB3
VSS
RA2
RA3
Note 1:
DS30000510F-page 4
PIC24FJXXXGA2/GB2 FAMILIES
PIN DIAGRAMS (44-PIN QFN)(1)
44
43
42
41
40
39
38
37
36
35
34
RB8
RB7
PGEC3/RB6
PGED3/RB5
VDD
VSS
RC5
RC4
RC3
RA9
RA4
FIGURE 2-5:
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
6
PIC24FJXXXGA204
7
8
9
10
11
RB4
RA8
RA3
RA2
VSS
VDD
RC2
RC1
RC0
RB3
RB2
44
43
42
41
40
39
38
37
36
35
34
RB8
RB7
VBUS/RB6
RB5
VDD
VSS
RC5
RC4
RC3
RA9
RA4
RA10
RA7
RB14
RB15
AVSS
AVDD
MCLR
RA0
RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB9
RC6
RC7
RC8
RC9
VBAT
VCAP
PGED2/RP10/CN16/PMD2/RB10
PGEC2/RP11/CN15/PMD1/RB11
RB12
RB13
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
PIC24FJXXXGB204
6
7
8
9
10
11
RB4
RA8
RA3
RA2
VSS
VDD
RC2
RC1
RC0
RB3
RB2
RA10
RA7
RB14
RB15
AVSS
AVDD
MCLR
PGED3/CVREF+/AN0/C3INC/CN2/RA0
PGEC3/CVREF-/AN1/C3IND/CN3/RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB9
RC6
RC7
RC8
RC9
VBAT
VCAP
PGED2/RP10/CN16/D+/RB10
PGEC2/RP11/CN15/D-/RB11
VUSB3V3
RB13
Note 1:
DS30000510F-page 5
PIC24FJXXXGA2/GB2 FAMILIES
PIN DIAGRAMS (44-PIN TQFP)
44
43
42
41
40
39
38
37
36
35
34
RB8
RB7
PGEC3/RB6
PGED3/RB5
VDD
VSS
RC5
RC4
RC3
RA9
RA4
FIGURE 2-6:
PIC24FJXXXGA204
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
6
7
8
9
10
11
RB4
RA8
RA3
RA2
VSS
VDD
RC2
RC1
RC0
RB3
RB2
44
43
42
41
40
39
38
37
36
35
34
RB8
RB7
VBUS/RB6
RB5
VDD
VSS
RC5
RC4
RC3
RA9
RA4
RA10
RA7
RB14
RB15
AVSS
AVDD
MCLR
RA0
RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB9
RC6
RC7
RC8
RC9
VBAT
VCAP
PGED2/RP10/CN16/PMD2/RB10
PGEC2/RP11/CN15/PMD1/RB11
RB12
RB13
PIC24FJXXXGB204
33
32
31
30
29
28
27
26
25
24
23
12
13
14
15
16
17
18
19
20
21
22
1
2
3
4
5
6
7
8
9
10
11
RB4
RA8
RA3
RA2
VSS
VDD
RC2
RC1
RC0
RB3
RB2
RA10
RA7
RB14
RB15
AVSS
AVDD
MCLR
PGED3/CVREF+/AN0/C3INC/CN2/RA0
PGEC3/CVREF-/AN1/C3IND/CN3/RA1
PGED1/AN2/C2IN-/RP0/CN4/RB0
PGEC1/AN3/C2IN+/RP1/CN5/RB1
RB9
RC6
RC7
RC8
RC9
VBAT
VCAP
PGED2/RP10/CN16/D+/RB10
PGEC2/RP11/CN15/D-/RB11
VUSB3V3
RB13
DS30000510F-page 6
PIC24FJXXXGA2/GB2 FAMILIES
2.4
Memory Map
TABLE 2-2:
map
for
the
Device
PIC24FJ64GA2XX
PIC24FJ64GB2XX
PIC24FJ128GA2XX
PIC24FJ128GB2XX
User Memory
Address Limit
(Instruction Words)
Write
Blocks
Erase
Blocks
00ABFEh (22K)
344
43
00ABFEh
00ABFCh
00ABFAh
00ABF8h
0157FEh (44K)
688
86
0157FEh
0157FCh
0157FAh
0157F8h
DS30000510F-page 7
PIC24FJXXXGA2/GB2 FAMILIES
FIGURE 2-7:
User Flash
Code Memory(1)
User Memory
Space
0XXXF7h(1)
0XXXF8h(1)
0XXXFEh(1)
0XXX00h(1)
Reserved
7FFFFEh
800000h
Executive Code Memory
(1024 x 24-bit)
8007FEh
800800h
Configuration Memory
Space
Reserved Memory
Diagnostic and
Calibration Words
(8 x 24-bit)
8008FEh
800880h
80088Eh
Reserved
Device ID
(2 x 16-bit)
Reserved
Note 1:
FEFFFEh
FF0000h
FF0002h
FF0004h
FFFFFEh
The size and address boundaries for user Flash code memory are device dependent. See Table 2-2 for details.
DS30000510F-page 8
PIC24FJXXXGA2/GB2 FAMILIES
3.0
FIGURE 3-1:
Start
Enter ICSP
Perform Chip
Erase
3.1
Program Memory
Verify Program
Exit ICSP
Figure 3-1 shows the high-level overview of the programming process. After entering ICSP mode, the first
action is to Chip Erase the device. Next, the code
memory is programmed, followed by the device
Configuration registers. Code memory (including the
Configuration registers) is then verified to ensure that
programming was successful. Then, the code-protect
Configuration bits are programmed, if required.
HIGH-LEVEL ICSP
PROGRAMMING FLOW
End
3.2
ICSP Operation
TABLE 3-1:
4-Bit
Mnemonic
Control Code
0000
SIX
0001
REGOUT
0010-1111
N/A
Description
Shift in 24-bit instruction
and execute.
Shift out the VISI
(0784h) register.
Reserved.
DS30000510F-page 9
PIC24FJXXXGA2/GB2 FAMILIES
3.2.1
FIGURE 3-2:
PGECx
1
P4
P3
17 18 19 20 21 22 23 24
P4A
P1A
P1B
P2
0
PGEDx
Execute PC 1,
Fetch SIX
Control Code
LSB X
X MSB
Execute 24-Bit
Instruction, Fetch
Next Control Code
Only for
Program
Memory Entry
PGEDx = Input
3.2.1.1
There are some differences between executing instructions normally and using the SIX ICSP command. As a
result, the code examples in this specification may not
match those for performing the same functions during
normal device operation.
During SIX ICSP operation:
Two-word instructions require two SIX operations
to clock in all of the necessary data.
Examples of two-word instructions are GOTO and
CALL.
Two-cycle instructions require two SIX operations.
The first SIX operation shifts in the instruction and
begins to execute it. The second SIX operation,
which should shift in a NOP to avoid losing data,
provides the CPU clocks required to finish
executing the instruction.
Examples of two-cycle instructions are Table Read
and Table Write instructions.
The CPU does not automatically stall to account
for pipeline changes.
A CPU Stall occurs when an instruction modifies a
register that is used for Indirect Addressing by the
following instruction.
DS30000510F-page 10
PIC24FJXXXGA2/GB2 FAMILIES
3.2.2
FIGURE 3-3:
1
11
12 13 14 15 16
PGECx
P4
PGEDx
LSb
P4A
P5
PGEDx = Input
...
10 11 12 13 14 MSb
PGEDx = Output
DS30000510F-page 11
PIC24FJXXXGA2/GB2 FAMILIES
3.3
FIGURE 3-4:
P6
P14
MCLR
P19
VDD
P7
VIH
VIH
PGEDx
0
b31
1
b30
0
b29
0
b28
1
b27
...
0
b3
0
b2
0
b1
1
b0
PGECx
P18
DS30000510F-page 12
P1A
P1B
PIC24FJXXXGA2/GB2 FAMILIES
3.4
3.4.1
PROGRAMMING OPERATIONS
TABLE 3-2:
NVMCON
Value
NVMCON ERASE
OPERATIONS
Erase Operation
404Fh
4042h
TABLE 3-3:
NVMCON
Value
4003h
4001h
3.4.2
NVMCON WRITE
OPERATIONS
FIGURE 3-5:
Write Operation
Start
3.5
No
Is WR bit
cleared (0)?
Yes
End
NVMCON, #WR
DS30000510F-page 13
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 3-4:
Command
(Binary)
Data
(Hex)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
2404FA
883B0A
MOV
MOV
#0x404F, W10
W10, NVMCON
Step 3: Set the TBLPAG register and perform a dummy Table Write to select what portions of memory are erased.
0000
0000
0000
0000
0000
0000
2xxxx0
8802A0
200000
BB0800
000000
000000
MOV
MOV
MOV
TBLWTL
NOP
NOP
#<PAGEVAL>, W0
W0, TBLPAG
#0x0000, W0
W0,[W0]
BSET
NOP
NOP
NVMCON, #WR
A8E761
000000
000000
Step 5: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0000
0001
0000
DS30000510F-page 14
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO
0x200
NOP
MOV
NVMCON, W2
MOV
W2, VISI
NOP
Clock out contents of the VISI register
NOP
PIC24FJXXXGA2/GB2 FAMILIES
3.6
FIGURE 3-6:
PACKED INSTRUCTION
WORDS IN W0:W5
15
8 7
W0
LSW0
W1
W2
LSW1
W3
LSW2
TABLE 3-5:
Command
(Binary)
W4
MSB1
MSB0
MSB3
W5
MSB2
LSW3
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
24001A
883B0A
MOV
MOV
#0x4001, W10
W10, NVMCON
Step 3: Initialize the Write Pointer (W7) for the TBLWT instruction.
0000
0000
0000
200xx0
8802A0
2xxxx7
MOV
MOV
MOV
#<DestinationAddress23:16>, W0
W0, TBLPAG
#<DestinationAddress15:0>, W7
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
DS30000510F-page 15
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 3-5:
Command
(Binary)
Data
(Hex)
Description
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
NOP
TBLWTL
NOP
NOP
TBLWTH.B
NOP
NOP
TBLWTH.B
NOP
NOP
TBLWTL
NOP
NOP
TBLWTL
NOP
NOP
TBLWTH.B
NOP
NOP
TBLWTH.B
NOP
NOP
TBLWTL
NOP
NOP
W6
[W6++], [W7]
[W6++], [W7++]
[W6++], [++W7]
[W6++], [W7++]
[W6++], [W7]
[W6++], [W7++]
[W6++], [++W7]
[W6++], [W7++]
Step 6: Repeat Steps 4 and 5, 16 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: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0000
0001
0000
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO
0x200
NOP
MOV
NVMCON, W2
MOV
W2, VISI
NOP
Clock out contents of the VISI register.
NOP
040200
000000
GOTO
NOP
0x200
Step 10: Repeat Steps 3 through 9 until all code memory is programmed.
DS30000510F-page 16
PIC24FJXXXGA2/GB2 FAMILIES
FIGURE 3-7:
N=N+1
No
All
instruction words
written?
Yes
N=1
LoopCount =
LoopCount + 1
No
All
locations
done?
Yes
End
DS30000510F-page 17
PIC24FJXXXGA2/GB2 FAMILIES
3.7
TABLE 3-6:
DEFAULT CONFIGURATION
REGISTER VALUES
Address
Name
Default Value
Last Word
CW1
7FFFh
Last Word 2
CW2
BFFFh(1)
Last Word 4
CW3
FFFFh
Last Word 6
CW4
FFFFh
Note 1:
TABLE 3-7:
Family
All Devices
PIC24FJXXGA2XX
DS30000510F-page 18
Register/Bits
Value
Comments
CW1<15>
CW2<2>
Always program as 1.
CW2<14>
Always program as 0.
CW3<7>
Always program as 1.
CW4<9>
Always program as 1.
CW2<11>
Always program as 0.
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 3-8:
Command
(Binary)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the Write Pointer (W7) for the TBLWT instruction.
0000
2xxxx7
MOV
#<CW1Address15:0>, W7
24003A
883B0A
MOV
MOV
#0x4003, W10
W10, NVMCON
200xx0
8802A0
MOV
MOV
#<CW1Address23:16>, W0
W0, TBLPAG
2xxxx6
MOV
#<CW1_VALUE>, W6
Step 6: Write the Configuration register data to the write latch and decrement the Write Pointer.
0000
0000
0000
0000
0000
0000
0000
0000
200008
000000
BBCB88
000000
000000
BB1386
000000
000000
MOV
NOP
TBLWTH.B
NOP
NOP
TBLWTL.W
NOP
NOP
#0x0000, W8
BSET
NOP
NOP
NVMCON, #WR
W8, [W7]
W6, [W7--]
A8E761
000000
000000
Step 8: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0000
0001
0000
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO
NOP
MOV
MOV
NOP
Clock out
NOP
0x200
NVMCON, W2
W2, VISI
contents of the VISI register.
040200
000000
GOTO
NOP
0x200
Step 10: Repeat Steps 5 through 9 to write Configuration Word 2 to Configuration Word 4.
DS30000510F-page 19
PIC24FJXXXGA2/GB2 FAMILIES
3.8
TABLE 3-9:
Command
(Binary)
Data
(Hex)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the Write Pointer (W7) to point to the VISI register.
0000
0000
207847
000000
MOV
NOP
#VISI, W7
Step 3: Initialize the TBLPAG register and the Read Pointer (W6) for the TBLRD instruction.
0000
0000
0000
200xx0
8802A0
2xxxx6
MOV
MOV
MOV
#<SourceAddress23:16>, W0
W0, TBLPAG
#<SourceAddress15:0>, W6
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
0000
0000
0000
0000
0001
0000
0000
0000
0000
0001
0000
BA0B96
000000
000000
<VISI>
000000
BADBB6
000000
000000
BAD3D6
000000
000000
<VISI>
000000
BA0BB6
000000
000000
<VISI>
000000
TBLRDL
NOP
NOP
Clock out
NOP
TBLRDH.B
NOP
NOP
TBLRDH.B
NOP
NOP
Clock out
NOP
TBLRDL
NOP
NOP
Clock out
NOP
[W6], [W7]
[++W6], [W7--]
040200
000000
GOTO
NOP
0x200
Step 6: Repeat Steps 3 through 5 until all desired code memory is read (note that Reset the devices internal PC
will be Step 5).
DS30000510F-page 20
PIC24FJXXXGA2/GB2 FAMILIES
3.9
TABLE 3-10:
Command
(Binary)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the TBLPAG register, the Read Pointer (W6) and the Write Pointer (W7) for the TBLRD instruction.
0000
0000
0000
0000
0000
200xx0
8802A0
2xxxx6
207847
000000
MOV
MOV
MOV
MOV
NOP
#<CW1Address23:16>, W0
W0, TBLPAG
#<CW1Address15:0>, W6
#VISI, W7
Step 3: Read the Configuration register and write it to the VISI register (located at 784h), and clock out the
VISI register using the REGOUT command.
0000
0000
0000
0001
0000
BA0BA6
000000
000000
<VISI>
000000
040200
000000
GOTO
NOP
0x200
DS30000510F-page 21
PIC24FJXXXGA2/GB2 FAMILIES
3.10
FIGURE 3-8:
VERIFY CODE
MEMORY FLOW
3.11
3.12
Start
Set TBLPTR = 0
FIGURE 3-9:
P17
VIH
MCLR
Read High Byte
with Post-Increment
VDD
VIH
PGEDx
Does
Word = Expect
Data?
Yes
No
No
Failure,
Report
Error
PGECx
PGEDx = Input
All
code memory
verified?
Yes
End
DS30000510F-page 22
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 3-11:
Command
(Binary)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the TBLPAG register and the Read Pointer (W0) for the TBLRD instruction.
0000
0000
0000
0000
0000
0000
0000
0000
200800
8802A0
207F00
207841
000000
BA0890
000000
000000
MOV
MOV
MOV
MOV
NOP
TBLRDL
NOP
NOP
#0x80, W0
W0, TBLPAG
#0x07F0, W0
#VISI, W1
[W0], [W1]
<VISI>
000000
DS30000510F-page 23
PIC24FJXXXGA2/GB2 FAMILIES
4.0
DEVICE PROGRAMMING
ENHANCED ICSP
FIGURE 4-1:
Start
Perform Chip
Erase
Read Memory
Erase Memory
Program Memory
Blank Check
Read Executive Firmware Revision
Program Memory
TABLE 4-1:
Command
Description
SCHECK
Sanity Check
READC
READP
PROGP
PROGW
QBLANK
QVER
4.1
DS30000510F-page 24
HIGH-LEVEL ENHANCED
ICSP PROGRAMMING FLOW
Verify Program
End
4.2
PIC24FJXXXGA2/GB2 FAMILIES
FIGURE 4-2:
4.3
CONFIRMING PRESENCE
OF PROGRAMMING
EXECUTIVE
Start
Read the
Application ID
from Address
8007F0h
Is
Application ID
CEh?
No
Yes
Prog. Executive is
Resident in Memory
End
FIGURE 4-3:
MCLR
P19
VDD
P7
VIH
VIH
PGEDx
0
b31
1
b30
0
b29
0
b28
1 ...
b27
0
b3
0
b2
0
b1
0
b0
PGECx
P18
P1A
P1B
DS30000510F-page 25
PIC24FJXXXGA2/GB2 FAMILIES
4.4
Blank Check
FIGURE 4-4:
FLOWCHART FOR
PROGRAMMING CODE
MEMORY
Start
BaseAddress = 00h
RemainingCmds = 1368
Send PROGP
Command to Program
BaseAddress
4.5
4.5.1
Is
PROGP Response
PASS?
Yes
PROGRAMMING METHODOLOGY
DS30000510F-page 26
No
RemainingCmds =
RemainingCmds 1
BaseAddress =
BaseAddress + 80h
No
Are
RemainingCmds 0?
Yes
Finish
4.5.2
Failure
Report Error
PROGRAMMING VERIFICATION
PIC24FJXXXGA2/GB2 FAMILIES
4.6
4.6.1
OVERVIEW
The PIC24FJXXXGA2/GB2 devices have Configuration bits stored in the last four locations of implemented
program memory (see Table 2-2 for locations). These
bits can be set or cleared to select various device
configurations.
There are two types of Configuration bits: system operation bits and code-protect bits. The system operation
bits determine the power-on settings for system-level
components, such as the oscillator and Watchdog
Timer. The code-protect bits prevent program memory
from being read and written.
TABLE 4-2:
Bit Field
Register(1)
Description
ALTCMPI
CW2<12>
ALTRB6(2,3)
CW2<11>
BOREN
CW3<12>
DEBUG
CW1<11>
DSSWEN
CW4<8>
DSWDTEN
CW4<7>
DSBOREN
CW4<6>
DSWDTOSC
CW4<5>
Note 1:
2:
3:
4:
5:
6:
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 27
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 4-2:
Bit Field
Register(1)
DSWDTPS<4:0>
CW4<4:0>
FCKSM<1:0>
CW2<7:6>
Note 1:
2:
3:
4:
5:
6:
Description
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 28
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 4-2:
Bit Field
Register(1)
Description
FNOSC<2:0>
CW2<10:8>
FWDTEN<1:0>
CW1<7:6>
FWPSA
CW1<4>
GCP
CW1<13>
GWRP
CW1<12>
I2C1SEL
CW4<14>
ICS<1:0>
CW1<9:8>
IESO
CW2<15>
IOL1WAY
CW4<15>
Note 1:
2:
3:
4:
5:
6:
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 29
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 4-2:
Bit Field
Register(1)
Description
JTAGEN(4)
CW1<14>
LPCFG
CW1<10>
OSCIOFCN
CW2<5>
PLLDIV<3:0>
}
1001 = }
0111 = Oscillator divided by 12 (48 MHz input)(6)
0110 = Oscillator divided by 8 (32 MHz input)(6)
0101 = Oscillator divided by 6 (24 MHz input)(6)
0100 = Oscillator divided by 5 (20 MHz input)(6)
0011 = Oscillator divided by 4 (16 MHz input)(6)
0010 = Oscillator divided by 3 (12 MHz input)(6)
0001 = Oscillator divided by 2 (8 MHz input)(6)
0000 = Oscillator used directly (4 MHz input)(6)
PLLSS
CW3<11>
POSCMD<1:0>
CW2<1:0>
SOSCSEL
Note 1:
2:
3:
4:
5:
6:
CW3<8>
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 30
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 4-2:
Description
WDTCLK<1:0>
CW2<4:3>
WDTCMX
CW2<13>
WDTPS<3:0>
CW1<3:0>
0001 = 1:2
0000 = 1:1
WDTWIN<1:0>
CW3<10:9>
Bit Field
WINDIS
CW1<5>
WPCFG
CW3<14>
WPDIS
CW3<13>
Note 1:
2:
3:
4:
5:
6:
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 31
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 4-2:
Description
WPEND
CW3<15>
WPFP<6:0>
CW3<6:0>
Bit Field
Note 1:
2:
3:
4:
5:
6:
Bits<23:16> should be programmed to a value of 00h to ensure that accidental program execution of any
of the Configuration Words would be interpreted as a NOP opcode.
This bit must be 1 whenever VBUS functionality is used.
This bit is reserved in PIC24FJXXXGA20X devices; the default value is 0.
The JTAGEN bit can be modified only using In-Circuit Serial Programming (ICSP).
Irrespective of the WPCFG status, if WPEND = 1 or if the WPFP<6:0> bits correspond to the
Configuration Words page, the Configuration Words page will be protected.
Reserved; do not use for the PIC24FJXXXGA20X family.
DS30000510F-page 32
PIC24FJXXXGA2/GB2 FAMILIES
4.6.2
PROGRAMMING METHODOLOGY
4.6.3
PROGRAMMING VERIFICATION
FIGURE 4-5:
Is
PROGP response
PASS?
No
Yes
ConfigAddress =
ConfigAddress + 2
No
Is
ConfigAddress
0XXXFEh?(1)
Yes
End
Note 1:
Failure
Report Error
DS30000510F-page 33
PIC24FJXXXGA2/GB2 FAMILIES
4.6.4
CODE-PROTECT CONFIGURATION
BITS
PIC24FJXXXGA2/GB2 devices provide two complimentary methods to protect application code from
overwrites and erasures. These methods also help to
protect the device from inadvertent configuration
changes during run time. Additional information is
available in the product data sheet.
4.6.4.1
GENERAL SEGMENT
PROTECTION
4.6.4.2
4.7
FIGURE 4-6:
EXITING ENHANCED
ICSP MODE
P16
P17
VIH
MCLR
VDD
VIH
PGEDx
PGECx
PGEDx = Input
DS30000510F-page 34
PIC24FJXXXGA2/GB2 FAMILIES
5.0
THE PROGRAMMING
EXECUTIVE
Note:
FIGURE 5-2:
P1
1
5.1
11
12
13 14
P1A
15
16
P3
P1B
COMMUNICATION INTERFACE
AND PROTOCOL
The Enhanced ICSP interface is a 2-wire SPI, implemented using the PGECx and PGEDx pins. The
PGECx pin is used as a clock input pin and the clock
source must be provided by the programmer. The
PGEDx pin is used for sending command data to, and
receiving response data from, the Programming
Executive.
Data transmits to the device must change on the rising
edge and hold on the falling edge. Data receives from
the device must change on the falling edge and hold on
the rising edge.
All data transmissions are sent, MSb first, using 16-bit
mode (see Figure 5-1).
FIGURE 5-1:
PGECx
Programming Executive
Communication
5.1.1
PROGRAMMING
EXECUTIVE SERIAL
TIMING FOR DATA
TRANSMITTED TO DEVICE
PROGRAMMING
EXECUTIVE SERIAL
TIMING FOR DATA
RECEIVED FROM DEVICE
P2
PGEDx
MSb 14 13 12
11
...
1 LSb
5.1.2
SPI RATE
P1
1
11
12 13
14 15
16
PGECx
P1A
P3
P1B
P2
PGEDx
MSb 14
13 12
11
...
1 LSb
DS30000510F-page 35
PIC24FJXXXGA2/GB2 FAMILIES
5.1.3
TIME-OUTS
FIGURE 5-3:
Programming Executive
Processes Command
15 16
15 16
15 16
PGECx
PGEDx
MSB X X X LSB
1
P8
PGECx = Input
PGEDx = Input
5.2
Programming Executive
Commands
COMMAND FORMAT
DS30000510F-page 36
P20
MSB X X X LSB
P21
5.2.1
MSB X X X LSB
P9
PGECx = Input
PGEDx = Output
FIGURE 5-4:
15
12
COMMAND FORMAT
11
Opcode
Length
PIC24FJXXXGA2/GB2 FAMILIES
5.2.2
FIGURE 5-5:
PACKED INSTRUCTION
WORD FORMAT
15
8 7
LSW1
MSB2
MSB1
LSW2
TABLE 5-1:
Opcode
Note:
5.2.3
PROGRAMMING EXECUTIVE
ERROR HANDLING
Length
(16-bit words)
Time-out
Description
0h
SCHECK
1 ms
Sanity check.
1h
READC
1 ms
2h
READP
1 ms/row
3h
RESERVED
N/A
N/A
4h
PROGC
5 ms
5h
PROGP
99
5 ms
6h
RESERVED
5 ms
7h
RESERVED
N/A
N/A
8h
RESERVED
N/A
N/A
9h
RESERVED
N/A
N/A
Ah
RESERVED
N/A
N/A
Bh
QVER
Ch
RESERVED
Dh
Eh
Note 1:
1 ms
N/A
N/A
PROGW
5 ms
QBLANK
One row of code memory consists of (64) 24-bit words. Refer to Table 2-2 for device-specific information.
DS30000510F-page 37
PIC24FJXXXGA2/GB2 FAMILIES
5.2.4
COMMAND DESCRIPTIONS
5.2.6
5.2.5
15
READC COMMAND
12 11
Opcode
12 11
Addr_MSB
Addr_LS
Opcode
Length
Field
Description
Opcode
0h
Length
1h
0
Length
SCHECK COMMAND
15
8 7
Field
Description
Opcode
1h
Length
3h
Addr_MSB
Addr_LS
The READC command instructs the Programming Executive to read N 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 Device ID
registers, the upper byte in every data word returned by
the Programming Executive is 00h and the lower byte
contains the Device ID register value.
Expected Response (4 + 3 * (N 1)/2 Words for
N Odd):
1100h
2+N
Device ID Register 1
...
Device ID Register N
Note:
DS30000510F-page 38
PIC24FJXXXGA2/GB2 FAMILIES
5.2.7
READP COMMAND
15
12 11
5.2.8
8 7
Opcode
0
Length
PROGC COMMAND
15
12 11
0
Length
Reserved
N
Reserved
Description
Addr_MSB
Addr_LS
Addr_MSB
Data
Addr_LS
Field
8 7
Opcode
Field
Description
Opcode
2h
Opcode
4h
Length
4h
Length
4h
Reserved
0h
Addr_MSB
Reserved
0h
Addr_LS
Addr_MSB
Addr_LS
Data
DS30000510F-page 39
PIC24FJXXXGA2/GB2 FAMILIES
5.2.9
PROGP COMMAND
15
12 11
5.2.10
8 7
Opcode
0
Length
Reserved
PROGW COMMAND
15
12 11
8 7
Opcode
0
Length
Data_MSB
Addr_MSB
Addr_MSB
Addr_LS
Addr_LS
D_1
Data_LS
D_2
...
D_96
Field
Description
Field
Opcode
Description
Dh
Length
4h
Reserved
0h
Opcode
5h
Addr_MSB
Length
63h
Addr_LS
Reserved
0h
Addr_MSB
Data_MSB
Addr_LS
Data_LS
D_1
D_2
...
D_96
DS30000510F-page 40
PIC24FJXXXGA2/GB2 FAMILIES
5.2.11
15
QBLANK COMMAND
12 11
Opcode
5.2.12
0
Length
15
QVER COMMAND
12 11
Opcode
Length
Field
Description
PSize_MSW
PSize_LSW
Field
Description
Opcode
Ah
Length
3h
PSize
Opcode
Bh
Length
1h
DS30000510F-page 41
PIC24FJXXXGA2/GB2 FAMILIES
5.3
Programming Executive
Responses
5.3.1.1
TABLE 5-2:
Opcode
PROGRAMMING EXECUTIVE
RESPONSE OPCODES
Mnemonic
Description
1h
PASS
Command is successfully
processed
2h
FAIL
Command is unsuccessfully
processed
3h
NACK
5.3.1
Opcode Field
5.3.1.2
Last_Cmd Field
RESPONSE FORMAT
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
DS30000510F-page 42
PIC24FJXXXGA2/GB2 FAMILIES
5.3.1.3
QE_Code Field
TABLE 5-3:
Query
QBLANK
QVER
TABLE 5-4:
QE_Code
Description
0h
No error
1h
Verify failed
2h
Other error
5.3.1.4
Response Length
DS30000510F-page 43
PIC24FJXXXGA2/GB2 FAMILIES
5.4
5.4.1
OVERVIEW
TABLE 5-5:
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit the Reset vector and erase the executive memory.
0000
0000
0000
000000
040200
000000
NOP
GOTO
NOP
0x200
240420
883B00
MOV
MOV
#0x4042, W0
W0, NVMCON
Step 3: Initialize the Erase Pointers to the first page of the executive and then initiate the erase cycle.
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
200800
8802A0
200001
000000
BB0881
000000
000000
A8E761
000000
000000
MOV
MOV
MOV
NOP
TBLWTL
NOP
NOP
BSET
NOP
NOP
#0x80, W0
W0, TBLPAG
#0x0, W1
W1, [W1]
NVMCON, #15
Step 4: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0001
0000
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO
0x200
NOP
MOV
NVMCON, W2
MOV
W2, VISI
NOP
Clock out contents of the VISI register.
NOP
Step 5: Repeat Steps 3 and 4 to erase the second page of executive memory. The W1 Pointer should be
incremented by 400h to point to the second page.
Step 6: Initialize the NVMCON register to program 64 instruction words.
0000
0000
240010
883B00
MOV
MOV
#0x4001, W0
W0, NVMCON
Step 7: Initialize the TBLPAG register and the Write Pointer (W7).
0000
0000
0000
0000
200800
8802A0
EB0380
000000
DS30000510F-page 44
MOV
MOV
CLR
NOP
#0x80, W0
W0, TBLPAG
W7
PIC24FJXXXGA2/GB2 FAMILIES
TABLE 5-5:
Command
(Binary)
Description
Step 8: Load W0:W5 with the next four words of packed Programming Executive code and initialize W6 for
programming. Programming starts from the base of executive memory (800000h) 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 9: 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 10: Repeat Steps 8 and 9, 16 times, to load the write latches for the 64 instructions.
Step 11: Initiate the programming cycle.
0000
0000
0000
A8E761
000000
000000
BSET
NOP
NOP
NVMCON, #15
Step 12: Repeat this step to poll the WR bit (bit 15 of NVMCON) until it is cleared by the hardware.
0000
0000
0000
0000
0000
0001
0000
040200
000000
803B02
883C22
000000
<VISI>
000000
GOTO
0x200
NOP
MOV
NVMCON, W2
MOV
W2, VISI
NOP
Clock out contents of the VISI register.
NOP
040200
000000
GOTO
NOP
0x200
Step 14: Repeat Steps 8 through 13 until all 16 rows of executive memory have been programmed.
DS30000510F-page 45
PIC24FJXXXGA2/GB2 FAMILIES
5.4.2
PROGRAMMING VERIFICATION
TABLE 5-6:
Command
(Binary)
Description
000000
040200
000000
NOP
GOTO
NOP
0x200
Step 2: Initialize the TBLPAG register and the Read Pointer (W6) for the TBLRD instruction.
0000
0000
0000
200800
8802A0
EB0300
MOV
MOV
CLR
#0x80, W0
W0, TBLPAG
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 executive memory, through the VISI register,
using the REGOUT command.
0000
0000
0000
0001
0000
0000
0000
0000
0000
0000
0000
0001
0000
0000
0000
0000
0001
0000
BA0B96
000000
000000
<VISI>
000000
BADBB6
000000
000000
BAD3D6
000000
000000
<VISI>
000000
BA0BB6
000000
000000
<VISI>
000000
040200
000000
GOTO
NOP
0x200
Step 6: Repeat Steps 4 and 5 until all 1024 instruction words of executive memory are read.
DS30000510F-page 46
PIC24FJXXXGA2/GB2 FAMILIES
6.0
DEVICE DETAILS
6.1
Device ID
TABLE 6-1:
Device
The Device ID region of memory can be used to determine mask, variant and manufacturing information
about the chip. The Device ID region is 2 x 16 bits and
it can be read using the READC command. This region
of memory is read-only and can also be read when
code protection is enabled.
Table 6-1 shows the Device ID for each device,
Table 6-2 shows the Device ID registers and Table 6-3
describes the bit field of each register.
TABLE 6-2:
Address
PIC24FJ128GB204
4C5B
PIC24FJ128GB202
4C5A
PIC24FJ64GB204
4C59
PIC24FJ64GB202
4C58
PIC24FJ128GA204
4C53
PIC24FJ128GA202
4C52
PIC24FJ64GA204
4C51
PIC24FJ64GA202
4C50
Bit
Name
DEVID
FF0002h
DEVREV
Bit Field
DEVID
FF0000h
TABLE 6-3:
DEVICE IDs
15
14
13
12
11
10
FAMID<7:0>
DEV<7:0>
REV<3:0>
Description
FAMID<7:0>
DEVID
DEV<7:0>
DEVID
REV<3:0>
DEVREV
DS30000510F-page 47
PIC24FJXXXGA2/GB2 FAMILIES
6.2
Checksum Computation
TABLE 6-4:
CHECKSUM COMPUTATION
Erased
Checksum
Value
Checksum with
0xAAAAAA at 0x0
and Last Code
Address
Read Code
Protection
Checksum Computation
Disabled
CFGB + SUM(0:157F7)
F73C
F53E
Enabled
0000h
0000h
Disabled
CFGB + SUM(0:157F7)
F73C
F53E
Enabled
0000h
0000h
PIC24FJ128GB204
Disabled
CFGB + SUM(0:157F7)
F744h
F546h
Enabled
0000h
0000h
PIC24FJ128GB202
Disabled
CFGB + SUM(0:157F7)
F744h
F546h
Enabled
0000h
0000h
PIC24FJ64GA204
Disabled
CFGB + SUM(0:0ABF7)
F93C
F73E
Enabled
0000h
0000h
Disabled
CFGB + SUM(0:0ABF7)
F93C
F73E
Enabled
043
0000h
0000h
PIC24FJ64GB204
Disabled
CFGB + SUM(0:0ABF7)
F944h
F746h
Enabled
0000h
0000h
PIC24FJ64GB202
Disabled
CFGB + SUM(0:0ABF7)
F944h
F746h
Enabled
0000h
0000h
Device
PIC24FJ128GA204
PIC24FJ128GA202
PIC24FJ64GA202
Legend:
Note:
Item
SUM[a:b]
CFGB
=
=
Description
Byte sum of locations, a to b inclusive (all 3 bytes of code memory)
Configuration Block (masked) byte sum of ((CW1 & 0x7FFF) + (CW2 & 0xFFFF) +
(CW3 & 0xFFFF) + (CW4 & 0xFFFF))
CW1 address is the last location of implemented program memory; CW2 is (last location 2); CW3 is (last
location 4); CW4 is (last location 6).
DS30000510F-page 48
PIC24FJXXXGA2/GB2 FAMILIES
7.0
Symbol
Characteristic
D111
VDD
D112
IPP
Min
Max
Units
2.20
3.60
Conditions
Normal programming(1)
D113
IDDP
16
mA
D031
VIL
VSS
0.2 VDD
D041
VIH
0.8 VDD
VDD
D080
VOL
0.4
D090
VOH
3.0
D012
CIO
50
pF
To meet AC specifications
D013
CF
4.7
10
P1
TPGEC
100
ns
ICSP mode
250
ns
P1A
TPGECL
40
ns
ICSP mode
100
ns
P1B
TPGECH
40
ns
ICSP mode
100
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
P9
TDLY4
40
P10
TDLY6
400
ns
P11
TDLY7
20
40
ms
P12
TDLY8
20
40
ms
P13
TDLY9
1.5
ms
P14
TR
1.0
P15
TVALID
10
ns
P16
TDLY10
P17
THLD3
MCLR to VDD
100
ns
P18
TKEY1
10
ms
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. When the internal voltage regulator is enabled (i.e., ENVREG = VDD), the nominal
VCAP is 1.8V.
DS30000510F-page 49
PIC24FJXXXGA2/GB2 FAMILIES
7.0
Symbol
Characteristic
Min
Max
Units
P19
TKEY2
ms
P20
TDLY11
23
P21
TDLY12
ns
Note 1:
Conditions
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. When the internal voltage regulator is enabled (i.e., ENVREG = VDD), the nominal
VCAP is 1.8V.
DS30000510F-page 50
PIC24FJXXXGA2/GB2 FAMILIES
APPENDIX A:
REVISION HISTORY
released
for
DS30000510F-page 51
PIC24FJXXXGA2/GB2 FAMILIES
NOTES:
DS30000510F-page 52
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, dsPIC,
FlashFlex, flexPWR, JukeBlox, KEELOQ, KEELOQ logo, Kleer,
LANCheck, MediaLB, MOST, MOST logo, MPLAB,
OptoLyzer, PIC, PICSTART, PIC32 logo, RightTouch, SpyNIC,
SST, SST Logo, SuperFlash and UNI/O are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
The Embedded Control Solutions Company and mTouch are
registered trademarks of Microchip Technology Incorporated
in the U.S.A.
Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo,
CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit
Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet,
KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo,
MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code
Generation, PICDEM, PICDEM.net, PICkit, PICtail,
RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total
Endurance, TSHARC, USBCheck, VariSense, ViewSpan,
WiperLock, Wireless DNA, 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.
Silicon Storage Technology is a registered trademark of
Microchip Technology Inc. in other countries.
GestIC is a registered trademarks of Microchip Technology
Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their
respective companies.
2012-2015, Microchip Technology Incorporated, Printed in
the U.S.A., All Rights Reserved.
ISBN: 978-1-63277-412-5
== ISO/TS 16949 ==
2012-2015 Microchip Technology Inc.
DS30000510F-page 53
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://www.microchip.com/
support
Web Address:
www.microchip.com
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Bangalore
Tel: 91-80-3090-4444
Fax: 91-80-3090-4123
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Germany - Dusseldorf
Tel: 49-2129-3766400
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Hong Kong
Tel: 852-2943-5100
Fax: 852-2401-3431
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8569-7000
Fax: 86-10-8528-2104
Austin, TX
Tel: 512-257-3370
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
China - Chongqing
Tel: 86-23-8980-9588
Fax: 86-23-8980-9500
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Cleveland
Independence, OH
Tel: 216-447-0464
Fax: 216-447-0643
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Novi, MI
Tel: 248-848-4000
Houston, TX
Tel: 281-894-5983
Indianapolis
Noblesville, IN
Tel: 317-773-8323
Fax: 317-773-5453
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
New York, NY
Tel: 631-435-6000
San Jose, CA
Tel: 408-735-9110
Canada - Toronto
Tel: 905-673-0699
Fax: 905-673-6509
China - Dongguan
Tel: 86-769-8702-9880
China - Hangzhou
Tel: 86-571-8792-8115
Fax: 86-571-8792-8116
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
India - Pune
Tel: 91-20-3019-1500
Japan - Osaka
Tel: 81-6-6152-7160
Fax: 81-6-6152-9310
Germany - Pforzheim
Tel: 49-7231-424750
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Japan - Tokyo
Tel: 81-3-6880- 3770
Fax: 81-3-6880-3771
Italy - Venice
Tel: 39-049-7625286
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenzhen
Tel: 86-755-8864-2200
Fax: 86-755-8203-1760
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Taiwan - Kaohsiung
Tel: 886-7-213-7828
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
Poland - Warsaw
Tel: 48-22-3325737
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
Sweden - Stockholm
Tel: 46-8-5090-4654
UK - Wokingham
Tel: 44-118-921-5800
Fax: 44-118-921-5820
Taiwan - Taipei
Tel: 886-2-2508-8600
Fax: 886-2-2508-0102
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
01/27/15
DS30000510F-page 54