|
PIC16F882_09 Datasheet, PDF (235/328 Pages) Microchip Technology – 28/40/44-Pin, Enhanced Flash-Based 8-Bit CMOS Microcontrollers with nanoWatt Technology | |||
|
◁ |
PIC16F882/883/884/886/887
15.2 Instruction Descriptions
ADDLW
Syntax:
Operands:
Operation:
Status Affected:
Description:
Add literal and W
[ label ] ADDLW k
0 ⤠k ⤠255
(W) + k â (W)
C, DC, Z
The contents of the W register
are added to the eight-bit literal âkâ
and the result is placed in the
W register.
BCF
Syntax:
Operands:
Operation:
Status Affected:
Description:
Bit Clear f
[ label ] BCF f,b
0 ⤠f ⤠127
0â¤bâ¤7
0 â (f<b>)
None
Bit âbâ in register âfâ is cleared.
ADDWF
Syntax:
Operands:
Operation:
Status Affected:
Description:
Add W and f
[ label ] ADDWF f,d
0 ⤠f ⤠127
d â [0,1]
(W) + (f) â (destination)
C, DC, Z
Add the contents of the W register
with register âfâ. If âdâ is â0â, the
result is stored in the W register. If
âdâ is â1â, the result is stored back
in register âfâ.
ANDLW
Syntax:
Operands:
Operation:
Status Affected:
Description:
AND literal with W
[ label ] ANDLW k
0 ⤠k ⤠255
(W) .AND. (k) â (W)
Z
The contents of W register are
ANDâed with the eight-bit literal
âkâ. The result is placed in the W
register.
ANDWF
AND W with f
Syntax:
Operands:
Operation:
Status Affected:
[ label ] ANDWF f,d
0 ⤠f ⤠127
d â [0,1]
(W) .AND. (f) â (destination)
Z
Description:
AND the W register with register
âfâ. If âdâ is â0â, the result is stored in
the W register. If âdâ is â1â, the
result is stored back in register âfâ.
BSF
Syntax:
Operands:
Operation:
Status Affected:
Description:
Bit Set f
[ label ] BSF f,b
0 ⤠f ⤠127
0â¤bâ¤7
1 â (f<b>)
None
Bit âbâ in register âfâ is set.
BTFSC
Bit Test f, Skip if Clear
Syntax:
Operands:
[ label ] BTFSC f,b
0 ⤠f ⤠127
0â¤bâ¤7
Operation:
Status Affected:
Description:
skip if (f<b>) = 0
None
If bit âbâ in register âfâ is â1â, the next
instruction is executed.
If bit âbâ in register âfâ is â0â, the next
instruction is discarded, and a NOP
is executed instead, making this a
two-cycle instruction.
© 2009 Microchip Technology Inc.
DS41291F-page 233
|
▷ |