PIC18F010/020
MOVLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Q Cycle Activity:
Q1
Decode
Move literal to WREG
[ label ] MOVLW k
0 ≤ k ≤ 255
k → WREG
None
0000 1110 kkkk kkkk
The eight bit literal ’k’ is loaded into
WREG.
1
1
Q2
Read
literal ’k’
Q3
Process
Data
Q4
Write to
WREG
Example:
MOVLW
After Instruction
WREG = 0x5A
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’ is 1, the
Bank will be selected as per the
BSR value.
Words:
1
Cycles:
1
Q Cycle Activity:
Q1
Decode
Q2
Read
register ’f’
Q3
Process
Data
Q4
Write
register ’f’
Example:
MOVWF
REG
Before Instruction
WREG = 0x4F
REG = 0xFF
After Instruction
WREG = 0x4F
REG = 0x4F
2001 Microchip Technology Inc.
Preliminary
DS41142A-page 121