參數(shù)資料
型號: 16F628
廠商: Microchip Technology Inc.
英文描述: CAT 5E CROSSOVER PATCH CORD CABLE BLUE 1 FT
中文描述: 基于閃存的8位CMOS微控制器
文件頁數(shù): 125/168頁
文件大?。?/td> 3760K
代理商: 16F628
2002 Microchip Technology Inc.
Preliminary
DS40044A-page 123
PIC16F627A/628A/648A
SUBWF
Subtract W from f
Syntax:
[
label
]
SUBWF f,d
Operands:
0
f
127
d
[0,1]
Operation:
(f) - (W)
→ (
dest)
Status
Affected:
C, DC, Z
Encoding:
00
0010
dfff
ffff
Description:
Subtract (2’s complement method)
W register from register 'f'. If 'd' is 0
the result is stored in the W register.
If 'd' is 1 the result is stored back in
register 'f'.
Words:
1
Cycles:
1
Example 1:
SUBWF
REG1, 1
Before Instruction
REG1 = 3
W
C
= 2
=
After Instruction
REG1 = 1
W
C
Z
= 2
= 1; result is positive
= DC = 1
Example 2:
Before Instruction
REG1 = 2
W
C
= 2
=
After Instruction
REG1 = 0
W
C
Z
= 2
= 1; result is zero
= DC = 1
Example 3:
Before Instruction
REG1 = 1
W
C
= 2
=
After Instruction
REG1 = 0xFF
W
= 2
C
= 0; result is negative
Z
= DC = 0
SWAPF
Swap Nibbles in f
Syntax:
[
label
]
SWAPF f,d
Operands:
0
f
127
d
[0,1]
Operation:
(f<3:0>)
(dest<7:4>),
(f<7:4>)
(dest<3:0>)
Status Affected:
None
Encoding:
00
1110
dfff
ffff
Description:
The upper and lower nibbles of
register 'f' are exchanged. If 'd' is
0 the result is placed in W regis-
ter. If 'd' is 1 the result is placed in
register 'f'.
Words:
1
Cycles:
1
Example
SWAPF
REG1, 0
Before Instruction
REG1 = 0xA5
After Instruction
REG1 =
W
0xA5
0x5A
=
TRIS
Load TRIS Register
Syntax:
[
label
] TRIS
5
f
7
(W)
TRIS register f;
f
Operands:
Operation:
Status Affected:
None
Encoding:
00
0000
0110
0fff
Description:
The instruction is supported for
code compatibility with the
PIC16C5X products. Since TRIS
registers are readable and writ-
able, the user can directly
address them.
Words:
1
Cycles:
1
Example
To maintain upward compatibil-
ity with future PICmicro
prod-
ucts, do not use this
instruction.
相關PDF資料
PDF描述
16M0 PC SERIAL MODEM CBL 50 FT
16M0B APPLE IIC CABLE TO IWRTR MODEM
16M0BC KEYBD.EXT. MINI DIN 4 MM 6 FT
16M0BS KEYBD.EXT. MINI DIN 4 MM 10 FT
16M0D MINI DIN 8, MALE-MALE 10 FT.
相關代理商/技術參數(shù)
參數(shù)描述
16F630 制造商:MICROCHIP 制造商全稱:Microchip Technology 功能描述:14-Pin FLASH-Based 8-Bit CMOS Microcontrollers
16F684-I 制造商:Microchip Technology Inc 功能描述:
16F6H 制造商:EDAL 制造商全稱:EDAL 功能描述:Silicon High Voltage Assembly
16F6H1 制造商:EDAL 制造商全稱:EDAL 功能描述:Silicon High Voltage Assembly
16F7674 制造商:未知廠家 制造商全稱:未知廠家 功能描述:SMD TWEEZER HEAD