fs3862 Fortune Semiconductor Corporation, fs3862 Datasheet - Page 22

no-image

fs3862

Manufacturer Part Number
fs3862
Description
8-bit Mcu With 1k Program Eprom, 64-byte Sram, 5-bit I/o Port, Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
Rev. 1.3
Table12-1: FS3862 Instruction Set
Note:
12.1
Instruction Set Summary
f: memory address (00h ~ 7Fh).
W: work register.
k: literal field, constant data or label.
d: destination select: d=0 store result in W, d=1: store result in memory address f.
b: bit select (0~7).
[f]: the content of memory address f.
PC: program counter.
C: Carry flag
DC: Digit carry flag
Z: Zero flag
PD: power down flag
TO: watchdog time out flag (The watchdog function is removed in FS3862)
Instruction
ADDWFC f, d [Destination] ← [f] + [W] + C
SUBWFC f, d [Destination] ← [f] – [W] – C •
DECFSZ f, d [Destination] ← [f] -1, skip if the result is zero
ADDWF f, d
ANDWF f, d
XORWF f, d [Destination] ← [W] XOR [f]
INCFSZ f, d
SUBWF f, d
BTFSC f, b
IORWF f, d
BTFSS f, b
COMF f, d
MOVLW k
ADDLW k
ANDLW k
DECF f, d
MOVFW f
MOVWF f
XORLW k
SUBLW k
IORLW k
INCF f, d
ADDPCW
BCF f, b
GOTO k
RRF f, d
BSF f, b
CLRWDT
RETLW k
RLF f, d
CALL k
RETURN
CLRF f
RETFIE
SLEEP
HALT
NOP
Operation
[W] ← [W] + k
[PC] ← [PC] + 1 + [W]
[Destination] ← [f] + [W]
[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
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]
[W] ← [W] XOR k
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
1
1
1
1
1
1
1
1
2
Flag
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
FS3862
22/32

Related parts for fs3862