
2003 Microchip Technology Inc.
Advance Information
DS39612A-page 303
PIC18F6X2X/8X2X
MOVLW
Example:
After Instruction
W
MOVWF
Example:
Before Instruction
W
REG
After Instruction
W
REG
Move literal to W
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
[
label
] MOVLW k
0
≤
k
≤
255
k
→
W
None
0000
1110
kkkk
kkkk
The eight-bit literal ‘k’ is loaded into
W.
1
1
Words:
Cycles:
Q Cycle Activity:
Q1
Q2
Read
literal ‘k’
Q3
Q4
Decode
Process
Data
Write to W
MOVLW
0x5A
=
0x5A
Move W to f
Syntax:
Operands:
[
label
] MOVWF f [,a]
0
≤
f
≤
255
a
∈
[0,1]
(W)
→
f
None
Operation:
Status Affected:
Encoding:
Description:
0110
111a
ffff
ffff
Move data from W to register ‘f’.
Location ‘f’ can be anywhere in the
256-byte bank. If ‘a’ is 0, the
Access Bank will be selected, over-
riding the BSR value. If ‘a’ = 1, then
the bank will be selected as per the
BSR value (default).
1
1
Words:
Cycles:
Q Cycle Activity:
Q1
Q2
Read
register ‘f’
Q3
Q4
Write
register 'f'
Decode
Process
Data
MOVWF
REG, 0
=
=
0x4F
0xFF
=
=
0x4F
0x4F