Datasheet
PIC17C4X
DS30412C-page 140 1996 Microchip Technology Inc.
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 Q2 Q3 Q4
Decode Read
register 'f'
Execute Write
register
TBLATH or
TBLATL
Example:
TLWT t, RAM
Before Instruction
t=0
RAM = 0xB7
TBLAT = 0x0000 (TBLATH = 0x00)
(TBLATL = 0x00)
After Instruction
RAM = 0xB7
TBLAT = 0x00B7 (TBLATH = 0x00)
(TBLATL = 0xB7)
Before Instruction
t=1
RAM = 0xB7
TBLAT = 0x0000 (TBLATH = 0x00)
(TBLATL = 0x00)
After Instruction
RAM = 0xB7
TBLAT = 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 Q2 Q3 Q4
Decode Read
register 'f'
Execute NOP
If skip:
Q1 Q2 Q3 Q4
Forced NOP NOP Execute NOP
Example:
HERE TSTFSZ CNT
NZERO :
ZERO :
Before Instruction
PC = Address(HERE)
After Instruction
If CNT = 0x00,
PC = Address (ZERO)
If CNT ≠ 0x00,
PC = Address (NZERO)