English
Language : 

PIC18FXX8 Datasheet, PDF (309/402 Pages) Microchip Technology – 28/40-Pin High-Performance, Enhanced Flash Microcontrollers with CAN Module
PIC18FXX8
MOVLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Move Literal to W
[ label ] MOVLW k
0 ≤ k ≤ 255
k→W
None
0000 1110 kkkk kkkk
The eight-bit literal ‘k’ is loaded into W.
1
1
Q2
Read
literal ‘k’
Q3
Process
Data
Q4
Write to W
Example:
MOVLW
After Instruction
W
= 0x5A
0x5A
MOVWF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Move W to f
[ label ] MOVWF
0 ≤ f ≤ 255
a ∈ [0,1]
(W) → f
None
f [,a]
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, overriding the
BSR value. If ‘a’ = 1, then the bank will
be selected as per the BSR value
(default).
1
1
Q2
Read
register ‘f’
Q3
Process
Data
Q4
Write
register ‘f’
Example:
MOVWF
REG
Before Instruction
W
=
REG =
After Instruction
W
=
REG =
0x4F
0xFF
0x4F
0x4F
 2004 Microchip Technology Inc.
DS41159D-page 307