PIC16C84-04/P Microchip Technology, PIC16C84-04/P Datasheet - Page 65

MICRO CTRL 1KX14 EPR EEPR 18DIP

PIC16C84-04/P

Manufacturer Part Number
PIC16C84-04/P
Description
MICRO CTRL 1KX14 EPR EEPR 18DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheet

Specifications of PIC16C84-04/P

Core Processor
PIC
Core Size
8-Bit
Speed
4MHz
Peripherals
POR, WDT
Number Of I /o
13
Program Memory Size
1.75KB (1K x 14)
Program Memory Type
EEPROM
Eeprom Size
64 x 8
Ram Size
36 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 6 V
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
18-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Request inventory verification / Request inventory verification
Data Converters
-
Connectivity
-
SUBWF
Syntax:
Operands:
Operation:
Description:
Words:
Cycles:
Q Cycle Activity:
Example 1:
Example 2:
Example 3:
Status Affected: C, DC, Z
Encoding:
1998 Microchip Technology Inc.
Subtract W from f
[ label ]
0
d
(f) - (W)
Subtract (2’s complement method) W reg-
ister 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
Decode
Q1
00
f
[0,1]
REG1
W
C
Z
REG1
W
C
Z
REG1
W
C
Z
REG1
W
C
Z
REG1
W
C
Z
REG1
W
C
Z
127
register 'f'
SUBWF f,d
destination)
0010
Read
Q2
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
3
2
?
?
1
2
1; result is positive
0
2
2
?
?
0
2
1; result is zero
1
1
2
?
?
0xFF
2
0; result is negative
0
REG1,1
Process
dfff
data
Q3
destination
Write to
ffff
Q4
SWAPF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Example
TRIS
Operands:
Syntax:
Operation:
Status Affected: None
Encoding:
Description:
Words:
Cycles:
Example
Swap Nibbles in f
[ label ] SWAPF f,d
0
d
(f<3:0>)
(f<7:4>)
None
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
Before Instruction
After Instruction
Load TRIS Register
[ label ]
5
(W)
The instruction is supported for code
compatibility with the PIC16C5X prod-
ucts. Since TRIS registers are read-
able and writable, the user can directly
address them.
1
1
SWAPF REG,
Decode
To maintain upward compatibility
with future PIC16CXX products,
Q1
00
00
f
f
[0,1]
do not use this instruction.
127
7
TRIS register f;
TRIS
PIC16C84
register 'f'
0000
1110
REG1
REG1
W
(destination<7:4>),
(destination<3:0>)
Read
Q2
DS30445C-page 65
f
0
0110
Process
dfff
=
=
=
data
Q3
0xA5
0xA5
0x5A
destination
0fff
ffff
Write to
Q4

Related parts for PIC16C84-04/P