PIC16F716 Microchip Technology, PIC16F716 Datasheet - Page 85

no-image

PIC16F716

Manufacturer Part Number
PIC16F716
Description
8-bit Flash-based Microcontroller with A/D Converter and Enhanced Capture/Compare/PWM
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F716
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F716-1/P4AP
Manufacturer:
a
Quantity:
4
Part Number:
PIC16F716-E/ML
0
Part Number:
PIC16F716-E/SO
Manufacturer:
PIC
Quantity:
5 510
Part Number:
PIC16F716-E/SO
Manufacturer:
AMD
Quantity:
5 510
Part Number:
PIC16F716-E/SS
Manufacturer:
BCD
Quantity:
10
Part Number:
PIC16F716-I/P
Manufacturer:
MICROCHIP
Quantity:
5 373
Part Number:
PIC16F716-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Company:
Part Number:
PIC16F716-I/P
Quantity:
6 994
Company:
Part Number:
PIC16F716-I/P
Quantity:
3 900
Part Number:
PIC16F716-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F716-I/SO
0
Company:
Part Number:
PIC16F716-I/SO
Quantity:
2 000
Company:
Part Number:
PIC16F716-I/SO
Quantity:
1 680
Part Number:
PIC16F716-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
 2003 Microchip Technology Inc.
SUBWF
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
Words:
Cycles:
Example 1:
Example 2:
Example 3:
Subtract W from f
[ label ]
0
d
(f) - (W)
C, DC, Z
00
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’.
1
1
SUBWF
Before Instruction
After Instruction
Before Instruction
After Instruction
Before Instruction
After Instruction
f
[0,1]
REG1 = 3
W
C
REG1 = 1
W
C
Z
DC
REG1 = 2
W
C
REG1 = 0
W
C
Z
REG1 = 1
W
C
REG1 = 0xFF
W
C
Z
127
SUBWF f,d
0010
REG1, 1
= 2
= ?
= 2
= 1; result is positive
= 0
= 1
= 2
= ?
= 2
= 1; result is zero
= DC = 1
= 2
= ?
= 2
= 0; result is negative
= DC = 0
dest)
dfff
ffff
Preliminary
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
SWAPF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
TRIS
Load TRIS Register
[ label ] TRIS
5
(W)
None
00
The instruction is supported for
code compatibility with the
PIC16C5X products. Since TRIS
registers are readable and
writable, the user can directly
address them.
1
1
To maintain upward compatibil-
ity with future PICmicro
products, do not use this
instruction.
Swap Nibbles in f
[ label ]
0
d
(f<3:0>)
(f<7:4>)
None
00
The upper and lower nibbles of
register ‘f’ are exchanged. If ‘d’ is
0 the result is placed in W
register. If ‘d’ is 1 the result is
placed in register ‘f’.
1
1
SWAPF
Before Instruction
After Instruction
f
f
[0,1]
PIC16F716
6
REG1 = 0xA5
REG1 = 0xA5
W
TRIS register f;
127
0000
SWAPF f,d
1110
REG1, 0
(dest<7:4>),
(dest<3:0>)
= 0x5A
DS41206A-page 83
f
0110
dfff
®
0fff
ffff

Related parts for PIC16F716