欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC18F24J10-I/SO 参数 Datasheet PDF下载

PIC18F24J10-I/SO图片预览
型号: PIC18F24J10-I/SO
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚高性能, RISC微控制器 [28/40/44-Pin High-Performance, RISC Microcontrollers]
分类和应用: 微控制器
文件页数/大小: 368 页 / 5652 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第284页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第285页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第286页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第287页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第289页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第290页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第291页浏览型号PIC18F24J10-I/SO的Datasheet PDF文件第292页  
PIC18F45J10 FAMILY  
SUBWFB  
Subtract W from f with Borrow  
SWAPF  
Swap f  
Syntax:  
SUBWFB f {,d {,a}}  
Syntax:  
SWAPF f {,d {,a}}  
Operands:  
0 f 255  
d [0,1]  
a [0,1]  
Operands:  
0 f 255  
d [0,1]  
a [0,1]  
Operation:  
(f) – (W) – (C) dest  
Operation:  
(f<3:0>) dest<7:4>,  
(f<7:4>) dest<3:0>  
Status Affected:  
Encoding:  
N, OV, C, DC, Z  
0101  
10da  
ffff  
ffff  
Status Affected:  
Encoding:  
None  
Description:  
Subtract W and the Carry flag (borrow)  
from register ‘f’ (2’s complement  
method). If ‘d’ is ‘0’, the result is stored  
in W. If ‘d’ is ‘1’, the result is stored back  
in register ‘f’ (default).  
If ‘a’ is ‘0’, the Access Bank is selected.  
If ‘a’ is ‘1’, the BSR is used to select the  
GPR bank (default).  
If ‘a’ is ‘0’ and the extended instruction  
set is enabled, this instruction operates  
in Indexed Literal Offset Addressing  
mode whenever f 95 (5Fh). See  
Section 22.2.3 “Byte-Oriented and  
Bit-Oriented Instructions in Indexed  
Literal Offset Mode” for details.  
0011  
10da  
ffff  
ffff  
Description:  
The upper and lower nibbles of register  
‘f’ are exchanged. If ‘d’ is ‘0’, the result  
is placed in W. If ‘d’ is ‘1’, the result is  
placed in register ‘f’ (default).  
If ‘a’ is ‘0’, the Access Bank is selected.  
If ‘a’ is ‘1’, the BSR is used to select the  
GPR bank (default).  
If ‘a’ is ‘0’ and the extended instruction  
set is enabled, this instruction operates  
in Indexed Literal Offset Addressing  
mode whenever f 95 (5Fh). See  
Section 22.2.3 “Byte-Oriented and  
Bit-Oriented Instructions in Indexed  
Literal Offset Mode” for details.  
Words:  
Cycles:  
1
1
Words:  
1
1
Cycles:  
Q Cycle Activity:  
Q1  
Q Cycle Activity:  
Q1  
Q2  
Q3  
Q4  
Q2  
Q3  
Q4  
Decode  
Read  
register ‘f’  
Process  
Data  
Write to  
destination  
Decode  
Read  
register ‘f’  
Process  
Data  
Write to  
destination  
Example 1:  
SUBWFB REG, 1, 0  
Before Instruction  
REG  
W
=
=
=
19h  
0Dh  
1
(0001 1001)  
(0000 1101)  
Example:  
SWAPF  
REG, 1, 0  
C
Before Instruction  
After Instruction  
REG  
After Instruction  
=
53h  
35h  
REG  
W
C
=
0Ch  
0Dh  
1
(0000 1011)  
(0000 1101)  
=
=
=
=
REG  
=
Z
0
N
0
; result is positive  
Example 2:  
Before Instruction  
SUBWFB REG, 0, 0  
REG  
W
=
=
=
1Bh  
1Ah  
0
(0001 1011)  
(0001 1010)  
C
After Instruction  
REG  
W
C
=
1Bh  
00h  
1
(0001 1011)  
=
=
=
=
Z
1
; result is zero  
N
0
Example 3:  
SUBWFB REG, 1, 0  
Before Instruction  
REG  
W
=
=
=
03h  
0Eh  
1
(0000 0011)  
(0000 1101)  
C
After Instruction  
REG  
=
F5h  
(1111 0100)  
; [2’s comp]  
W
C
Z
=
=
=
=
0Eh  
0
0
1
(0000 1101)  
N
; result is negative  
DS39682E-page 286  
© 2009 Microchip Technology Inc.  
 复制成功!