PIC16F785-E/SS Microchip Technology, PIC16F785-E/SS Datasheet - Page 136

20 PIN, 3.5 KB STD FLASH, 128 RAM, 18 I/O PB FREE,

PIC16F785-E/SS

Manufacturer Part Number
PIC16F785-E/SS
Description
20 PIN, 3.5 KB STD FLASH, 128 RAM, 18 I/O PB FREE,
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F785-E/SS

Rohs Compliant
YES
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
17
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
20-SSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT20SS1-1 - SOCKET TRANSITION 20DIP 20SSOPAC162060 - HEADER INTRFC MPLAB ICD2 20PIN
Connectivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PIC16F785/HV785
DS41249E-page 134
SUBLW
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
SUBWF
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
SWAPF
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
Subtract W from f
[label]
0 ≤ f ≤ 127
d ∈ [0,1]
(f) - (W) → (dest)
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’.
C = 1; result is positive or zero
C = 0; result is negative
Subtract W from Literal
[label]
0 ≤ k ≤ 255
k - (W) → (W)
C, DC, Z
11
The W register is subtracted (2’s
complement method) from the
eight-bit literal ‘k’. The result is
placed in the W register.
C = 1; result is positive or zero
C = 0; result is negative
Swap Nibbles in f
[ label
]
0 ≤ f ≤ 127
d ∈ [0,1]
(f<3:0>) → (dest<7:4>),
(f<7:4>) → (dest<3:0>)
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’.
SUBWF f,d
0010
SUBLW k
110x
SWAPF f,d
1110
dfff
kkkk
dfff
ffff
kkkk
ffff
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
TRIS
XORLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Load TRIS Register
[ label ] TRIS
5 ≤ f ≤ 6
(W) → TRIS register f;
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 compati-
bility with future PIC
products, do not use this
instruction.
Exclusive OR Literal with W
[label]
0 ≤ k ≤ 255
(W) .XOR. k → (W)
Z
11
The contents of the W register
are XOR’ed with the eight-bit
literal ‘k’. The result is placed
in the W register.
© 2008 Microchip Technology Inc.
0000
1010
XORLW k
f
0110
kkkk
®
0fff
kkkk

Related parts for PIC16F785-E/SS