|
PIC18F258 Datasheet, PDF (305/384 Pages) Microchip Technology – High Performance, 28/40-Pin Enhanced FLASH Microcontrollers with CAN | |||
|
◁ |
PIC18FXX8
MOVLW
Move literal to W
Syntax:
Operands:
Operation:
Status Affected:
[ label ] MOVLW k
0 ⤠k ⤠255
kâW
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:
[ label ] MOVWF f [,a]
0 ⤠f ⤠255
a â [0,1]
(W) â f
None
Encoding:
0110 111a ffff ffff
Description:
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, 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
Before Instruction
W
REG
= 0x4F
= 0xFF
After Instruction
W
REG
= 0x4F
= 0x4F
 2002 Microchip Technology Inc.
DS41159B-page 303
|
▷ |