|
PIC16F688 Datasheet, PDF (125/174 Pages) Microchip Technology – 14-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology | |||
|
◁ |
PIC16F688
DECFSZ
Decrement f, Skip if 0
Syntax:
Operands:
Operation:
Status Affected:
Description:
[ label ] DECFSZ f,d
0 ⤠f ⤠127
d â [0,1]
(f) - 1 â (destination);
skip if result = 0
None
The contents of register âfâ are
decremented. 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â, then a NOP is
executed instead, making it a
2-cycle instruction.
GOTO
Unconditional Branch
Syntax:
Operands:
Operation:
Status Affected:
Description:
[ label ] GOTO k
0 ⤠k ⤠2047
k â PC<10:0>
PCLATH<4:3> â PC<12:11>
None
GOTO is an unconditional branch.
The eleven-bit immediate value is
loaded into PC bits <10:0>. The
upper bits of PC are loaded from
PCLATH<4:3>. GOTO is a
two-cycle instruction.
INCF
Syntax:
Operands:
Operation:
Status Affected:
Description:
Increment f
[ label ] INCF f,d
0 ⤠f ⤠127
d â [0,1]
(f) + 1 â (destination)
Z
The contents of register âfâ are
incremented. If âdâ is â0â, the result
is placed in the W register. If âdâ is
â1â, the result is placed back in
register âfâ.
INCFSZ
Increment f, Skip if 0
Syntax:
Operands:
Operation:
Status Affected:
Description:
[ label ] INCFSZ f,d
0 ⤠f ⤠127
d â [0,1]
(f) + 1 â (destination),
skip if result = 0
None
The contents of register âfâ are
incremented. 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 2-cycle
instruction.
MOVF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
Move f
[ label ] MOVF f,d
0 ⤠f ⤠127
d â [0,1]
(f) â (dest)
Z
00 1000 dfff ffff
The contents of register f is
moved to a destination dependent
upon the status of d. If d = 0,
destination is W register. If d = 1,
the destination is file register f
itself. d = 1 is useful to test a file
register since status flag Z is
affected.
1
1
MOVF FSR, 0
After Instruction
W = value in FSR
register
Z= 1
 2004 Microchip Technology Inc.
Preliminary
DS41203B-page 123
|
▷ |