PIC17C75X
TABLWT
Table Write
TLRD
Table Latch Read
TABLWT 1, 1, REG
Example1:
Syntax:
Operands:
[ label ] TLRD t,f
Before Instruction
0 ≤ f ≤ 255
REG
TBLATH
TBLATL
TBLPTR
=
=
=
=
=
0x53
0xAA
0x55
0xA356
0xFFFF
t
[0,1]
If t = 0,
TBLATL → f;
If t = 1,
TBLATH → f
None
Operation:
MEMORY(TBLPTR)
After Instruction (table write completion)
Status Affected:
Encoding:
REG
TBLATH
TBLATL
TBLPTR
=
=
=
=
=
0x53
0x53
0x55
0xA357
0x5355
1010
00tx
ffff
ffff
Read data from 16-bit table latch
(TBLAT) into file register 'f'. Table Latch
is unaffected.
Description:
MEMORY(TBLPTR - 1)
TABLWT 0, 0, REG
Example 2:
If t = 1; high byte is read
If t = 0; low byte is read
Before Instruction
REG
TBLATH
TBLATL
TBLPTR
=
=
=
=
=
0x53
0xAA
0x55
0xA356
0xFFFF
This instruction is used in conjunction
with TABLRDto transfer data from pro-
gram memory to data memory.
Words:
Cycles:
1
1
MEMORY(TBLPTR)
After Instruction (table write completion)
REG
TBLATH
TBLATL
TBLPTR
=
=
=
=
=
0x53
0xAA
0x53
0xA356
0xAA53
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register
Process
Data
Write
register 'f'
MEMORY(TBLPTR)
TBLATH or
TBLATL
Program
Memory
Data
15
15
0
0
Memory
TLRD
t, RAM
Example:
TBLPTR
Before Instruction
t
=
=
=
0
?
8
7
RAM
TBLAT
0x00AF (TBLATH = 0x00)
(TBLATL = 0xAF)
16 bits
8 bits
TBLAT
After Instruction
RAM
=
0xAF
TBLAT
=
0x00AF (TBLATH = 0x00)
(TBLATL = 0xAF)
Before Instruction
t
=
=
=
1
?
RAM
TBLAT
0x00AF (TBLATH = 0x00)
(TBLATL = 0xAF)
After Instruction
RAM
=
0x00
TBLAT
=
0x00AF (TBLATH = 0x00)
(TBLATL = 0xAF)
Program
Memory
Data
Memory
15
15
0
0
TBLPTR
8
7
16 bits
8 bits
TBLAT
1997 Microchip Technology Inc.
DS30264A-page 215