PIC18F2682-I/PT MICROCHIP [Microchip Technology], PIC18F2682-I/PT Datasheet - Page 403

no-image

PIC18F2682-I/PT

Manufacturer Part Number
PIC18F2682-I/PT
Description
28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
TBLRD
Syntax:
Operands:
Operation:
Status Affected: None
Encoding:
Description:
Words:
Cycles:
© 2007 Microchip Technology Inc.
Q Cycle Activity:
operation
Decode
No
Q1
(Read Program
None
(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
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.
The TBLRD instruction can modify the value
of TBLPTR as follows:
• no change
• post-increment
• post-decrement
• pre-increment
1
2
Table Read
TBLRD ( *; *+; *-; +*)
if TBLRD *,
No operation
operation
TBLPTR[0] = 0: Least Significant Byte of
TBLPTR[0] = 1: Most Significant Byte of
Memory)
0000
No
Q2
0000
operation
operation
Program Memory Word
Program Memory Word
No
No
Q3
0000
No operation
operation
TABLAT)
(Write
PIC18F2682/2685/4682/4685
No
Q4
nn=0 *
10nn
=1 *+
=2 *-
=3 +*
Preliminary
TBLRD
Example 1:
Example 2:
Before Instruction
After Instruction
Before Instruction
After Instruction
TABLAT
TBLPTR
MEMORY(00A356h)
TABLAT
TBLPTR
TABLAT
TBLPTR
MEMORY(01A357h)
MEMORY(01A358h)
TABLAT
TBLPTR
Table Read (Continued)
TBLRD
TBLRD
*+ ;
+* ;
=
=
=
=
=
=
=
=
=
=
=
DS39761B-page 401
55h
00A356h
34h
00A357h
0AAh
01A357h
34h
01A358h
34h
12h
34h

Related parts for PIC18F2682-I/PT