English
Language : 

PIC16C925_13 Datasheet, PDF (130/180 Pages) Microchip Technology – 64/68-Pin CMOS Microcontrollers with LCD Driver
PIC16C925/926
SWAPF
Swap Nibbles in f
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
[ label ] SWAPF f [,d]
0  f  127
d  [0,1]
(f<3:0>)  (destination<7:4>),
(f<7:4>)  (destination<3:0>)
None
00
1110 dfff ffff
The upper and lower nibbles of reg-
ister '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'.
Words:
1
Cycles:
Q Cycle Activity:
1
Q1
Q2
Q3
Q4
Decode
Read
register 'f'
Process
data
Write to
destination
Example
SWAPF REG, 0
Before Instruction:
REG1 = 0xA5
After Instruction:
REG1 = 0xA5
W
= 0x5A
TRIS
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
Load TRIS Register
[ label ] TRIS f
5f7
(W)  TRIS register f;
None
00 0000 0110
0fff
The instruction is supported for
code compatibility with the
PIC16C5X products. Since TRIS
registers are readable and writ-
able, the user can directly address
them.
1
1
To maintain upward compatibil-
ity with future PIC16CXXX
products, do not use this
instruction.
DS39544B-page 130
Preliminary
 2001-2013 Microchip Technology Inc.