Datasheet

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