PIC18CXX2
MOVLW
MOVWF
Move literal to WREG
[ label ] MOVLW k
0 ≤ k ≤ 255
Move WREG to f
Syntax:
Syntax:
[ label ] MOVWF f,a
Operands:
Operation:
Operands:
0 ≤ f ≤ 255
a
[0,1]
k → WREG
Operation:
(WREG) → f
Status Affected:
Encoding:
None
Status Affected:
Encoding:
None
0000
1110
kkkk
kkkk
0110
111a
ffff
ffff
Description:
The eight bit literal ’k’ is loaded into
WREG.
Description:
Move data from WREG 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).
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
literal ’k’
Process
Data
Write to
WREG
Words:
Cycles:
1
1
MOVLW
0x5A
Example:
Q Cycle Activity:
Q1
After Instruction
Q2
Q3
Q4
WREG
=
0x5A
Decode
Read
register ’f’
Process
Data
Write
register ’f’
MOVWF
REG, 0
Example:
Before Instruction
WREG
REG
=
=
0x4F
0xFF
After Instruction
WREG
REG
=
=
0x4F
0x4F
7/99 Microchip Technology Inc.
Preliminary
DS39026B-page 217