PIC18F2331/2431/4331/4431
MOVFF
Move f to f
MOVLB
Move Literal to Low Nibble in BSR
Syntax:
[ label ] MOVFF f ,f
Syntax:
[ label ] MOVLB
0 k 255
k BSR
k
s
d
Operands:
0 f 4095
Operands:
Operation:
Status Affected:
Encoding:
Description:
s
0 f 4095
d
Operation:
(f ) f
s
d
None
Status Affected:
None
0000
0001
0000
kkkk
Encoding:
1st word (source)
2nd word (destin.)
The 8-bit literal, ‘k’, is loaded into the
Bank Select Register (BSR).
1100
1111
ffff
ffff
ffff
ffff
ffff
ffff
s
d
Words:
Cycles:
1
1
Description:
The contents of source register, ‘f ’, are
s
moved to destination register, ‘f ’.
d
Location of source, ‘f ’, can be any-
where in the 4096-byte data space
(000h to FFFh) and location of destina-
s
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read literal
‘k’
Process
Data
Write
literal ‘k’ to
BSR
tion, ‘f ’, can also be anywhere from
d
000h to FFFh.
Either source or destination can be W
(a useful special situation).
MOVFFis particularly useful for
transferring a data memory location to a
peripheral register (such as the transmit
buffer or an I/O port).
The MOVFFinstruction cannot use the
PCL, TOSU, TOSH or TOSL as the
destination register.
Example:
MOVLB
5
Before Instruction
BSR register
=
=
0x02
0x05
After Instruction
BSR register
The MOVFFinstruction should not be
used to modify interrupt settings while
any interrupt is enabled (see the note
on page 97).
Words:
Cycles:
2
2 (3)
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
register ‘f’
(src)
Process
Data
No
operation
Decode
No
operation
No
operation
Write
register ‘f’
(dest)
No dummy
read
Example:
MOVFF
REG1, REG2
Before Instruction
REG1
REG2
=
=
0x33
0x11
After Instruction
REG1
=
=
0x33
0x33
REG2
DS39616D-page 308
2010 Microchip Technology Inc.