PIC17C75X
ADDLW
ADD Literal to WREG
ADDWF
Syntax:
ADD WREG to f
[ label ] ADDWF f,d
0 ≤ f ≤ 255
Syntax:
[ label ] ADDLW
k
Operands:
Operation:
Status Affected:
Encoding:
Description:
0 ≤ k ≤ 255
Operands:
d
[0,1]
(WREG) + k → (WREG)
Operation:
(WREG) + (f) → (dest)
OV, C, DC, Z
Status Affected:
Encoding:
OV, C, DC, Z
1011
0001
kkkk
kkkk
0000
111d
ffff
ffff
The contents of WREG are added to
the 8-bit literal 'k' and the result is
placed in WREG.
Add WREG to register 'f'. If 'd' is 0 the
result is stored in WREG. If 'd' is 1 the
result is stored back in register 'f'.
Description:
Words:
Cycles:
1
1
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q2
Q3
Q4
Decode
Read
literal 'k'
Process
Data
Write to
WREG
Decode
Read
register 'f'
Process
Data
Write to
destination
ADDLW
0x15
Example:
ADDWF
REG, 0
Example:
Before Instruction
WREG = 0x10
Before Instruction
WREG
REG
=
=
0x17
0xC2
After Instruction
WREG = 0x25
After Instruction
WREG
REG
=
=
0xD9
0xC2
DS30264A-page 188
1997 Microchip Technology Inc.