Internal Program Memory Organization

PIC18F57Q43's Programmable Flash Memory (PFM) is divided into 512 128-word pages (512 pages x 128 words = 65,536 words = 131,072 bytes). A read from program memory is executed either one word, one byte or one 128-word page at a time. A program memory erase is executed on a 128-word page at a time. A write to program memory can be executed as either 1 or 128 words at a time.

See Data Transfer from Ping-Pong Buffers to Internal Memory and Data Transfer from Internal Memory to DAC for details on how to write to and read from the internal memory.