fs3861 Fortune Semiconductor Corporation, fs3861 Datasheet - Page 28

no-image

fs3861

Manufacturer Part Number
fs3861
Description
Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
CLRWDT
Syntax
Operation
Flag Affected
Description
Cycle
Example:
CLRWDT
DECF
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
DECF OPERAND,0
Example 2:
DECF OPERAND,1
Fortune Semiconductor Corp.
None
Clear watch dog timer
CLRWDT
Watch dog timer counter will be
reset
CLRWDT instruction will reset
watch dog timer counter.
1
After instruction:
Decrement f
DECF
0 ≤ f ≤ 255
d ∈ [0,1]
[Destination] ← [f] -1
Z
[f] is decremented. 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:
WDT = 0
TO = 1
PD = 1
W = 88h, OPERAND = 23h
W = 22h, OPERAND = 23h
W = 88h, OPERAND = 23h
W = 88h, OPERAND = 22h
f, d
28/34
COMF
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
COMF OPERAND,0
Example 2:
COMF OPERAND,1
DECFSZ
Syntax
Operation
Flag Affected
Description
Cycle
Example:
Node DECFSZ FLAG, 1
OP1
OP2
:
:
Complement f
0 ≤ f ≤ 255
d ∈ [0,1]
[f] ← NOT([f])
Z
[f] is complemented. 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:
W = DCh, OPERAND = 23h
Before instruction:
After instruction:
Decrement f, skip if zero
DECFSZ
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [f] -1, skip if the
result is zero
None
result is stored in the W register. If
d is 1, the result is stored back in
[f].
fetched instruction is discarded
and a NOP is executed instead of
making it a two-cycle instruction.
Before instruction:
After instruction:
COMF
[f] is decremented. If d is 0, the
1, 2
If the result is 0, then the next
W = 88h, OPERAND = 23h
W = 88h, OPERAND = 23h
W = 88h, OPERAND = DCh
PC = address (Node)
[FLAG] = [FLAG] - 1
If [FLAG] = 0
If [FLAG] ≠ 0
PC = address(OP1)
PC = address(OP2)
f, d
f, d
FS3861
Rev. 1.0

Related parts for fs3861