PIC16CR54C
ADDWF
Syntax:
Add W and f
[ label ] ADDWF f,d
0 ≤ f ≤ 31
ANDWF
Syntax:
AND W with f
[ label ] ANDWF f,d
0 ≤ f ≤ 31
Operands:
Operands:
d
[0,1]
d
[0,1]
Operation:
(W) + (f) → (dest)
Operation:
(W) .AND. (f) → (dest)
Status Affected: C, DC, Z
Status Affected:
Encoding:
Z
0001
11df
ffff
0001
01df
ffff
Encoding:
Add the contents of the W register and
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'.
The contents of the W register are
AND’ed 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'.
Description:
Description:
Words:
1
Words:
1
1
Cycles:
Example:
1
Cycles:
Example:
ADDWF FSR, 0
ANDWF FSR,
1
Before Instruction
Before Instruction
0x17
W
=
0x17
W
=
FSR = 0xC2
FSR = 0xC2
After Instruction
After Instruction
W
=
0xD9
W
=
0x17
FSR = 0xC2
FSR = 0x02
ANDLW
And literal with W
BCF
Bit Clear f
Syntax:
[ label ] ANDLW
k
Syntax:
Operands:
[ label ] BCF f,b
Operands:
Operation:
Status Affected:
Encoding:
Description:
0 ≤ k ≤ 255
0 ≤ f ≤ 31
0 ≤ b ≤ 7
(W).AND. (k) → (W)
Operation:
0 → (f<b>)
Z
Status Affected: None
1110
kkkk
kkkk
0100
bbbf
ffff
Encoding:
Description:
Words:
The contents of the W register are
AND’ed with the eight-bit literal 'k'. The
result is placed in the W register.
Bit 'b' in register 'f' is cleared.
1
1
Words:
1
Cycles:
Cycles:
Example:
1
BCF
FLAG_REG,
7
Example:
ANDLW 0x5F
Before Instruction
FLAG_REG = 0xC7
Before Instruction
0xA3
W
=
After Instruction
FLAG_REG = 0x47
After Instruction
0x03
W
=
1998 Microchip Technology Inc.
Preliminary
DS40191A-page 39