English
Language : 

PIC18CXX2_13 Datasheet, PDF (55/304 Pages) Microchip Technology – High Performance Microcontrollers with 10-bit A/D
PIC18CXX2
5.0 TABLE READS/TABLE WRITES
Enhanced devices have two memory spaces: the pro-
gram memory space and the data memory space. The
program memory space is 16-bits wide, while the data
memory space is 8 bits wide. Table Reads and Table
Writes have been provided to move data between
these two memory spaces through an 8-bit register
(TABLAT).
The operations that allow the processor to move data
between the data and program memory spaces are:
• Table Read (TBLRD)
• Table Write (TBLWT)
Table Read operations retrieve data from program
memory and place it into the data memory space.
Figure 5-1 shows the operation of a Table Read with
program and data memory.
Table Write operations store data from the data mem-
ory space into program memory. Figure 5-2 shows the
operation of a Table Write with program and data
memory.
Table operations work with byte entities. A table block
containing data is not required to be word aligned, so a
table block can start and end at any byte address. If a
Table Write is being used to write an executable pro-
gram to program memory, program instructions will
need to be word aligned.
FIGURE 5-1:
TABLE READ OPERATION
Instruction: TBLRD*
Table Pointer(1)
TBLPTRU TBLPTRH TBLPTRL
Program Memory
Table Latch (8-bit)
TABLAT
Program Memory
(TBLPTR)
Note 1: Table Pointer points to a byte in program memory.
FIGURE 5-2:
TABLE WRITE OPERATION
Instruction: TBLWT*
Table Pointer(1)
TBLPTRU TBLPTRH TBLPTRL
Program Memory
Program Memory
(TBLPTR)
Note 1: Table Pointer points to a byte in program memory.
 1999-2013 Microchip Technology Inc.
Table Latch (8-bit)
TABLAT
DS39026D-page 55