PIC12C508A Microchip Technology, PIC12C508A Datasheet - Page 57

no-image

PIC12C508A

Manufacturer Part Number
PIC12C508A
Description
8-Pin/ 8-Bit CMOS Microcontrollers
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC12C508A
Manufacturer:
MIROCHIP
Quantity:
5 159
Part Number:
PIC12C508A
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIPS
Quantity:
482
Part Number:
PIC12C508A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508A-04/SM
Manufacturer:
MICROCHI
Quantity:
42
Part Number:
PIC12C508A-04/SM
Manufacturer:
MICROCIHIP
Quantity:
20 000
Company:
Part Number:
PIC12C508A-04/SM
Quantity:
30 000
Part Number:
PIC12C508A-04/SN
Manufacturer:
ROHM
Quantity:
7 948
Part Number:
PIC12C508A-04/SN
Manufacturer:
MIC
Quantity:
1 000
Part Number:
PIC12C508A-04/SN
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC12C508A-04E/SN
Manufacturer:
MICROCHIP
Quantity:
1 040
Part Number:
PIC12C508A-04I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC12C508A-04I/P
0
Part Number:
PIC12C508A-04I/SN
Quantity:
100
SWAPF
Syntax:
Operands:
Operation:
Status Affected: None
Encoding:
Description:
Words:
Cycles:
Example
TRIS
Syntax:
Operands:
Operation:
Status Affected: None
Encoding:
Description:
Words:
Cycles:
Example
Note:
1999 Microchip Technology Inc.
Before Instruction
After Instruction
Before Instruction
After Instruction
REG1
REG1
W
W
TRIS
f = 6 for PIC12C5XX only.
Swap Nibbles in f
[ label ] SWAPF f,d
0
d
(f<3:0>)
(f<7:4>)
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
SWAPF
=
=
=
Load TRIS Register
[ label ] TRIS
f =
(W)
TRIS register ’f’ (f = 6) is loaded with the
contents of the W register
1
1
=
=
TRIS
0011
0000
6
f
[0,1]
0xA5
0xA5
0X5A
0XA5
0XA5
31
TRIS register f
REG1, 0
GPIO
10df
0000
(dest<7:4>);
(dest<3:0>)
f
ffff
0fff
XORLW
Syntax:
Operands:
Operation:
Status Affected: Z
Encoding:
Description:
Words:
Cycles:
Example:
XORWF
Syntax:
Operands:
Operation:
Status Affected: Z
Encoding:
Description:
Words:
Cycles:
Example
Before Instruction
After Instruction
Before Instruction
After Instruction
W
W
REG
W
REG
W
=
=
Exclusive OR literal with W
[ label ]
0
(W) .XOR. k
The contents of the W register are
XOR’ed with the eight bit literal 'k'. The
result is placed in the W register.
1
1
XORLW 0xAF
0xB5
0x1A
Exclusive OR W with f
[ label ] XORWF
0
d
(W) .XOR. (f)
Exclusive OR the contents of the W
register 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
XORWF
=
=
=
=
1111
0001
k
f
[0,1]
0xAF
0xB5
0x1A
0xB5
PIC12C5XX
31
255
XORLW k
REG,1
kkkk
10df
W)
dest)
DS40139E-page 57
kkkk
ffff
f,d

Related parts for PIC12C508A