English
Language : 

PIC17C7XX_13 Datasheet, PDF (59/306 Pages) Microchip Technology – High-Performance 8-bit CMOS EPROM Microcontrollers with 10-bit A/D
8.0 TABLE READS AND TABLE
WRITES
The PIC17C7XX has four instructions that allow the
processor to move data from the data memory space to
the program memory space, and vice versa. Since the
program memory space is 16-bits wide and the data
memory space is 8-bits wide, two operations are
required to move 16-bit values to/from the data
memory.
The TLWT t,f and TABLWT t,i,f instructions are
used to write data from the data memory space to the
program memory space. The TLRD t,f and TABLRD
t,i,f instructions are used to write data from the pro-
gram memory space to the data memory space.
The program memory can be internal or external. For
the program memory access to be external, the device
needs to be operating in Microprocessor or Extended
Microcontroller mode.
Figure 8-1 through Figure 8-4 show the operation of
these four instructions. The steps show the sequence
of operation.
FIGURE 8-1:
TLWT INSTRUCTION
OPERATION
TABLE POINTER
TBLPTRH
TBLPTRL
TABLE LATCH (16-bit)
TABLATH TABLATL
TLWT 1,f
Data
Memory
TLWT 0,f
Program Memory
PIC17C7XX
FIGURE 8-2:
TABLWT INSTRUCTION
OPERATION
TABLE POINTER
TBLPTRH
TBLPTRL
TABLE LATCH (16-bit)
TABLATH TABLATL
3
TABLWT 1,i,f
Data
Memory
3
TABLWT 0,i,f
Program Memory
f
1
Prog-Mem
(TBLPTR)
2
Step 1: 8-bit value from register 'f', loaded into the high or low
byte in TABLAT (16-bit).
2: 16-bit TABLAT value written to address Program Memory
(TBLPTR).
3: If “i” = 1, then TBLPTR = TBLPTR + 1,
If “i” = 0, then TBLPTR is unchanged.
f
1
Step 1: 8-bit value from register 'f', loaded into the high or low
byte in TABLAT (16-bit).
 1998-2013 Microchip Technology Inc.
DS30289C-page 59