English
Language : 

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