English
Language : 

PIC18F6520-I Datasheet, PDF (287/380 Pages) Micrel Semiconductor – 64/80-Pin High-Performance, 256 Kbit to 1 Mbit Enhanced Flash Microcontrollers with A/D
PIC18F6520/8520/6620/8620/6720/8720
MOVLW
Move literal to W
Syntax:
[ label ] MOVLW k
Operands:
0 ≤ k ≤ 255
Operation:
k→W
Status Affected: None
Encoding:
0000 1110 kkkk kkkk
Description:
The eight-bit literal ‘k’ is loaded into
W.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Decode
Read
literal ‘k’
Process
Data
Write to W
Example:
MOVLW
After Instruction
W
= 0x5A
0x5A
MOVWF
Move W to f
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
[ label ] MOVWF f [,a]
0 ≤ f ≤ 255
a ∈ [0,1]
(W) → f
None
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
Cycles:
1
Q Cycle Activity:
Q1
Q2
Decode
Read
register ‘f’
Q3
Process
Data
Q4
Write
register ‘f’
Example:
MOVWF REG, 0
Before Instruction
W
REG
= 0x4F
= 0xFF
After Instruction
W
REG
= 0x4F
= 0x4F
 2004 Microchip Technology Inc.
DS39609B-page 285