English
Language : 

PIC16C9XX Datasheet, PDF (128/189 Pages) Microchip Technology – 8-Bit CMOS Microcontroller with LCD Driver
PIC16C9XX
INCF
Increment f
Syntax:
[ label ] INCF f,d
Operands:
0 ≤ f ≤ 127
d ∈ [0,1]
Operation:
(f) + 1 → (destination)
Status Affected: Z
Encoding:
00
1010 dfff ffff
Description:
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
the W register. If 'd' is 1 the result is
placed back in register 'f'.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1 Q2 Q3
Q4
Decode
Read
register
'f'
Process Write to
data destination
Example
INCF CNT, 1
Before Instruction
CNT =
Z
=
After Instruction
CNT =
Z
=
0xFF
0
0x00
1
INCFSZ
Increment f, Skip if 0
Syntax:
[ label ] INCFSZ f,d
Operands:
0 ≤ f ≤ 127
d ∈ [0,1]
Operation:
(f) + 1 → (destination),
skip if result = 0
Status Affected: None
Encoding:
00
1111 dfff ffff
Description:
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
the W register. If 'd' is 1 the result is
placed back in register 'f'.
If the result is 1, the next instruction is
executed. If the result is 0, a NOP is
executed instead making it a 2TCY
instruction.
Words:
1
Cycles:
1(2)
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode Read Process Write to
register 'f' data destination
If Skip: (2nd Cycle)
Q1
Q2
Q3
Q4
No-
No-
No-
No-
Operation Operation Operation Operation
Example
HERE
INCFSZ
GOTO
CONTINUE •
•
•
CNT, 1
LOOP
Before Instruction
PC = address HERE
After Instruction
CNT = CNT + 1
if CNT= 0,
PC = address CONTINUE
if CNT≠ 0,
PC = address HERE +1
DS30444E - page 128
© 1997 Microchip Technology Inc.