欢迎访问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文件第223页浏览型号PIC18C452-I/L的Datasheet PDF文件第224页浏览型号PIC18C452-I/L的Datasheet PDF文件第225页浏览型号PIC18C452-I/L的Datasheet PDF文件第226页浏览型号PIC18C452-I/L的Datasheet PDF文件第228页浏览型号PIC18C452-I/L的Datasheet PDF文件第229页浏览型号PIC18C452-I/L的Datasheet PDF文件第230页浏览型号PIC18C452-I/L的Datasheet PDF文件第231页  
PIC18CXX2  
SUBFWB  
SUBLW  
Subtract WREG from literal  
SUBFWB  
REG, 1, 0  
Example 1:  
Syntax:  
[ label ]  
SUBLW k  
Before Instruction  
Operands:  
Operation:  
0 k 255  
REG  
WREG  
C
=
=
=
3
2
1
k – (WREG) WREG  
N,OV, C, DC, Z  
Status Affected:  
Encoding:  
After Instruction  
REG  
WREG  
C
Z
N
=
=
=
=
=
FF  
2
0
0
1
0000  
1000  
kkkk  
kkkk  
Description:  
WREG is subtracted from the  
eight bit literal 'k'. The result is  
placed in WREG.  
; result is negative  
REG, 0, 0  
SUBFWB  
Example 2:  
Words:  
Cycles:  
1
1
Before Instruction  
REG  
WREG  
C
=
=
=
2
5
1
Q Cycle Activity:  
Q1  
Q2  
Q3  
Q4  
Decode  
Read  
literal ’k’  
Process  
Data  
Write to  
WREG  
After Instruction  
REG  
=
2
3
1
0
0
WREG  
=
SUBLW 0x02  
Example 1:  
C
Z
N
=
=
=
Before Instruction  
; result is positive  
REG, 1, 0  
WREG  
C
=
=
1
?
SUBFWB  
Example 3:  
After Instruction  
Before Instruction  
REG  
=
1
WREG  
=
1
WREG  
C
=
=
2
0
C
Z
N
=
=
=
1
0
0
; result is positive  
After Instruction  
REG  
WREG  
=
=
0
2
SUBLW 0x02  
Example 2:  
C
Z
N
=
=
=
1
1
0
Before Instruction  
; result is zero  
WREG  
C
=
=
2
?
After Instruction  
WREG  
=
0
C
Z
N
=
=
=
1
1
0
; result is zero  
SUBLW 0x02  
Example 3:  
Before Instruction  
WREG  
C
=
=
3
?
After Instruction  
WREG  
=
FF  
; (2’s complement)  
; result is negative  
C
Z
N
=
=
=
0
0
1
7/99 Microchip Technology Inc.  
Preliminary  
DS39026B-page 227  
 复制成功!