English
Language : 

PIC17C7XX Datasheet, PDF (211/328 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
INCF
Increment f
Syntax:
[ label ] INCF f,d
Operands:
0 ≤ f ≤ 255
d ∈ [0,1]
Operation:
(f) + 1 → (dest)
Status Affected: OV, C, DC, Z
Encoding:
0001 010d ffff ffff
Description:
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
WREG. If 'd' is 1 the result is placed
back in register 'f'.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
Read
register 'f'
Q3
Process
Data
Q4
Write to
destination
Example:
INCF
Before Instruction
CNT = 0xFF
Z
=0
C
=?
After Instruction
CNT =
Z
=
C
=
0x00
1
1
CNT, 1
INCFSZ
Increment f, skip if 0
Syntax:
[ label ] INCFSZ f,d
Operands:
0 ≤ f ≤ 255
d ∈ [0,1]
Operation:
(f) + 1 → (dest)
skip if result = 0
Status Affected: None
Encoding:
0001 111d ffff ffff
Description:
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
WREG. If 'd' is 1 the result is placed
back in register 'f'.
If the result is 0, the next instruction,
which is already fetched, is discarded,
and an NOP is executed instead making
it 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
Q4
Write to
destination
Q3
No
operation
Q4
No
operation
Example:
HERE
NZERO
ZERO
INCFSZ
:
:
CNT, 1
Before Instruction
PC
= Address (HERE)
After Instruction
CNT =
If CNT =
PC =
If CNT ≠
PC =
CNT + 1
0;
Address(ZERO)
0;
Address(NZERO)
© 1998 Microchip Technology Inc.
DS30289A-page 211