fs3861 Fortune Semiconductor Corporation, fs3861 Datasheet - Page 25

no-image

fs3861

Manufacturer Part Number
fs3861
Description
Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
Note:
11.2 Instruction Description
(By alphabetically)
ADDLW
Syntax
Operation
Flag Affected
Description
Cycle
Example:
ADDLW 08h
Fortune Semiconductor Corp.
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
WDT: watchdog timer counter
Add Literal to W
ADDLW
0 ≤ k ≤ FFh
[W] ← [W] + k
C, DC, Z
The content of Work register add
literal “k” in Work register
1
Before instruction:
After instruction:
W = 08h
W = 10h
k
25/34
ADDPCW
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
ADDPCW
Example 2:
ADDPCW
Example 3:
ADDPCW
Add W to PC
ADDPCW
[PC] ← [PC] + 1 + [W], [W] < 79h
[PC] ← [PC] + 1 + ([W] – 100h),
otherwise
None
The relative address PC + 1 + W
are loaded into PC.
2
Before instruction:
After instruction:
Before instruction:
After instruction:
Before instruction:
After instruction:
W = 7Fh, PC = 0212h
PC = 0292h
W = 80h, PC = 0212h
PC = 0193h
W = FEh, PC = 0212h
PC = 0211h
FS3861
Rev. 1.0

Related parts for fs3861