fs3861 Fortune Semiconductor Corporation, fs3861 Datasheet - Page 24
fs3861
Manufacturer Part Number
fs3861
Description
Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
1.FS3861.pdf
(34 pages)
11. Instruction Set
and one or more operands. The detailed descriptions are shown as below.
11.1 Instruction Set Summary
Fortune Semiconductor Corp.
ADDLW k
ADDPCW
ADDWF f, d
ADDWFC f, d
ANDLW k
ANDWF f, d
BCF f, b
BSF f, b
BTFSC f, b
BTFSS f, b
CALL k
CLRF f
CLRWDT
COMF f, d
DECF f, d
DECFSZ f, d
GOTO k
HALT
INCF f, d
INCFSZ f, d
IORLW k
IORWF f, d
MOVFW f
MOVLW k
MOVWF f
NOP
RETFIE
RETLW k
RETURN
RLF f, d
RRF f, d
SLEEP
SUBLW k
SUBWF f, d
SUBWFC f, d
XORLW k
XORWF f, d
The FS3861 instruction set consists of 37 instructions. Each instruction is a 16-bit word with an OPCODE
Instruction
[W] ← [W] + k
[PC] ← [PC] + 1 + [W]
[Destination] ← [f] + [W]
[Destination] ← [f] + [W] + C
[W] ← [W] AND k
[Destination] ← [W] AND [f]
[f<b>] ← 0
[f<b>] ← 1
Skip if [f<b>] = 0
Skip if [f<b>] = 1
Push PC + 1 and GOTO k
[f] ← 0
Clear watch dog timer
[f] ← NOT([f])
[Destination] ← [f] -1
[Destination] ← [f] -1, skip if the result is zero
PC ← k
CPU Stop
[Destination] ← [f] +1
[Destination] ← [f] + 1, skip if the result is zero
[W] ← [W] | k
[Destination] ← [W] | [f]
[W] ← [f]
[W] ← k
[f] ← [W]
No operation
Pop PC and GIE = 1
RETURN and W = k
Pop PC
[Destination<n+1>] ← [f<n>]
[Destination<n-1>] ← [f<n>]
Stop OSC
[W] ← k – [W]
[Destination] ← [f] – [W]
[Destination] ← [f] – [W] – C
[W] ← [W] XOR k
[Destination] ← [W] XOR [f]
Table11-1: FS3861 Instruction Set
Operation
•
24/34
Cycle
1, 2
1, 2
1, 2
1, 2
1
2
1
1
1
1
1
1
2
1
1
1
1
2
1
1
1
1
1
1
1
1
2
2
2
1
1
1
1
1
1
1
1
C, DC, Z
None
C, DC, Z
C, DC, Z
Z
Z
None
None
None
None
None
Z
None
Z
Z
None
None
None
Z
None
Z
Z
None
None
None
None
None
None
None
C,Z
C, Z
PD
C, DC, Z
C, DC, Z
C, DC, Z
Z
Z
FS3861
Flag
Rev. 1.0