English
Language : 

PIC17C7XX Datasheet, PDF (228/328 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
TLWT
Table Latch Write
Syntax:
[ label ] TLWT t,f
Operands:
0 ≤ f ≤ 255
t ∈ [0,1]
Operation:
If t = 0,
f → TBLATL;
If t = 1,
f → TBLATH
Status Affected: None
Encoding:
1010 01tx ffff ffff
Description:
Data from file register 'f' is written into
the 16-bit table latch (TBLAT).
If t = 1; high byte is written
If t = 0; low byte is written
This instruction is used in conjunction
with TABLWT to transfer data from data
memory to program memory.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
Read
register 'f'
Q3
Process
Data
Q4
Write
register
TBLATH or
TBLATL
Example:
TLWT t, RAM
Before Instruction
t
=0
RAM = 0xB7
TBLAT = 0x0000
(TBLATH = 0x00)
(TBLATL = 0x00)
After Instruction
RAM =
TBLAT =
0xB7
0x00B7
(TBLATH = 0x00)
(TBLATL = 0xB7)
Before Instruction
t
=1
RAM = 0xB7
TBLAT = 0x0000
(TBLATH = 0x00)
(TBLATL = 0x00)
After Instruction
RAM =
TBLAT =
0xB7
0xB700
(TBLATH = 0xB7)
(TBLATL = 0x00)
TSTFSZ
Test f, skip if 0
Syntax:
[ label ] TSTFSZ f
Operands:
0 ≤ f ≤ 255
Operation:
skip if f = 0
Status Affected: None
Encoding:
0011 0011 ffff ffff
Description:
If 'f' = 0, the next instruction, fetched
during the current instruction execution,
is discarded and an NOP is executed
making this a two-cycle instruction.
Words:
1
Cycles:
1 (2)
Q Cycle Activity:
Q1
Decode
If skip:
Q1
No
operation
Q2
Read
register 'f'
Q2
No
operation
Q3
Process
Data
Q3
No
operation
Q4
No
operation
Q4
No
operation
Example:
HERE
NZERO
ZERO
TSTFSZ CNT
:
:
Before Instruction
PC = Address (HERE)
After Instruction
If CNT
=
PC
=
If CNT
≠
PC
=
0x00,
Address (ZERO)
0x00,
Address (NZERO)
DS30289A-page 228
© 1998 Microchip Technology Inc.