Datasheet

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