# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# PIC24FJ64GA0XX -- Flash Programming Specification

- 1
- 2
…
- 20
- 21
- 22
- 23
- 24
…
- 51
- 52

PIC24FJXXXGA0XX
DS39768D-page 22 © 2008 Microchip Technology Inc.
TABLE 3-7: SERIAL INSTRUCTION EXECUTION FOR WRITING CONFIGURATION REGISTERS
Command
(Binary)
Data
(Hex)
Description
Step 1: Exit the Reset vector.
0000
0000
0000
000000
040200
000000
NOP
GOTO 0x200
NOP
Step 2: Initialize the Write Pointer (W7) for the TBLWT instruction.
0000 2xxxx7 MOV <CW2Address15:0>, W7
Step 3: Set the NVMCON register to program CW2.
0000
0000
24003A
883B0A
MOV #0x4003, W10
MOV W10, NVMCON
Step 4: Initialize the TBLPAG register.
0000
0000
200xx0
880190
MOV <CW2Address23:16>, W0
MOV W0, TBLPAG
Step 5: Load the Configuration register data to W6.
0000 2xxxx6 MOV #<CW2_VALUE>, W6
Step 6: Write the Configuration register data to the write latch and increment the Write Pointer.
0000
0000
0000
0000
000000
BB1B86
000000
000000
NOP
TBLWTL W6, [W7++]
NOP
NOP
Step 7: Initiate the write cycle.
0000
0000
0000
A8E761
000000
000000
BSET NVMCON, #WR
NOP
NOP
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
Step 9: Reset device internal PC.
0000
0000
040200
000000
GOTO 0x200
NOP
Step 10: Repeat Steps 5-9 to write CW1.

- 1
- 2
…
- 20
- 21
- 22
- 23
- 24
…
- 51
- 52