PIC12C671-04I/P Microchip Technology Inc., PIC12C671-04I/P Datasheet - Page 80

no-image

PIC12C671-04I/P

Manufacturer Part Number
PIC12C671-04I/P
Description
8 PIN, 1.75 KB OTP, 128 RAM, 6 I/O
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC12C671-04I/P

A/d Inputs
4-Channel, 8-Bit
Cpu Speed
2.5 MIPS
Eeprom Memory
0 Bytes
Input Output
5
Memory Type
OTP
Number Of Bits
8
Package Type
8-pin PDIP
Programmable Memory
1.75K Bytes
Ram Size
128 Bytes
Speed
4 MHz
Timers
1-8-bit
Voltage, Range
2.5-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device
PIC12C67X
SUBLW
Syntax:
Operands:
Operation:
Status
Affected:
Encoding:
Description:
Words:
Cycles:
Example 1:
Example 2:
Example 3:
DS30561B-page 80
Subtract W from Literal
[ label ]
0
k - (W)
C, DC, Z
The W register is subtracted (2’s
complement method) from the eight
bit literal 'k'. The result is placed in
the W register.
1
1
SUBLW
Before Instruction
After Instruction
Before Instruction
After Instruction
Before Instruction
After Instruction
11
k
255
W
C
W
C
W
C
W
C
W
C
W
C
tive
SUBLW k
0x02
W)
110x
=
=
=
=
=
=
=
=
=
=
=
=
1
?
1
1; result is positive
2
?
0
1; result is zero
3
?
0xFF
0; result is nega-
kkkk
kkkk
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
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 regis-
ter 'f'.
1
1
SUBWF
Before Instruction
After Instruction
Before Instruction
After Instruction
Before Instruction
After Instruction
00
f
[0,1]
REG1
W
C
REG1
W
C
REG1
W
C
REG1
W
C
REG1
W
C
REG1
W
C
127
1999 Microchip Technology Inc.
SUBWF f,d
REG1,1
0010
dest)
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
3
2
?
1
2
1; result is positive
2
2
?
0
2
1; result is zero
1
2
?
0xFF
2
0; result is negative
dfff
ffff

Related parts for PIC12C671-04I/P