fs3861 Fortune Semiconductor Corporation, fs3861 Datasheet - Page 26

no-image

fs3861

Manufacturer Part Number
fs3861
Description
Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
ADDWF
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
ADDWF OPERAND, 0
Example 2:
ADDWF OPERAND, 1
ANDLW
Syntax
Operation
Flag Affected
Description
Cycle
Example:
ANDLW 5Fh
Fortune Semiconductor Corp.
Add the content of the W register
Add W to f
ADDWF
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [f] + [W]
C, CD, Z
and [f]. If d is 0, the result is
stored in the W register. If d is 1,
the result is stored back in f.
1
Before instruction:
After instruction:
Before instruction:
After instruction:
AND literal with W
ANDLW
0 ≤ k ≤ FFh
[W] ← [W] AND k
Z
AND the content of the W register
with the eight-bit literal "k".
The result is stored in the W
register.
1
Before instruction:
After instruction:
OPERAND = C2h
W = 17h
OPERAND = C2h
W = D9h
OPERAND = C2h
W = 17h
OPERAND = D9h
W = 17h
W = A3h
W = 03h
f, d
k
26/34
ADDWFC
Syntax
Operation
Flag Affected
Description
Cycle
Example
ADDWFC OPERAND,1
ANDWF
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
ANDWF OPERAND,0
Example 2:
ANDWF OPERAND,1
Add W, f and Carry
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [f] + [W] + C
C, DC, Z
Add the content of the W register,
[f] and Carry bit.
If d is 0, the result is stored in the
W register.
If d is 1, the result is stored back
in f.
1
Before instruction:
After instruction:
AND W and f
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [W] AND [f]
Z
AND the content of the W register
with [f].
If d is 0, the result is stored in the
W register.
If d is 1, the result is stored back
in f.
1
Before instruction:
After instruction:
Before instruction:
After instruction:
ADDWFC f, d
ANDWF
C = 1
OPERAND = 02h
W = 4Dh
C = 0
OPERAND = 50h
W = 4Dh
W = 0Fh, OPERAND = 88h
W = 08h, OPERAND = 88h
W = 0Fh, OPERAND = 88h
W = 88h, OPERAND = 08h
f, d
FS3861
Rev. 1.0

Related parts for fs3861