PIC17C75X
ADDWFC
Syntax:
ADD WREG and Carry bit to f
[ label ] ADDWFC f,d
0 ≤ f ≤ 255
ANDLW
And Literal with WREG
Syntax:
[ label ] ANDLW
k
Operands:
Operands:
Operation:
Status Affected:
Encoding:
Description:
0 ≤ k ≤ 255
d
[0,1]
(WREG) .AND. (k) → (WREG)
Operation:
(WREG) + (f) + C → (dest)
Z
Status Affected:
Encoding:
OV, C, DC, Z
1011
0101
kkkk
kkkk
0001
000d
ffff
ffff
The contents of WREG are AND’ed with
the 8-bit literal 'k'.The result is placed in
WREG.
Add WREG, the Carry Flag and data
memory location 'f'. If 'd' is 0, the result is
placed in WREG. If 'd' is 1, the result is
placed in data memory location 'f'.
Description:
Words:
Cycles:
1
1
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q Cycle Activity:
Q1
Decode
Read literal
'k'
Process
Data
Write to
WREG
Q2
Q3
Q4
Decode
Read
register 'f'
Process
Data
Write to
destination
ANDLW
0x5F
Example:
Before Instruction
ADDWFC
REG
0
Example:
WREG
=
0xA3
0x03
Before Instruction
After Instruction
Carry bit =
1
WREG
=
REG
WREG
=
=
0x02
0x4D
After Instruction
Carry bit =
0
REG
WREG
=
=
0x02
0x50
1997 Microchip Technology Inc.
DS30264A-page 189