English
Language : 

PIC17C7XX Datasheet, PDF (200/328 Pages) Microchip Technology – High-Performance 8-Bit CMOS EPROM Microcontrollers with 10-bit A/D
PIC17C7XX
ADDLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
ADD Literal to WREG
[ label ] ADDLW k
0 ≤ k ≤ 255
(WREG) + k → (WREG)
OV, C, DC, Z
1011 0001 kkkk kkkk
The contents of WREG are added to
the 8-bit literal 'k' and the result is
placed in WREG.
1
1
Q2
Read
literal 'k'
Q3
Process
Data
Q4
Write to
WREG
Example:
ADDLW
Before Instruction
WREG = 0x10
After Instruction
WREG = 0x25
0x15
ADDWF
ADD WREG to f
Syntax:
[ label ] ADDWF f,d
Operands:
0 ≤ f ≤ 255
d ∈ [0,1]
Operation:
(WREG) + (f) → (dest)
Status Affected: OV, C, DC, Z
Encoding:
0000 111d ffff ffff
Description:
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'.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
Read
register 'f'
Q3
Process
Data
Q4
Write to
destination
Example:
ADDWF
Before Instruction
WREG = 0x17
REG = 0xC2
After Instruction
WREG = 0xD9
REG = 0xC2
REG, 0
DS30289A-page 200
© 1998 Microchip Technology Inc.