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

PIC18C452-I/L 参数 Datasheet PDF下载

PIC18C452-I/L图片预览
型号: PIC18C452-I/L
PDF下载: 下载PDF文件 查看货源
内容描述: 高性能微控制器,10位A / D [High-Performance Microcontrollers with 10-Bit A/D]
分类和应用: 微控制器
文件页数/大小: 296 页 / 4835 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18C452-I/L的Datasheet PDF文件第225页浏览型号PIC18C452-I/L的Datasheet PDF文件第226页浏览型号PIC18C452-I/L的Datasheet PDF文件第227页浏览型号PIC18C452-I/L的Datasheet PDF文件第228页浏览型号PIC18C452-I/L的Datasheet PDF文件第230页浏览型号PIC18C452-I/L的Datasheet PDF文件第231页浏览型号PIC18C452-I/L的Datasheet PDF文件第232页浏览型号PIC18C452-I/L的Datasheet PDF文件第233页  
PIC18CXX2  
Subtract WREG from f with  
Borrow  
Subtract WREG from f with  
Borrow (cont’d)  
SUBWFB  
SUBWFB  
SUBWFB REG, 1, 0  
Syntax:  
[ label ]  
Example 1:  
SUBWFB f,d,a  
Before Instruction  
Operands:  
0 f 255  
REG  
=
0x19  
0x0D  
1
(0001 1001)  
(0000 1101)  
d
a
[0,1]  
[0,1]  
WREG  
C
=
=
Operation:  
(f) – (WREG) – (C) dest  
After Instruction  
REG  
WREG  
C
Z
N
=
=
=
=
=
0x0C  
0x0D  
1
0
0
(0000 1011)  
(0000 1101)  
Status Affected:  
Encoding:  
N,OV, C, DC, Z  
0101  
10da  
ffff  
ffff  
Description:  
Subtract WREG and the carry flag  
(borrow) from register 'f' (2’s com-  
plement method). If 'd' is 0, the  
; result is positive  
Example2: SUBWFBREG, 0, 0  
Before Instruction  
result is stored in WREG. If 'd' is  
1, the result is stored back in reg-  
ister 'f' (default). If ’a’ is 0, the  
Access Bank will be selected,  
overriding the BSR value. If ’a’ is  
1, then the bank will be selected  
as per the BSR value (default).  
REG  
=
0x1B  
0x1A  
0
(0001 1011)  
(0001 1010)  
WREG  
C
=
=
After Instruction  
REG  
=
0x1B  
0x00  
1
1
0
(0001 1011)  
WREG  
=
C
Z
N
=
=
=
; result is zero  
Words:  
Cycles:  
1
1
Example3: SUBWFBREG, 1, 0  
Q Cycle Activity:  
Q1  
Before Instruction  
Q2  
Q3  
Q4  
REG  
=
0x03  
0x0E  
1
(0000 0011)  
(0000 1101)  
Decode  
Read  
register ’f’  
Process  
Data  
Write to  
destination  
WREG  
C
=
=
After Instruction  
REG  
comp]  
=
0xF5  
(1111 0100) [2’s  
WREG  
=
0x0E  
(0000 1101)  
C
Z
N
=
=
=
0
0
1
; result is negative  
7/99 Microchip Technology Inc.  
Preliminary  
DS39026B-page 229  
 复制成功!