English
Language : 

PIC18F45J10 Datasheet, PDF (281/358 Pages) Microchip Technology – 28/40/44-Pin High-Performance RISC Microcontrollers with nanoWatt Technology
PIC18F45J10 FAMILY
TBLRD
Table Read
Syntax:
TBLRD ( *; *+; *-; +*)
Operands:
None
Operation:
if TBLRD *,
(Prog Mem (TBLPTR)) → TABLAT;
TBLPTR – No Change
if TBLRD *+,
(Prog Mem (TBLPTR)) → TABLAT;
(TBLPTR) + 1 → TBLPTR
if TBLRD *-,
(Prog Mem (TBLPTR)) → TABLAT;
(TBLPTR) – 1 → TBLPTR
if TBLRD +*,
(TBLPTR) + 1 → TBLPTR;
(Prog Mem (TBLPTR)) → TABLAT
Status Affected: None
Encoding:
0000
0000
0000
10nn
nn=0 *
=1 *+
=2 *-
=3 +*
Description:
This instruction is used to read the contents
of Program Memory (P.M.). To address the
program memory, a pointer called Table
Pointer (TBLPTR) is used.
The TBLPTR (a 21-bit pointer) points to
each byte in the program memory. TBLPTR
has a 2-Mbyte address range.
TBLPTR[0] = 0: Least Significant Byte
of Program Memory
Word
TBLPTR[0] = 1: Most Significant Byte
of Program Memory
Word
The TBLRD instruction can modify the value
of TBLPTR as follows:
• no change
• post-increment
• post-decrement
• pre-increment
Words:
1
Cycles:
2
Q Cycle Activity:
Q1
Decode
No
operation
Q2
No
operation
No operation
(Read Program
Memory)
Q3
No
operation
No
operation
Q4
No
operation
No operation
(Write TABLAT)
TBLRD
Table Read (Continued)
Example 1:
TBLRD *+ ;
Before Instruction
TABLAT
=
TBLPTR
=
MEMORY (00A356h) =
After Instruction
TABLAT
=
TBLPTR
=
Example 2:
TBLRD +* ;
Before Instruction
TABLAT
=
TBLPTR
=
MEMORY (01A357h) =
MEMORY (01A358h) =
After Instruction
TABLAT
=
TBLPTR
=
55h
00A356h
34h
34h
00A357h
AAh
01A357h
12h
34h
34h
01A358h
© 2007 Microchip Technology Inc.
Preliminary
DS39682C-page 279