|
PIC16F676-I Datasheet, PDF (75/132 Pages) Microchip Technology – 14-Pin, Flash-Based 8-Bit CMOS Microcontrollers | |||
|
◁ |
10.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.
ADDWF
Syntax:
Operands:
Operation:
Status Affected:
Description:
Add W and f
[label] ADDWF f,d
0 ï£ f ï£ 127
d ïï ïï°ï¬ï±ï
(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
Syntax:
Operands:
Operation:
Status Affected:
Description:
AND W with f
[label] ANDWF f,d
0 ï£ f ï£ 127
d ïï ïï°ï¬ï±ï
(W) .AND. (f) ï® (destination)
Z
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â.
ï£ 2010 Microchip Technology Inc.
PIC16F630/676
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.
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.
BTFSS
Bit Test f, Skip if Set
Syntax:
Operands:
Operation:
Status Affected:
Description:
[label] BTFSS f,b
0 ï£ f ï£ 127
0ï£b<7
skip if (f<b>) = 1
None
If bit âbâ in register âfâ is â0â, the next
instruction is executed.
If bit âbâ is â1â, then the next instruc-
tion is discarded and a NOP is
executed instead, making this a
2-cycle instruction.
BTFSC
Bit Test, Skip if Clear
Syntax:
Operands:
Operation:
Status Affected:
Description:
[label] BTFSC f,b
0 ï£ f ï£ 127
0ï£bï£7
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 2-cycle instruction.
DS40039F-page 75
|
▷ |