PIC18C658 MICROCHIP [Microchip Technology], PIC18C658 Datasheet - Page 299

no-image

PIC18C658

Manufacturer Part Number
PIC18C658
Description
High-Performance Microcontrollers with CAN Module
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C658-1/CL
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-1/L
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-ES
Manufacturer:
Microchip
Quantity:
131
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip
Quantity:
385
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-I/L
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip
Quantity:
601
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658T-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
SUBWFB
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
2000 Microchip Technology Inc.
Decode
Q1
register ’f’
0
(f) – (WREG) – (C)
N,OV, C, DC, Z
Subtract WREG and the carry flag
Subtract WREG from f with
Borrow
[ label ] SUBWFB f [ ,d [,a] ]
d
a
(borrow) from register 'f' (2’s com-
plement method). If 'd' is 0, the
result is stored in WREG. If 'd' is
1, the result is stored back in reg-
ister 'f' (default). If ’a’ is 0, the
Access Bank will be selected,
overriding the BSR value. If ’a’ is
1, the Bank will be selected as per
the BSR value.
1
1
Read
Q2
0101
f
[0,1]
[0,1]
255
10da
Process
Data
Q3
ffff
dest
Advanced Information
destination
Write to
Q4
ffff
SUBWFB
Example 1:
Example 2:
Example 3:
Before Instruction
After Instruction
Before Instruction
After Instruction
Before Instruction
After Instruction
REG
WREG
C
REG
WREG
C
Z
N
REG
WREG
C
REG
WREG
C
Z
N
REG
WREG
C
REG
WREG
C
Z
N
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
Subtract WREG from f with
Borrow (cont’d)
SUBWFB
SUBWFB
SUBWFB
0x19
0x0D
1
0x0C
0x0D
1
0
0
0x1B
0x1A
0
0x1B
0x00
1
1
0
0x03
0x0E
1
0xF5
0x0E
0
0
1
PIC18CXX8
REG
(0000 0011)
(0001 1001)
; result is positive
(0001 1011)
(0001 1010)
(0001 1011)
; result is zero
(0000 1101)
(1111 0100) [2’s comp]
(0000 1101)
; result is negative
(0000 1101)
(0000 1011)
(0000 1101)
REG, W
REG
DS30475A-page 299

Related parts for PIC18C658