PIC16F57 Microchip Technology Inc., PIC16F57 Datasheet - Page 45

no-image

PIC16F57

Manufacturer Part Number
PIC16F57
Description
Flash-based, 8-bit Cmos Microcontroller Series
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F57-I/P
Manufacturer:
Microchip Technology
Quantity:
26 657
Part Number:
PIC16F57-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F57-I/P
0
Part Number:
PIC16F57-I/SO
Manufacturer:
PANASONIC
Quantity:
12 933
Part Number:
PIC16F57-I/SO
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC16F57-I/SO
0
Part Number:
PIC16F57-I/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
ADDWF
Syntax:
Operands:
Operation:
Status Affected: C, DC, Z
Description:
Words:
Cycles:
Example:
ANDLW
Syntax:
Operands:
Operation:
Status Affected: Z
Encoding:
Description:
Words:
Cycles:
Example:
© 2007 Microchip Technology Inc.
Encoding:
Before Instruction
After Instruction
Before Instruction
After Instruction
W
W
W
TEMP_REG =
TEMP_REG =
W
=
=
(W).AND. (k) → (W)
Add W and f
[ label ] ADDWF
0 ≤ f ≤ 31
d ∈ [0,1]
(W) + (f) → (dest)
Add the contents of the W register
and register ‘f’. If ‘d’ is ‘0’, the
result is stored in the W register. If
‘d’ is ‘1’, the result is stored back in
1
1
ADDWF TEMP_REG, 0
AND literal with W
[ label ] ANDLW
0 ≤ k ≤ 255
The contents of the W register are
AND’ed with the eight-bit literal ‘k’.
The result is placed in the W
register.
1
1
ANDLW H'5F'
register 'f'.
0001
1110
0xA3
0x03
=
=
0x17
0xC2
0xD9
0xC2
11df
kkkk
ffff
kkkk
f, d
k
ANDWF
Syntax:
Operands:
Operation:
Status Affected: Z
Encoding:
Description:
Words:
Cycles:
Example:
BCF
Syntax:
Operands:
Operation:
Status Affected: None
Encoding:
Description:
Words:
Cycles:
Example:
Before Instruction
After Instruction
Before Instruction
After Instruction
FLAG_REG =
FLAG_REG =
W
TEMP_REG =
W
TEMP_REG =
AND W with f
[ label ] ANDWF
0 ≤ f ≤ 31
d ∈ [0,1]
(W) .AND. (f) → (dest)
The contents of the W register are
AND’ed with 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
ANDWF TEMP_REG, 1
Bit Clear f
[ label ] BCF
0 ≤ f ≤ 31
0 ≤ b ≤ 7
0 → (f<b>)
Bit ‘b’ in register ‘f’ is cleared.
1
1
BCF
0001
0100
=
=
0xC7
0x47
FLAG_REG,
0xC2
0x17
0x17
0x02
01df
bbbf
PIC16F5X
f, b
DS41213D-page 43
ffff
ffff
f, d
7

Related parts for PIC16F57