Electronic component search and free download site.
Transistors,MosFET ,Diode,Integrated circuits
English
한국어
日本語
русский
简体中文
español
Part Name
Description
PIC18F010T-I/SN View Datasheet(PDF) - Microchip Technology
Part Name
Description
Manufacturer
PIC18F010T-I/SN
High Performance Microcontrollers
Microchip Technology
PIC18F010T-I/SN Datasheet PDF : 176 Pages
First
Prev
131
132
133
134
135
136
137
138
139
140
Next
Last
SUBFWB (Cont.)
Example 1:
SUBFWB REG
Before Instruction
REG = 3
WREG = 2
C
=1
After Instruction
REG =
WREG =
C
=
Z
=
N
=
0xFF
2
0
0
1 ; result is negative
Example 2:
SUBFWB REG
Before Instruction
REG = 2
WREG = 5
C
=1
After Instruction
REG = 2
WREG = 3
C
=1
Z
=0
N
=0
; result is positive
Example 3:
SUBFWB REG
Before Instruction
REG = 1
WREG = 2
C
=0
After Instruction
REG = 0
WREG = 2
C
=1
Z
=1
N
=0
; result is zero
PIC18F010/020
SUBLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Subtract WREG from literal
[
label
] SUBLW k
0
≤
k
≤
255
k
–
(WREG)
→
WREG
N,OV, C, DC, Z
0000 1000 kkkk kkkk
WREG is subtracted from the
eight bit literal 'k'. The result is
placed in WREG.
1
1
Q2
Read
literal
’
k
’
Q3
Process
Data
Q4
Write to
WREG
Example 1:
SUBLW 0x02
Before Instruction
WREG = 1
C
=?
After Instruction
WREG = 1
C
=1
Z
=0
N
=0
; result is positive
Example 2:
SUBLW 0x02
Before Instruction
WREG = 2
C
=?
After Instruction
WREG = 0
C
=1
Z
=1
N
=0
; result is zero
Example 3:
SUBLW 0x02
Before Instruction
WREG = 3
C
=?
After Instruction
WREG =
C
=
Z
=
N
=
0xFF ; (2
’
s complement)
0 ; result is negative
0
1
2001 Microchip Technology Inc.
Preliminary
DS41142A-page 131
Share Link:
datasheetq.com [
Privacy Policy
]
[
Request Datasheet
] [
Contact Us
]