欢迎访问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文件第224页浏览型号PIC18C452-I/L的Datasheet PDF文件第225页浏览型号PIC18C452-I/L的Datasheet PDF文件第226页浏览型号PIC18C452-I/L的Datasheet PDF文件第227页浏览型号PIC18C452-I/L的Datasheet PDF文件第229页浏览型号PIC18C452-I/L的Datasheet PDF文件第230页浏览型号PIC18C452-I/L的Datasheet PDF文件第231页浏览型号PIC18C452-I/L的Datasheet PDF文件第232页  
PIC18CXX2  
SUBWF  
SUBWF  
Subtract WREG from f  
Subtract WREG from f (cont’d)  
SUBWF  
REG, 1, 0  
Syntax:  
[ label ]  
Example 1:  
SUBWF f,d,a  
Before Instruction  
Operands:  
0 f 255  
REG  
=
3
2
?
d
a
[0,1]  
[0,1]  
WREG  
C
=
=
Operation:  
(f) – (WREG) dest  
After Instruction  
REG  
WREG  
C
Z
N
=
=
=
=
=
1
2
1
0
0
Status Affected:  
Encoding:  
N,OV, C, DC, Z  
0101  
11da  
ffff  
ffff  
; result is positive  
REG, 0, 0  
Description:  
Subtract WREG from register 'f'  
(2’s complement method). If 'd' is  
SUBWF  
Example 2:  
0, the result is stored in WREG. If  
'd' is 1, the result is stored back in  
register '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).  
Before Instruction  
REG  
=
2
2
?
WREG  
C
=
=
After Instruction  
REG  
=
2
0
WREG  
=
C
Z
N
=
=
=
1
1
0
; result is zero  
REG, 1, 0  
Words:  
Cycles:  
1
1
SUBWF  
Example 3:  
Q Cycle Activity:  
Q1  
Q2  
Q3  
Q4  
Before Instruction  
REG  
WREG  
C
=
=
=
1
2
?
Decode  
Read  
register ’f’  
Process  
Data  
Write to  
destination  
After Instruction  
REG  
=
FFh  
;(2’s complement)  
WREG  
=
2
C
Z
N
=
=
=
0
0
1
; result is negative  
DS39026B-page 228  
Preliminary  
7/99 Microchip Technology Inc.  
 复制成功!