13.1 Instruction Descriptions
ADDLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Add Literal and W
[ label ] ADDLW k
0 ≤ k ≤ 255
(W) + k → (W)
C, DC, Z
11 111x kkkk kkkk
The contents of the W register are
added to the eight-bit literal ’k’ and
the result is placed in the W
register.
1
1
Q1
Q2
Q3
Q4
Decode Read Process Write to
literal ’k’ data
W
Example:
ADDLW
Before Instruction:
W = 0x10
After Instruction:
W = 0x25
0x15
PIC16C925/926
ADDWF
Add W and f
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
[ label ] ADDWF f [,d]
0 ≤ f ≤ 127
d ∈ [0,1]
(W) + (f) → (destination)
C, DC, Z
00
0111 dfff ffff
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’.
1
1
Q1
Q2 Q3
Q4
Decode Read Process Write to
register ’f’ data destination
Example
ADDWF FSR, 0
Before Instruction:
W
= 0x17
FSR = 0xC2
After Instruction:
W
= 0xD9
FSR = 0xC2
2001 Microchip Technology Inc.
Preliminary
DS39544A-page 115