PIC18F2331/2431/4331/4431
MOVLW
Move Literal to W
MOVWF
Move W to f
Syntax:
[ label ] MOVLW
0 k 255
k W
k
Syntax:
[ label ] MOVWF f [,a]
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Operands:
0 f 255
a [0,1]
Operation:
(W) f
None
Status Affected:
Encoding:
None
0000
1110
kkkk
kkkk
0110
111a
ffff
ffff
The 8-bit literal, ‘k’, is loaded into W.
Description:
Move data from W to register, ‘f’.
1
1
Location, ‘f’, can be anywhere in the
256-byte bank. If ‘a’ is ‘0’, the Access
Bank will be selected, overriding the
BSR value. If ‘a’ = 1, then the bank will
be selected as per the BSR value.
Cycles:
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
literal ‘k’
Process
Data
Write to
W
Words:
Cycles:
1
1
Example:
MOVLW
0x5A
Q Cycle Activity:
Q1
Q2
Q3
Q4
After Instruction
W
=
0x5A
Decode
Read
register ‘f’
Process
Data
Write
register ‘f’
Example:
MOVWF
REG
Before Instruction
W
REG
=
=
0x4F
0xFF
After Instruction
W
REG
=
=
0x4F
0x4F
2010 Microchip Technology Inc.
DS39616D-page 309