Table Pointer Boundaries

TBLPTR is used in reads, writes and erases of the Program Flash Memory.

When a TBLRD is executed, all 22 bits of the TBLPTR determine which byte is read from program memory directly into the TABLAT register.

When a TBLWT is executed the byte in the TABLAT register is written, not to Flash memory but, to a holding register in preparation for a program memory write. The holding registers constitute a write block which varies depending on the device (see the Flash Memory Organization by Device table).The LSbs of the TBLPTRL register determine which specific address within the holding register block is written to. The size of the write block determines the number of LSbs. The MSbs of the Table Pointer have no effect during TBLWT operations.

When a program memory write is executed the entire holding register block is written to the Flash memory at the address determined by the MSbs of the TBLPTR. The LSbs are ignored during Flash memory writes. For more detail, see the "Writing to Program Flash Memory" section.

The Figure 1 figure illustrates the relevant boundaries of TBLPTR based on NVM control operations.

Figure 1. Table Pointer Boundaries Based on Operation
Note:
  1. 1.See the memory organization table for the write holding registers block size.